Commit Graph

97 Commits

Author SHA1 Message Date
Maximilian Krüger d7feac802f verifySignatures -> hasEnoughValidSignatures and make it return bool 2018-02-13 17:18:24 +01:00
Maximilian Krüger 59d354bde0 test: withdraw should succeed if gas price != requested gas price but sender is receiver 2018-02-13 16:51:24 +01:00
Maximilian Krüger 845ab3359c fix syntax error 2018-02-13 16:38:28 +01:00
Maximilian Krüger 22e9b5d695 add test that fails when gas price != requested gas price 2018-02-13 16:13:58 +01:00
Maximilian Krüger 0de0384509 fix test that submitting signature with too short msg fails 2018-02-13 16:09:57 +01:00
Maximilian Krüger 50e63db3cd improve truffle tests for ForeignBridge.transferToHome 2018-02-13 15:48:10 +01:00
Maximilian Krüger 61bb0b3ffa fix truffle tests that failed because of wrong number of args 2018-02-13 15:11:24 +01:00
Maximilian Krüger 52652cb9fc add truffle test: should fail to transfer more than balance home 2018-02-13 14:44:55 +01:00
Maximilian Krüger 2165513fdd tests for Helpers.verifySignatures 2018-02-13 14:26:11 +01:00
Maximilian Krüger c97785862b remove unused function param 2018-02-13 14:25:54 +01:00
Maximilian Krüger bd20896deb use `accounts` in more truffle tests 2018-02-13 14:25:43 +01:00
Maximilian Krüger edd691672a fix broken truffle tests that passed because error handling was broken 2018-02-13 11:01:05 +01:00
Maximilian Krüger ff9f7bb7f6 fix error handling in truffle tests
only catch/ignore such errors that we want to happen.
propagate all other errors correctly and don't ignore them.
2018-02-13 11:00:09 +01:00
Maximilian Krüger 49c7a11fdf tests: fix indentation 2018-02-13 10:57:07 +01:00
Maximilian Krüger d9090d9cde add ignoreExpectedError to test helpers 2018-02-13 10:29:21 +01:00
Maximilian Krüger 4c63d4469e test/home: reduce homeGasPrice everywhere to keep coverage test from failing 2018-02-12 17:55:07 +01:00
Maximilian Krüger 71fed91200 test/home: trying lower gas price in to not fail when computing coverage 2018-02-12 17:39:56 +01:00
Maximilian Krüger e667321760 truffle tests fail on travis only :/ trying something 2018-02-12 17:17:05 +01:00
Maximilian Krüger a3740a5672 test/foreign: add missing variable homeGasPrice 2018-02-12 16:39:59 +01:00
Maximilian Krüger e3bbe9eda3 truffle test for message: should extract homeGasPrice 2018-02-09 09:44:55 +01:00
Maximilian Krüger 88a117a5ba fix test helpers.createMessage: allow setting of homeGasPrice 2018-02-09 09:44:55 +01:00
Maximilian Krüger 467c5dc2f2 remove contract code that dealt with removed ignoring of insufficient value withdraws 2018-02-09 09:44:55 +01:00
Maximilian Krüger f2e29764c2 make existing truffle tests run again after 112 2018-02-09 09:41:46 +01:00
Maximilian Krüger ddc54802dd bridge.sol: check for overflow in transferFrom 2018-01-26 12:05:37 +01:00
Maximilian Krüger 4900eeb295 improve comment 2018-01-26 10:00:44 +01:00
Maximilian Krüger 0e13ed406b bridge.sol: emit Tranfer to 0x0 if tokens are destroyed 2018-01-26 10:00:44 +01:00
Maximilian Krüger 2f75f3683f bridge.sol: emit Transfer from 0x0 on token creation as laid out in ERC20 2018-01-26 10:00:44 +01:00
Maximilian Krüger 37af2d1c98 test/foreign-erc20.js: test that transferFrom(0) succeeds and add more assertions 2018-01-26 10:00:44 +01:00
Maximilian Krüger 9fee20e026 test/foreign-erc20.js: fix test for transfer with overflow 2018-01-26 10:00:44 +01:00
Maximilian Krüger b8bf9bee54 remove unnecessary check for overflow in transferHomeViaRelay
resolve #88
2018-01-26 10:00:44 +01:00
Maximilian Krüger 1ae92517a3 more truffle tests 2018-01-26 10:00:44 +01:00
Maximilian Krüger 810f013140 foreign-erc20.js: more test cases 2018-01-26 10:00:44 +01:00
Maximilian Krüger 8a3a42a93a add incomplete truffle/test/foreign-erc20.js 2018-01-26 10:00:44 +01:00
Maximilian Krüger 73dd502b88 bridge.sol: authority -> authorityResponsibleForRelay 2018-01-26 10:00:44 +01:00
Maximilian Krüger ea18c198b4 make ForeignBridge.Transfer event conform to ERC20 2018-01-26 10:00:44 +01:00
Maximilian Krüger ffc0b31eb3 ForeignBridge.transferLocal -> transfer to conform to ERC20 2018-01-26 10:00:44 +01:00
Maximilian Krüger 80d67642ad add test "withdraw should fail if duplicate signature is provided" 2018-01-15 11:30:45 +01:00
Maximilian Krüger 6a052c12e3 add test "withdraw should fail if not enough signatures are provided" 2018-01-15 11:21:46 +01:00
Maximilian Krüger 8211007da2 Helpers.intToString -> Helpers.uintToString 2018-01-15 11:00:04 +01:00
Maximilian Krüger 43feb6065b test/helpers: add test of intToString with really large uint 2018-01-15 10:57:05 +01:00
Maximilian Krüger d432e73905 replace Helpers.intToString implementation by one that uses less gas and doesn't break for numbers with more than 8 digits 2018-01-15 10:47:50 +01:00
Maximilian Krüger e87e189b9f add tests for the Helpers library 2018-01-15 10:19:10 +01:00
Maximilian Krüger 263d846782 add test helper `range` 2018-01-15 10:18:52 +01:00
Maximilian Krüger 053e7876bd test/foreign: improve test description 2018-01-15 09:29:58 +01:00
Maximilian Krüger 4fec6a4126 test/foreign: add test: should ignore deposits that are not from authorities 2018-01-13 16:04:36 +01:00
Maximilian Krüger 3f1d4950bf test/home: fix test: should not allow withdraw with message.length != 84 2018-01-13 15:53:59 +01:00
Maximilian Krüger 5b742f492d test/message_signing: add test: should fail to recover address from signature that is too short 2018-01-13 15:07:12 +01:00
Maximilian Krüger 30f4669b00 test/message_signing: improve test names 2018-01-13 15:06:57 +01:00
Maximilian Krüger 06e363dfca bridge.sol: extract message related fns into `Message` library 2018-01-12 17:28:02 +01:00
Maximilian Krüger d96ebc026e truffle tests: move `createMessage` to helpers 2018-01-12 17:26:14 +01:00