Commit 63f9526
feat: Add EVM Universal Adapter and remove deposit whitelist checks (#974)
* feat(SpokePool): Remove enabledDepositRoutes check for unsafeDeposit (#926)
* fix(ZkSync_SpokePool): Add __gap (#907)
* fix(ZkSync_SpokePool): Add __gap
This contract gets extended by the Lens_SpokePool which doesn't add any storage but we should add it in case a future variable gets added to the Lens_SpokePool
* Update ZkSync_SpokePool.json
* Add `OFTTransportAdapter` to support cross-chain token transfers of `USDT0` via `OFT` messaging protocol (#902)
* first draft of OFTTransportAdapter
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* update yarn.lock file
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* Revert "update yarn.lock file"
This reverts commit 4c216ea.
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* add yarn.lock compatible with master
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* polish OFTTransportAdapter, add OFT support to Arbitrum_Adapter on L1, and Arbitrum_SpokePool on L2
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* polish + fix missing approval
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* add context for dstEid
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* address most of the PR comments about contracts
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* update deploy scripts, add tests for OFT messaging, polish contracts
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* cleanup comments and extraneous log file
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* revert package.json prepublish change
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* generalize oft adapter to support multiple tokens. Introduce OFTAddressBook to support that. Update deploy / test scripts to reflect new functionality
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* add __gap to ArbitrumSpokePool, update stale comments on OFTTransportAdapter, update layouts of ArbitrumSpokePool and AlephZeroSpokePool
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* update some comments; adjust fee cap naming
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* address PR comments
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* address PR comments
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* fix deploy script, remove incorrect values from consts
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* improve comment
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* add oftFeeCap as a param to arbitrum adapter construction
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* move OFT functionality to SpokePool for easy further integration and removing boilerplate code
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* remove layerzero from foundry remappings
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* address licensing comment; add permalink to LZ OFT code on github
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* fix a couple of comment typos
Signed-off-by: Ihor Farion <ihor@umaproject.org>
---------
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* feat(SpokePoolPeriphery): Support multiple exchanges (#777)
* feat(SpokePoolPeriphery): Support multiple exchanges
Currently we can only initialize the periphery contract with a single exchange to swap with. This PR allows us to initialize it with multiple exchanges to swap with. Like before, these initial set of exchanges and function selectors cannot be changed post-initialization, which gives the user assurances.
* rename
* Update SpokeV3PoolPeriphery.sol
* Update SpokeV3PoolPeriphery.sol
* Update SpokeV3PoolPeriphery.sol
* Add unit tests
* Add whitelistExchanges only owner method
* rename
* Remove onlyOwner
* Remove whitelist of exchanges, add proxy to bypass approval abuse
Make user approve proxy contract so no one can use `exchange` + `routerCalldata` to steal their already approved funds via the `SpokePoolPeriphery`
* Add some protection to callSpokePoolPeriphery
* Only call swapAndBridge through proxy
* move periphery funcs into proxy
* Update SpokePoolV3Periphery.sol
* remove depositERC20
* Update SpokePoolV3Periphery.sol
* Add back safeTransferFron's to permit funcs
* Add unit tests that check if calling deposit and swapAndBridge with no value fails directly
* Add interfaces to make sure we don't add new functions as easily
* Add Create2Factory
* feat: add permit2 entrypoints to the periphery (#782)
* feat: add permit2 entrypoints to the periphery
Signed-off-by: Bennett <bennett@umaproject.org>
* Update test/evm/foundry/local/SpokePoolPeriphery.t.sol
* Update SpokePoolPeriphery.t.sol
* move permit2 to proxy
* fix permit2
Signed-off-by: bennett <bennett@umaproject.org>
* wip: swap arguments refactor
Signed-off-by: bennett <bennett@umaproject.org>
* implement isValidSignature
Signed-off-by: bennett <bennett@umaproject.org>
* 1271
Signed-off-by: bennett <bennett@umaproject.org>
* simplify isValidSignature
Signed-off-by: bennett <bennett@umaproject.org>
* rebase /programs on master
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
* clean up comments
* rebase programs
* fix: consolidate structs so that permit2 witnesses cover inputs
Signed-off-by: bennett <bennett@umaproject.org>
* begin permit2 unit tests
Signed-off-by: bennett <bennett@umaproject.org>
* rebase
* Update SpokePoolPeriphery.t.sol
* move type definitions to interface
Signed-off-by: bennett <bennett@umaproject.org>
* fix permit2 test
Signed-off-by: bennett <bennett@umaproject.org>
* transfer type tests
Signed-off-by: bennett <bennett@umaproject.org>
* rename EIP1271Signature to Permi2Approval
Signed-off-by: bennett <bennett@umaproject.org>
---------
Signed-off-by: Bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Co-authored-by: nicholaspai <9457025+nicholaspai@users.noreply.github.com>
Co-authored-by: nicholaspai <npai.nyc@gmail.com>
* feat: sponsored swap and deposits (#790)
* feat: add permit2 entrypoints to the periphery
Signed-off-by: Bennett <bennett@umaproject.org>
* Update test/evm/foundry/local/SpokePoolPeriphery.t.sol
* Update SpokePoolPeriphery.t.sol
* move permit2 to proxy
* fix permit2
Signed-off-by: bennett <bennett@umaproject.org>
* wip: swap arguments refactor
Signed-off-by: bennett <bennett@umaproject.org>
* implement isValidSignature
Signed-off-by: bennett <bennett@umaproject.org>
* 1271
Signed-off-by: bennett <bennett@umaproject.org>
* simplify isValidSignature
Signed-off-by: bennett <bennett@umaproject.org>
* rebase /programs on master
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
* clean up comments
* rebase programs
* feat: sponsored swap and deposits
Signed-off-by: bennett <bennett@umaproject.org>
* fix: consolidate structs so that permit2 witnesses cover inputs
Signed-off-by: bennett <bennett@umaproject.org>
* begin permit2 unit tests
Signed-off-by: bennett <bennett@umaproject.org>
* rebase
* Update SpokePoolPeriphery.t.sol
* move type definitions to interface
Signed-off-by: bennett <bennett@umaproject.org>
* fix permit2 test
Signed-off-by: bennett <bennett@umaproject.org>
* transfer type tests
Signed-off-by: bennett <bennett@umaproject.org>
* rename EIP1271Signature to Permi2Approval
Signed-off-by: bennett <bennett@umaproject.org>
* add mockERC20 which implements permit/receiveWithAuthorization
Signed-off-by: bennett <bennett@umaproject.org>
* add tests for permit, permit2, and receiveWithAuth swaps/deposits
Signed-off-by: bennett <bennett@umaproject.org>
* add tests for invalid witnesses
Signed-off-by: bennett <bennett@umaproject.org>
* factor out signature checking
Signed-off-by: bennett <bennett@umaproject.org>
---------
Signed-off-by: Bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Co-authored-by: nicholaspai <9457025+nicholaspai@users.noreply.github.com>
Co-authored-by: nicholaspai <npai.nyc@gmail.com>
* feat: Delete SwapAndBridge and add submission fees to gasless flow (#809)
* feat: add permit2 entrypoints to the periphery
Signed-off-by: Bennett <bennett@umaproject.org>
* Update test/evm/foundry/local/SpokePoolPeriphery.t.sol
* Update SpokePoolPeriphery.t.sol
* move permit2 to proxy
* fix permit2
Signed-off-by: bennett <bennett@umaproject.org>
* wip: swap arguments refactor
Signed-off-by: bennett <bennett@umaproject.org>
* implement isValidSignature
Signed-off-by: bennett <bennett@umaproject.org>
* 1271
Signed-off-by: bennett <bennett@umaproject.org>
* simplify isValidSignature
Signed-off-by: bennett <bennett@umaproject.org>
* rebase /programs on master
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
* clean up comments
* rebase programs
* feat: sponsored swap and deposits
Signed-off-by: bennett <bennett@umaproject.org>
* fix: consolidate structs so that permit2 witnesses cover inputs
Signed-off-by: bennett <bennett@umaproject.org>
* begin permit2 unit tests
Signed-off-by: bennett <bennett@umaproject.org>
* rebase
* Update SpokePoolPeriphery.t.sol
* move type definitions to interface
Signed-off-by: bennett <bennett@umaproject.org>
* fix permit2 test
Signed-off-by: bennett <bennett@umaproject.org>
* transfer type tests
Signed-off-by: bennett <bennett@umaproject.org>
* rename EIP1271Signature to Permi2Approval
Signed-off-by: bennett <bennett@umaproject.org>
* add mockERC20 which implements permit/receiveWithAuthorization
Signed-off-by: bennett <bennett@umaproject.org>
* add tests for permit, permit2, and receiveWithAuth swaps/deposits
Signed-off-by: bennett <bennett@umaproject.org>
* add tests for invalid witnesses
Signed-off-by: bennett <bennett@umaproject.org>
* feat: Delete SwapAndBridge and add submission fees to gasless flow
SwapAndBridge is to be replaced with SpokePoolV3Periphery
Gasless flows will require user to cover gas cost of whoever submits the transaction, but they can be set to 0 if the user wants to submit themselves.
* Internal refactor
* Update SpokePoolV3Periphery.sol
* Update PeripherySigningLib.sol
* Update SpokePoolV3Periphery.sol
* Update PeripherySigningLib.sol
---------
Signed-off-by: Bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Co-authored-by: Bennett <bennett@umaproject.org>
* Update SpokePoolV3Periphery.sol
* Update SpokePoolPeriphery.t.sol
* Move all comments to interface and use inherit doc
* fix: eip712 types and hashes (#821)
* refactor comments
Signed-off-by: bennett <bennett@umaproject.org>
* Create IERC20Auth.sol
* fix tests
* Comments
---------
Signed-off-by: Bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Co-authored-by: bmzig <57361391+bmzig@users.noreply.github.com>
Co-authored-by: Bennett <bennett@umaproject.org>
Co-authored-by: Dong-Ha Kim <dongha.kim210@gmail.com>
* Single AddressBook for all adapters (#919)
* use a single address book instead of 1 per adapter for oft / xerc20 storage needs
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* update comments and naming
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* add a gas optimization suggested in OFT PR
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* address PR comments and minor improvements
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* fix spokePool test
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* address PR comments
Signed-off-by: Ihor Farion <ihor@umaproject.org>
---------
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* feat(SpokePool): Remove enabledDepositRoutes check for unsafeDeposit
Allows Across to support inputTokens without enabling deposit routes for them, by forcing filler to take repayment of the token on the origin chain.
Enhances protection against gas cost griefing vector in when executing refund leaves, since removal of this enabledDepositRoutes check would allow someone to force the refund leaf executor to call a malicious ERC20.transfer() function
* add tests
* Make check unilateral
* Update SpokePool.Deposit.ts
* apply tests
* storage layouts
* merge conflicts
* Create SwapAndBridge.sol
* Fix conflicts
* Fix storage layouts
* Remove solana setEnableRoute special logic
* Remove MAX_ERC20_TRANSFER_GAS_COST
* Update SpokePool.sol
---------
Signed-off-by: Ihor Farion <ihor@umaproject.org>
Signed-off-by: Bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Co-authored-by: Ihor Farion <65650773+grasphoper@users.noreply.github.com>
Co-authored-by: bmzig <57361391+bmzig@users.noreply.github.com>
Co-authored-by: Bennett <bennett@umaproject.org>
Co-authored-by: Dong-Ha Kim <dongha.kim210@gmail.com>
* feat: Add universal adapters and spoke pools (#916)
* fix(ZkSync_SpokePool): Add __gap (#907)
* fix(ZkSync_SpokePool): Add __gap
This contract gets extended by the Lens_SpokePool which doesn't add any storage but we should add it in case a future variable gets added to the Lens_SpokePool
* Update ZkSync_SpokePool.json
* feat: Add SP1_Adapter and SP1_SpokePool
Can be used to relay messages from L1 to L2 spoke pools using SP1 + Helios
* Remove sp1 import
* Add simple test
* Re-use storage slots in HubPoolStore
- SP1_Adapter sets target == address(0) for relayRootBundle() calls to L2 as a gas-optimization
- Add contractAddress to ContractPublicValues
- Add deploy script with warning to NOT use create2 as we want each target spoke pool address to be unique
* Update SP1_SpokePool.sol
* Added replay protection
* Updated event
* Don't include nonce in data hash, emit data hash
* Store relayRootBundle calldata with no nonce for gas optimization
* Rename contract public values variables to make it clearer how storage slot proofs could be substituted for eth_call
* Add `OFTTransportAdapter` to support cross-chain token transfers of `USDT0` via `OFT` messaging protocol (#902)
* first draft of OFTTransportAdapter
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* update yarn.lock file
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* Revert "update yarn.lock file"
This reverts commit 4c216ea.
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* add yarn.lock compatible with master
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* polish OFTTransportAdapter, add OFT support to Arbitrum_Adapter on L1, and Arbitrum_SpokePool on L2
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* polish + fix missing approval
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* add context for dstEid
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* address most of the PR comments about contracts
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* update deploy scripts, add tests for OFT messaging, polish contracts
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* cleanup comments and extraneous log file
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* revert package.json prepublish change
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* generalize oft adapter to support multiple tokens. Introduce OFTAddressBook to support that. Update deploy / test scripts to reflect new functionality
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* add __gap to ArbitrumSpokePool, update stale comments on OFTTransportAdapter, update layouts of ArbitrumSpokePool and AlephZeroSpokePool
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* update some comments; adjust fee cap naming
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* address PR comments
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* address PR comments
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* fix deploy script, remove incorrect values from consts
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* improve comment
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* add oftFeeCap as a param to arbitrum adapter construction
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* move OFT functionality to SpokePool for easy further integration and removing boilerplate code
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* remove layerzero from foundry remappings
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* address licensing comment; add permalink to LZ OFT code on github
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* fix a couple of comment typos
Signed-off-by: Ihor Farion <ihor@umaproject.org>
---------
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* In HubPoolStore, store byes rather than a struct, add simple unit tests
* Update SP1_SpokePool.sol
* feat(SpokePoolPeriphery): Support multiple exchanges (#777)
* feat(SpokePoolPeriphery): Support multiple exchanges
Currently we can only initialize the periphery contract with a single exchange to swap with. This PR allows us to initialize it with multiple exchanges to swap with. Like before, these initial set of exchanges and function selectors cannot be changed post-initialization, which gives the user assurances.
* rename
* Update SpokeV3PoolPeriphery.sol
* Update SpokeV3PoolPeriphery.sol
* Update SpokeV3PoolPeriphery.sol
* Add unit tests
* Add whitelistExchanges only owner method
* rename
* Remove onlyOwner
* Remove whitelist of exchanges, add proxy to bypass approval abuse
Make user approve proxy contract so no one can use `exchange` + `routerCalldata` to steal their already approved funds via the `SpokePoolPeriphery`
* Add some protection to callSpokePoolPeriphery
* Only call swapAndBridge through proxy
* move periphery funcs into proxy
* Update SpokePoolV3Periphery.sol
* remove depositERC20
* Update SpokePoolV3Periphery.sol
* Add back safeTransferFron's to permit funcs
* Add unit tests that check if calling deposit and swapAndBridge with no value fails directly
* Add interfaces to make sure we don't add new functions as easily
* Add Create2Factory
* feat: add permit2 entrypoints to the periphery (#782)
* feat: add permit2 entrypoints to the periphery
Signed-off-by: Bennett <bennett@umaproject.org>
* Update test/evm/foundry/local/SpokePoolPeriphery.t.sol
* Update SpokePoolPeriphery.t.sol
* move permit2 to proxy
* fix permit2
Signed-off-by: bennett <bennett@umaproject.org>
* wip: swap arguments refactor
Signed-off-by: bennett <bennett@umaproject.org>
* implement isValidSignature
Signed-off-by: bennett <bennett@umaproject.org>
* 1271
Signed-off-by: bennett <bennett@umaproject.org>
* simplify isValidSignature
Signed-off-by: bennett <bennett@umaproject.org>
* rebase /programs on master
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
* clean up comments
* rebase programs
* fix: consolidate structs so that permit2 witnesses cover inputs
Signed-off-by: bennett <bennett@umaproject.org>
* begin permit2 unit tests
Signed-off-by: bennett <bennett@umaproject.org>
* rebase
* Update SpokePoolPeriphery.t.sol
* move type definitions to interface
Signed-off-by: bennett <bennett@umaproject.org>
* fix permit2 test
Signed-off-by: bennett <bennett@umaproject.org>
* transfer type tests
Signed-off-by: bennett <bennett@umaproject.org>
* rename EIP1271Signature to Permi2Approval
Signed-off-by: bennett <bennett@umaproject.org>
---------
Signed-off-by: Bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Co-authored-by: nicholaspai <9457025+nicholaspai@users.noreply.github.com>
Co-authored-by: nicholaspai <npai.nyc@gmail.com>
* feat: sponsored swap and deposits (#790)
* feat: add permit2 entrypoints to the periphery
Signed-off-by: Bennett <bennett@umaproject.org>
* Update test/evm/foundry/local/SpokePoolPeriphery.t.sol
* Update SpokePoolPeriphery.t.sol
* move permit2 to proxy
* fix permit2
Signed-off-by: bennett <bennett@umaproject.org>
* wip: swap arguments refactor
Signed-off-by: bennett <bennett@umaproject.org>
* implement isValidSignature
Signed-off-by: bennett <bennett@umaproject.org>
* 1271
Signed-off-by: bennett <bennett@umaproject.org>
* simplify isValidSignature
Signed-off-by: bennett <bennett@umaproject.org>
* rebase /programs on master
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
* clean up comments
* rebase programs
* feat: sponsored swap and deposits
Signed-off-by: bennett <bennett@umaproject.org>
* fix: consolidate structs so that permit2 witnesses cover inputs
Signed-off-by: bennett <bennett@umaproject.org>
* begin permit2 unit tests
Signed-off-by: bennett <bennett@umaproject.org>
* rebase
* Update SpokePoolPeriphery.t.sol
* move type definitions to interface
Signed-off-by: bennett <bennett@umaproject.org>
* fix permit2 test
Signed-off-by: bennett <bennett@umaproject.org>
* transfer type tests
Signed-off-by: bennett <bennett@umaproject.org>
* rename EIP1271Signature to Permi2Approval
Signed-off-by: bennett <bennett@umaproject.org>
* add mockERC20 which implements permit/receiveWithAuthorization
Signed-off-by: bennett <bennett@umaproject.org>
* add tests for permit, permit2, and receiveWithAuth swaps/deposits
Signed-off-by: bennett <bennett@umaproject.org>
* add tests for invalid witnesses
Signed-off-by: bennett <bennett@umaproject.org>
* factor out signature checking
Signed-off-by: bennett <bennett@umaproject.org>
---------
Signed-off-by: Bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Co-authored-by: nicholaspai <9457025+nicholaspai@users.noreply.github.com>
Co-authored-by: nicholaspai <npai.nyc@gmail.com>
* feat: Delete SwapAndBridge and add submission fees to gasless flow (#809)
* feat: add permit2 entrypoints to the periphery
Signed-off-by: Bennett <bennett@umaproject.org>
* Update test/evm/foundry/local/SpokePoolPeriphery.t.sol
* Update SpokePoolPeriphery.t.sol
* move permit2 to proxy
* fix permit2
Signed-off-by: bennett <bennett@umaproject.org>
* wip: swap arguments refactor
Signed-off-by: bennett <bennett@umaproject.org>
* implement isValidSignature
Signed-off-by: bennett <bennett@umaproject.org>
* 1271
Signed-off-by: bennett <bennett@umaproject.org>
* simplify isValidSignature
Signed-off-by: bennett <bennett@umaproject.org>
* rebase /programs on master
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
* clean up comments
* rebase programs
* feat: sponsored swap and deposits
Signed-off-by: bennett <bennett@umaproject.org>
* fix: consolidate structs so that permit2 witnesses cover inputs
Signed-off-by: bennett <bennett@umaproject.org>
* begin permit2 unit tests
Signed-off-by: bennett <bennett@umaproject.org>
* rebase
* Update SpokePoolPeriphery.t.sol
* move type definitions to interface
Signed-off-by: bennett <bennett@umaproject.org>
* fix permit2 test
Signed-off-by: bennett <bennett@umaproject.org>
* transfer type tests
Signed-off-by: bennett <bennett@umaproject.org>
* rename EIP1271Signature to Permi2Approval
Signed-off-by: bennett <bennett@umaproject.org>
* add mockERC20 which implements permit/receiveWithAuthorization
Signed-off-by: bennett <bennett@umaproject.org>
* add tests for permit, permit2, and receiveWithAuth swaps/deposits
Signed-off-by: bennett <bennett@umaproject.org>
* add tests for invalid witnesses
Signed-off-by: bennett <bennett@umaproject.org>
* feat: Delete SwapAndBridge and add submission fees to gasless flow
SwapAndBridge is to be replaced with SpokePoolV3Periphery
Gasless flows will require user to cover gas cost of whoever submits the transaction, but they can be set to 0 if the user wants to submit themselves.
* Internal refactor
* Update SpokePoolV3Periphery.sol
* Update PeripherySigningLib.sol
* Update SpokePoolV3Periphery.sol
* Update PeripherySigningLib.sol
---------
Signed-off-by: Bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Co-authored-by: Bennett <bennett@umaproject.org>
* Update SpokePoolV3Periphery.sol
* Update SpokePoolPeriphery.t.sol
* Move all comments to interface and use inherit doc
* fix: eip712 types and hashes (#821)
* refactor comments
Signed-off-by: bennett <bennett@umaproject.org>
* Create IERC20Auth.sol
* fix tests
* Comments
---------
Signed-off-by: Bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Co-authored-by: bmzig <57361391+bmzig@users.noreply.github.com>
Co-authored-by: Bennett <bennett@umaproject.org>
Co-authored-by: Dong-Ha Kim <dongha.kim210@gmail.com>
* Single AddressBook for all adapters (#919)
* use a single address book instead of 1 per adapter for oft / xerc20 storage needs
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* update comments and naming
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* add a gas optimization suggested in OFT PR
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* address PR comments and minor improvements
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* fix spokePool test
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* address PR comments
Signed-off-by: Ihor Farion <ihor@umaproject.org>
---------
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* Rename to universal adapter
* Update UniversalEventInclusionProof_Adapter.sol
* Add R0_SpokePool capable of receiving events via event inclusion proofs
* Update R0Steel.sol
* Steel light client commitments
* Update R0_SpokePool.sol
* read storage slots from Helios
* Change Steel call to more likely interface validateCommitment
* Link Steel to SP1Helios light client
* Update HeliosSteelValidator.sol
* rename to IHelios
* Pass in Journal instead of bytes; use eventKey as replay protection key.
* Add OFT adapter to L2 spoke pools
* Add OFT adapter to Universal adapter
* Replace OFT/HYP with CCTP
* Update SP1_SpokePool.t.sol
* Rebase to master
* fix
* Add hub pool store deploy script
* Update Journal params
* Update SP1_SpokePool.sol
* remove verifier from SP1SpokePool
* update logs
* Update SP1_SpokePool.sol
* Rename Sp1SpokePool to StorageProofSpokePool, remove R0 Spoke
* use challenge period timestamp as nonce in storage proof adapter
* Update UniversalStorageProof_SpokePool.sol
* Use slotKey as data hash
* Add test to spoke pool about dataHash
* Allow admin root bundles in between livenesses
* Add checks for admin root bundle
* Add fallback function to spoke pool
* move HubPoolStore to utilities folder
* Remove challenge period timestamp check
* Adds more robust isAdminRootBundle check, plus unit tests
We know an admin root bundle is definitely being sent whenever the pending root bundle is empty or in liveness period, or the root bundle calldata is identical to the pending root bundle.
In the edge case where an admin root bundle is identicl to the pending root bundle and that pending root bundle has passed liveness, we treat the admin bundle as a normal root bundle, which is pretty much harmless
* add placeholder unit tests
* Update IHelios.sol
* Update HubPoolStore.sol
* Finish universal adapter tests
* Store bytes32 at relayAdminFunctionCalldata
* Finish tests
* Use uint256 nonce as key in HubPoolStore
* rename deploy scripts
* Change isAdminSender check
* Add helios.headTimestamp check
* Compute slot key in contract to improve UX
* Update checkStorageLayout.sh
* Delete UniversalStorageProof_SpokePool.json
* Delete UniversalStorageProof_SpokePool.json
* Rename shorter
* Update utils.hre.ts
* Update admin messaging
* Add storage layout
* fix
---------
Signed-off-by: Ihor Farion <ihor@umaproject.org>
Signed-off-by: Bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Co-authored-by: Ihor Farion <65650773+grasphoper@users.noreply.github.com>
Co-authored-by: bmzig <57361391+bmzig@users.noreply.github.com>
Co-authored-by: Bennett <bennett@umaproject.org>
Co-authored-by: Dong-Ha Kim <dongha.kim210@gmail.com>
* Rename test file to .t
* improve: Add Security contact to contracts (#951)
* improve(Universal_SpokePool): Clarify comments + variable names (#952)
* improve(Universal_SpokePool): Clarify comments
* improve(UniversalSpokePool): Clarify variable names
* Deploy HubPoolStore and UniversalAdapter to Ethereum
* Add some WIP deployments - still need official Helios contract
* Bump constants
* Make DEPRECATED_enabledDepositRoutes private
* Update yarn.lock
* Update upgradeSpokePool.ts
* Update package.json
* Update SpokePool.Fixture.ts
* Deploy new impl
* Update package.json
---------
Signed-off-by: Ihor Farion <ihor@umaproject.org>
Signed-off-by: Bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Co-authored-by: Ihor Farion <65650773+grasphoper@users.noreply.github.com>
Co-authored-by: bmzig <57361391+bmzig@users.noreply.github.com>
Co-authored-by: Bennett <bennett@umaproject.org>
Co-authored-by: Dong-Ha Kim <dongha.kim210@gmail.com>1 parent 1c4ad22 commit 63f9526
File tree
61 files changed
+6996
-298
lines changed- contracts
- chain-adapters
- utilities
- external/interfaces
- interfaces
- test
- deployments
- bsc
- solcInputs
- mainnet
- solcInputs
- deploy
- scripts
- storage-layouts
- tasks
- test/evm
- foundry/local
- hardhat
- chain-adapters
- chain-specific-spokepools
- fixtures
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
61 files changed
+6996
-298
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | 312 | | |
328 | 313 | | |
329 | 314 | | |
| |||
1309 | 1294 | | |
1310 | 1295 | | |
1311 | 1296 | | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
1316 | 1297 | | |
1317 | 1298 | | |
1318 | 1299 | | |
| |||
1398 | 1379 | | |
1399 | 1380 | | |
1400 | 1381 | | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | 1382 | | |
1405 | 1383 | | |
1406 | 1384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 44 | | |
48 | 45 | | |
49 | 46 | | |
| |||
56 | 53 | | |
57 | 54 | | |
58 | 55 | | |
59 | | - | |
60 | | - | |
61 | 56 | | |
62 | 57 | | |
63 | 58 | | |
| |||
95 | 90 | | |
96 | 91 | | |
97 | 92 | | |
98 | | - | |
99 | 93 | | |
100 | 94 | | |
101 | 95 | | |
| |||
111 | 105 | | |
112 | 106 | | |
113 | 107 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 108 | + | |
125 | 109 | | |
126 | 110 | | |
127 | 111 | | |
| |||
159 | 143 | | |
160 | 144 | | |
161 | 145 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | 146 | | |
0 commit comments