Commit Graph

401 Commits

Author SHA1 Message Date
Kirill Fedoseev d94ad55f52
Add missing input fee type validation where needed (#529) 2020-10-15 02:06:20 +03:00
Kirill Fedoseev d51a081f65
Add extra constraints on ECDSA signature parameters (#528) 2020-10-15 02:04:08 +03:00
Kirill Fedoseev 910cacdc37
Remove unused gasPrice fields (#527) 2020-10-15 01:59:18 +03:00
Kirill Fedoseev 82e1864a51
Correct handling of rewards addresses count (#525) 2020-10-15 01:48:55 +03:00
Kirill Fedoseev 3c18c12d39
Add missing zero address checks (#503) 2020-10-14 22:58:34 +03:00
Kirill Fedoseev 69c207c183
Add extra check on internal call gaslimit (#502) 2020-10-14 22:44:39 +03:00
Kirill Fedoseev 3f1f04d7dd
Extra check for balance increase (#479) 2020-08-29 20:30:05 +03:00
Kirill Fedoseev df296d1790
Restrict relay of tokens for other user (#475) 2020-08-22 22:30:27 +03:00
Kirill Fedoseev 8748332d28
Fix transferFrom call for old ERC20 tokens (#474) 2020-08-22 01:27:35 +03:00
Kirill Fedoseev c451ffd79e
Remove multi AMB calls restriction (#472) 2020-08-19 17:43:46 +03:00
Alexander Kolotov d7f988e71c
Increase the version of AMB multi-token extension to 1.0.2 (#469) 2020-08-19 16:57:40 +03:00
Kirill Fedoseev fd0c4121d9
Disable token operations by using global dailyLimit parameter (#466) 2020-08-13 10:53:15 +03:00
Kirill Fedoseev dcb1cb9402
Deinit token in fixFailedMessage (#463) 2020-08-03 18:01:58 +03:00
Kirill Fedoseev a1ff878b1f
Move fee manager into home mediator (#462) 2020-08-03 15:36:12 +03:00
Alexander Kolotov ab3529e776
increase the version of AMB contracts (#461) 2020-08-03 15:35:02 +03:00
Kirill Fedoseev cc3c888960
Multi AMB-ERC20-TO-ERC677 mediators (#455) 2020-08-01 04:22:35 +03:00
Gerardo Nardelli dd46135248
Remove half duplex erc20 token code (#457) 2020-07-29 21:40:15 +03:00
Gerardo Nardelli 67e536f312
Remove contracts and build for spuriousDragon (#456) 2020-07-27 22:26:22 +03:00
Alexander Kolotov 957699bb1f
Use permittable ERC677 token by default for AMB mediators (#451) 2020-07-20 18:23:50 +03:00
Kirill Fedoseev f8aea2366c
Support negative decimal shift (#448) 2020-07-17 23:16:41 +03:00
Kirill Fedoseev 15d4d3e133
Use uint256[N] instead of uint256[] (#447) 2020-07-10 17:41:38 +03:00
Kirill Fedoseev de50e600fb
Add erc-to-native mediators (#440) 2020-06-30 23:20:33 +03:00
Alexander Kolotov 7f89095418
Bump version to 5.0.2 before merging to master (#438) 2020-06-16 12:15:13 +03:00
Kirill Fedoseev df69383139
Remove references to nonce (#434) 2020-06-15 16:55:26 +03:00
Kirill Fedoseev 3aa50e4953
Make chain id getters public (#435) 2020-06-15 16:54:37 +03:00
Kirill Fedoseev ae4a5bd642
Add missing call to setMediatorBalance (#436) 2020-06-15 16:50:32 +03:00
Alexander Kolotov eff4158dc6
Bump version to 5.0.1 (#426) 2020-06-05 09:55:01 +03:00
Kirill Fedoseev a420caf522
Fix infinite AMB loop (#425) 2020-06-04 23:04:33 +03:00
Alexander Kolotov f74821afba
Bump version to 5.0.0 (#422) 2020-05-25 19:34:43 +03:00
Kirill Fedoseev 45993e8a1b
Multi AMB requests in one transaction (#403) 2020-05-25 16:59:35 +03:00
Alexander Kolotov 433070de92
detailed description of STAKE extension call flows (#421) 2020-05-20 10:30:04 +03:00
Alexander Kolotov f85097f67e
Detailed description of native-to-erc677 extension call flows (#420) 2020-05-18 21:12:50 +03:00
Gerardo Nardelli 0a7b10e77e
Add native to erc20 mediator on top of AMB (#367) 2020-05-16 21:02:25 +03:00
Kirill Fedoseev cfcc717b02
Add method for handling imbalance in SAI tokens (#419) 2020-05-12 20:14:55 +03:00
Gerardo Nardelli e550067c76
Update block reward mock (#417) 2020-05-08 20:13:08 +03:00
Alexander Kolotov 2a0e48c850
Move STEK fee distribution implementation into Fee Manager (#416) 2020-05-07 17:38:31 +03:00
varasev 8bb2e23de8
Add permit feature to token contract (#410) 2020-05-04 14:33:49 +03:00
Alexander Kolotov a410f9ccd0
Bridge interfaces version synchronized with the release versioning (#411) 2020-05-04 11:18:49 +03:00
Alexander Kolotov a620e47b1c
Consistent call of onTokenTransfer (#412) 2020-05-04 11:16:09 +03:00
Gerardo Nardelli 8bce8f7c1d
Add TokensBridged event in mediators (#409) 2020-04-21 19:33:54 +03:00
Kirill Fedoseev 75c3f95bb9
Fix alternative receiver behaviour for amb-erc-to-erc (#408) 2020-04-21 19:31:52 +03:00
Alexander Kolotov fee0c438a5 Merge branch 'develop' of github.com:poanetwork/tokenbridge-contracts into develop 2020-04-17 00:12:05 +03:00
Gerardo Nardelli dcc7554341
Disable sai swap to dai (#404) 2020-04-16 11:07:25 +03:00
Kirill Fedoseev 393ef6c10b
STAKE token mediators (#394) 2020-04-10 23:18:14 +03:00
Kirill Fedoseev adf9993208
Fix ChaiConnector behaviour when DSR is zero (#400) 2020-04-08 15:25:29 +03:00
Kirill Fedoseev bfea462cd6
Update interest receiver (#382) 2020-03-28 22:04:59 +03:00
Kirill Fedoseev da8d601bb7
Gas token integration (#378) 2020-03-24 22:53:47 +03:00
Kirill Fedoseev b5d30e09a0
Add support of multiple bridges in bridge token (#391) 2020-03-24 11:56:11 +03:00
Alexander Kolotov d6d067b1a4
Revert "Allow multiple bridges for token" (#389)
This reverts commit 92f850de23 - the changes introduced by #387.
2020-03-23 16:26:31 +03:00
varasev 92f850de23
Allow multiple bridges for token (#387) 2020-03-23 15:39:27 +03:00
Kirill Fedoseev c073e83067
Paying interest in chai to avoid the oracle misbehavior (#380) 2020-03-12 22:37:06 +03:00
Kirill Fedoseev aebb1ed768
Chai integration internal audit fixes (#372) 2020-02-27 15:28:54 +03:00
varasev 39dccf9c9e
Rename reward functions (#370) 2020-02-20 22:23:14 +03:00
Kirill Fedoseev cf53cd7cba
Add restriction on claiming Chai token (#368) 2020-02-20 10:37:33 +03:00
Kirill Fedoseev f35a2722d3
Earning interest with Chai for erc-to-native mode (#356) 2020-02-17 15:15:19 +03:00
Kirill Fedoseev efbbdfade1
Added Bridge Validators deterministic mock for e2e tests (#366) 2020-02-08 23:17:54 +03:00
Kirill Fedoseev 34a8d2fdc7 Single execute signatures (#357) 2020-01-20 17:46:56 +03:00
Kirill Fedoseev e0a1d6556f Simplified some conditions in require() clauses (#353) 2020-01-04 16:35:46 +04:00
Kirill Fedoseev 49c0b80b35 Updated minimum gas usage estimation (#355) 2020-01-03 00:16:58 +04:00
Kirill Fedoseev 0241a264bb Documentation for upgradeability contracts (#332) 2019-12-27 15:52:03 +04:00
Kirill Fedoseev 1c8ee41fd4 Added Initialize functions access control modifier (#333) 2019-12-24 17:41:06 +03:00
Kirill Fedoseev 06e4565886 Tests to cover max number of signatures (#335)
* Fixed Message library bug
* Added tests for covering max number of signatures
* Increased heap memory limit for coverage script
2019-12-19 01:25:59 +03:00
Gerardo Nardelli 7970b909fc Add docs in Bytes library (#340) 2019-12-19 01:23:05 +03:00
Kirill Fedoseev c8e0f48bdf Consistent checks for setMaxPerTx and setMinPerTx (#330) 2019-12-16 23:01:47 +03:00
Kirill Fedoseev 1a7a91ee76 Hardcoded max validators limit (#331)
* Added internal contract limit on validators list size
* Updated validators contracts tests. Testing possible out-of-gas situation.
2019-12-14 01:20:03 +03:00
Kirill Fedoseev 443ad4c3db Possibility of increasing/decreasing allowance in ERC677 (#328)
* Added increaseAllowance and decreaseAllowance methods to ERC677 token contract
* Added simple test cases for updating allowance
2019-12-12 17:22:59 +03:00
Gerardo Nardelli 9504b832b1 Add support for two tokens in erc to native (#319) 2019-12-11 23:18:32 +03:00
Gerardo Nardelli 61d40db8e5 Update interfaces version (#314) 2019-11-07 04:12:33 +03:00
Gerardo Nardelli cc7718284d Add method to migrate from SCD to MCD (#311) 2019-11-05 09:07:19 +03:00
Gerardo Nardelli 7bf4e0629a Fix setTotalSpentPerDay called twice in AMB-ERC-TO-ERC (#309) 2019-10-30 22:16:28 +03:00
Gerardo Nardelli 39910b771b Add alternative receiver for transfer in erc20 to erc20 mode (#305)
* Add alternative receiver for transfer in erc20 to erc20 mode
* Check limits in foreign erc20-to-erc20 relayRequest
* Add relayRequest unit test for foreign erc20-to-erc20
* Update initialize parameters in foreign erc20-to-erc20
2019-10-25 15:33:40 +03:00
Gerardo Nardelli c0ee60806d Add alternative receiver for transfer in native to erc20 mode (#302) 2019-10-23 18:46:48 +03:00
Gerardo Nardelli 7d033bde33 Add alternative receiver for ERC677-to-ERC677 on top of AMB (#301)
* Add alternative receiver for amb-erc677-to-erc677
2019-10-17 21:34:16 +03:00
Gerardo Nardelli 36afcf0019 Add alternative receiver for transfer in erc20 to native mode (#294)
* Add alternative receiver for erc20-to-native transfers
* Check limits in foreign erc20-to-native relayRequest
* Update initialize parameters in foreign erc20-to-native
2019-10-17 17:06:09 +03:00
varasev 6de4ca4580 Simplify mintReward function (#304) 2019-10-12 06:32:14 +03:00
Max Alekseenko 165d828437 Use hex-identifiers directly instead of runtime hash calculation (#303) 2019-10-11 11:36:37 +03:00
Gerardo Nardelli f4ebf8b053 Remove deployed at block information in mediators contracts (#292) 2019-09-27 22:05:46 +03:00
Gerardo Nardelli f48c36647f Add methods to fix failed messages in erc677 to erc677 (#284) 2019-09-13 16:51:54 +03:00
Gerardo Nardelli de50f6f819 Add result information for AMB message call (#282)
* Remove duplicate IAMB
* Add message call status, data hash, receiver and sender in AMB message processor
* Index parameter of AMB message completed events
2019-09-11 17:41:30 +03:00
Gerardo Nardelli f7265bfee4 Update project dependencies to latest versions (#283)
* Update dependencies
* Apply prettier format
2019-09-10 00:27:45 +03:00
Gerardo Nardelli 83900ea971 Add erc677 to erc677 bridge on top of AMB (#273)
Closes #267
2019-09-09 16:07:24 +03:00
Gerardo Nardelli f6d275a0c1 Add arbitrary message bridging contracts (#77) 2019-09-05 20:13:52 +03:00
fbranciard 63c11df4b5 decimal shift feature (#268)
* implementation proposal for decimal shift feature issue #243
2019-09-03 19:51:20 +03:00
varasev 1841968dce Enhance setStakingContract function (#274)
* Enhance setStakingContract function
* Update poa20_test.js
2019-08-17 15:55:03 +03:00
Gerardo Nardelli 907bde5d21 Fix Travis coverage test run issue (#263)
* Fix FeeManagerMock directory
* Use web3 provider engine exposed by sol-coverage
2019-08-07 06:57:51 +02:00
Gerardo Nardelli 79de6a6319 Add missing events in initialize methods (#262) 2019-08-06 20:31:34 +02:00
Gerardo Nardelli 3a1d4d87b7 Move mappings key to constants (#261) 2019-08-05 22:10:53 +02:00
Gerardo Nardelli ab0e1c1ec4 Minor fixes on contracts (#260)
* Remove unused SafeMath in BasicForeignBridge
* Add name to mint parameters for consistency in IBurnableMintableERC677Token
* Fix return comment in version method of UpgradeabilityStorage
2019-08-01 23:35:56 +02:00
Gerardo Nardelli 8b3c898c38 Update ERC677Bridge to inherit from ERC677Receiver (#259) 2019-08-01 23:35:02 +02:00
Gerardo Nardelli 523112b97d Improve validator initialize gas usage (#257) 2019-08-01 14:47:57 +02:00
Gerardo Nardelli b20968c16c Check proxy upgrade contract code (#256)
* Remove isContract methods in favor of openzeppelin-solidity AddressUtils
* Check proxy implementation is contract
2019-08-01 14:44:51 +02:00
Gerardo Nardelli c28f956b6a Add param check in setDailyLimit and setExecutionDailyLimit methods (#255) 2019-08-01 14:40:29 +02:00
Gerardo Nardelli 7990addf17 Increase code coverage (#250)
* Refactor mocks contract structure
* Add solcov ignore on covered lines not reported
* Lint fixes
* Ignore abstract methods in coverage report
* Add unit test for not covered methods
2019-08-01 14:36:46 +02:00
Gerardo Nardelli 73c01b2d91 Allow fixAssetsAboveLimits to fix partial amounts (#247)
* Allow fixAssetsAboveLimits to fix partial amounts
* Emit event in fixAssetsAboveLimits
* Increase patch version in BasicBridge
2019-07-31 17:33:18 +02:00
Gerardo Nardelli 6a7e0d25ba Fix EternalStorageProxy inheritance (#254) 2019-07-31 08:32:37 +02:00
varasev 52ca7680c3 Remove redundant code from ERC677BridgeTokenRewardable contract (#249) 2019-07-31 08:31:52 +02:00
Gerardo Nardelli b66a678648 Fix random method visibility in BaseFeeManager (#246)
* Reduce random visibility
* Add FeeManagerMock to test random method
* Fix lint:sol:prettier:fix npm script
2019-07-25 22:55:57 +02:00
varasev 8a5d65241d Update ERC677BridgeTokenRewardable.sol (#242) 2019-07-24 22:37:36 +02:00
Gerardo Nardelli dc099b872b Add Solhint solidity linter (#240)
* Add solhint and prettier for solidity
* Apply prettier styles on contracts
* Fix solhint warnings
* Run js and solidity linter on travis
2019-07-22 07:19:24 +03:00
Gerardo Nardelli e8217f1276 Use external modifier instead of public (#236) 2019-07-17 15:03:02 +03:00