- 
                Notifications
    You must be signed in to change notification settings 
- Fork 75
feat: address to bytes32 contract changes #650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
        
          
                contracts/SpokePool.sol
              
                Outdated
          
        
      | // Check that deposit route is enabled for the input token. There are no checks required for the output token | ||
| // which is pulled from the relayer at fill time and passed through this contract atomically to the recipient. | ||
| if (!enabledDepositRoutes[inputToken][destinationChainId]) revert DisabledRoute(); | ||
| if (!enabledDepositRoutes[inputToken.toAddress()][destinationChainId]) revert DisabledRoute(); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we changed the data structure to:
mapping(bytes32 => mapping(uint256 => bool)) public enabledDepositRoutes;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think yes, as that would avoid unnecessary conversion, and it would still use the same storage slot for the mapped values.
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
        
          
                contracts/SpokePool.sol
              
                Outdated
          
        
      | ) public override nonReentrant { | ||
| _verifyUpdateV3DepositMessage( | ||
| depositor, | ||
| depositor.toAddress(), | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe also update _verifyUpdateV3DepositMessage interface so we don't need to translate to address here
| pragma solidity ^0.8.0; | ||
|  | ||
| library Bytes32ToAddress { | ||
| function toAddress(bytes32 _bytes32) internal pure returns (address) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this also check that highest 12 bytes are all 0? Also, we should avoid using this method in comparisons where possible and convert the other value to bytes32 first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think that will get too expensive gas-cost wise? Maybe we can have safeToAddress and unsafeToAddress and use them depending on the context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra gas consumption associated with this check, this accounts for all the toAddress() calls in each of this functions:
depositV3: +128 gas units (from 100832 to 100960)
fillV3Relay: +156 gas units (from 109071 to 109227)
I think it's negligable, wdyt?
        
          
                contracts/SpokePool.sol
              
                Outdated
          
        
      | V3RelayData memory relayData = slowFillLeaf.relayData; | ||
|  | ||
| _preExecuteLeafHook(relayData.outputToken); | ||
| _preExecuteLeafHook(relayData.outputToken.toAddress()); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we also change this _preExecuteLeafHook
| // token for the input token. By using this magic value, off-chain validators do not have to keep | ||
| // this event in their lookback window when querying for expired deposts. | ||
| uint32 public constant INFINITE_FILL_DEADLINE = type(uint32).max; | ||
| /**************************************** | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you might not have meant to modify bits like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I have some issues with the formatter, I will try to fix my formatter or manually revert this changes
| } | ||
|  | ||
| library AddressToBytes32 { | ||
| function toBytes32(address _address) internal pure returns (bytes32) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this. we should re-use it here as well:
| function _addressToBytes32(address addr) internal pure returns (bytes32) { | 
| { | ||
| using SafeERC20Upgradeable for IERC20Upgradeable; | ||
| using AddressLibUpgradeable for address; | ||
| using Bytes32ToAddress for bytes32; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is actually pretty clean. good job.
Co-authored-by: Reinis Martinsons <77973553+Reinis-FRP@users.noreply.github.com>
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
…otocol/contracts into pablo/address-to-bytes32
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
| */ | ||
| /// @custom:audit FOLLOWING STRUCT TO BE DEPRECATED | ||
|  | ||
| struct RelayExecutionInfo { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This data isn't actually used by the contracts and is only kept to give third-parties some way of scraping pre-v3 events. Updating the types here would defeat that purpose. But...it's been >6 months since any of these types/events were actually supported by the contracts. @nicholaspai @mrice32 Thoughts on just removing them?
Speculative PR here: #663
| msg.sender.toBytes32(), | ||
| recipient.toBytes32(), | ||
| originToken.toBytes32(), | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good; deposit() should ultimately be removed so there's no need for it to actually support bridging to SVM chains. Limiting it in this way is actually a good carrot to encourage people to get off deposit().
| { | ||
| // Exclusivity deadline is inclusive and is the latest timestamp that the exclusive relayer has sole right | ||
| // to fill the relay. | ||
| if ( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a PR here that factors this out to a function. Seems like that will go in, so it might be worth considering that here (it should permit a slight simplification of your change).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @pxrl. I can merge your changes once you merge them.
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
| { name: "originChainId", type: "uint256" }, | ||
| { name: "updatedOutputAmount", type: "uint256" }, | ||
| { name: "updatedRecipient", type: "address" }, | ||
| { name: "updatedRecipient", type: "bytes32" }, | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
        
          
                contracts/SpokePool.sol
              
                Outdated
          
        
      | bytes32[] memory proof | ||
| ) public payable virtual override nonReentrant { | ||
| _preExecuteLeafHook(relayerRefundLeaf.l2TokenAddress); | ||
| _preExecuteLeafHook(relayerRefundLeaf.l2TokenAddress.toBytes32()); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we cannot change SpokePoolInterface.RelayerRefundLeaf interface to use bytes32 for l2TokenAddress?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kept it to prevent extra castings in the _distributeRelayerFunds function but you are right, I think these are negligible so I've updated the interface now.
| */ | ||
| contract Linea_SpokePool is SpokePool { | ||
| using SafeERC20 for IERC20; | ||
| using AddressToBytes32 for address; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: shall we use explicit imports? I see that recent commits have been moving in that direction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @Reinis-FRP What do you mean here?
These are imported in the SpokePool.sol and used here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, meant using curly braces to explicitly state what contracts/libraries from source files we are importing
        
          
                contracts/SpokePool.sol
              
                Outdated
          
        
      | ); | ||
| } | ||
|  | ||
| function _verifyUpdateV3DepositMessage( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could add comment why we need this internal overload and cannot convert to address at the outer function. I assume this has to do with different hash. Alternatively, we could change the interface of _verifyUpdateV3DepositMessage to include hash type so that outer method could pass it through without needing overload on internal method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my answer here: https://github.com/across-protocol/contracts/pull/650/files#r1808446450
        
          
                contracts/SpokePool.sol
              
                Outdated
          
        
      | bytes memory updatedMessage, | ||
| bytes memory depositorSignature | ||
| ) internal view { | ||
| _verifyUpdateV3DepositMessageHelper( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need this extra helper? might be simpler to change the interface of _verifyUpdateV3DepositMessage to accept additional hashType parameter (see comment above).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_verifyUpdateV3DepositMessage is also overloaded with 2 implementations, one for address and one for bytes32. I added the helper to reduce code duplication. Without it each _verifyUpdateV3DepositMessage would need to implement _hashTypedDataV4(keccak256(abi.encode... having this logic duplicated. Does it make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant avoiding overload in _verifyUpdateV3DepositMessage and let its caller in the external function to do address->bytes32 conversion when needed, as well as pass the relevant hashType from constants.
| /// @dev The contract address that the order is meant to be settled by. | ||
| /// Fillers send this order to this contract address on the origin chain | ||
| address originSettler; | ||
| bytes32 originSettler; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this require any changes in ERC proposal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. the ERC itself. is being updated by Matt and others.
| ) external payable; | ||
|  | ||
| function depositV3( | ||
| address depositor, | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to support backwards overload in the interface?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I've removed them from the interface 👍
| */ | ||
| function _transferUsdc(address to, uint256 amount) internal { | ||
| _transferUsdc(_addressToBytes32(to), amount); | ||
| _transferUsdc(to.toBytes32(), amount); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat that we can reuse the lib here :)
| * If the depositor is a contract, it should implement EIP1271 to sign as a contract. See `_verifyUpdateV3DepositMessage()` | ||
| * for more details on how the signature should be constructed. | ||
| */ | ||
| function speedUpV3Deposit( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: is it useful to have both this address and bytes versions? do we expect intergrators (UIs) to call the address  or bytes version?  the context of my question is that seeing we wont support speedup on svm domain (requiring bytes32) is it useful to have this?
I think yes: we should have it, as we can then support it going forward and be consistent with the interface changes , but just through I'd bring it up to see what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so! But open to remove them if someone disagrees.
| DepositData calldata depositData, | ||
| IERC20 _swapToken, | ||
| IERC20 _acrossInputToken | ||
| bytes32 _swapToken, | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is not your change, but its funny to me that these two variables are _ and the others are not.
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com>
* feat(chain-adapters): add solana adapter (#641) * feat(chain-adapters): add solana adapter Signed-off-by: Reinis Martinsons <reinis@umaproject.org> * fix: comments Signed-off-by: Reinis Martinsons <reinis@umaproject.org> * test: solana adapter Signed-off-by: Reinis Martinsons <reinis@umaproject.org> * Update contracts/chain-adapters/Solana_Adapter.sol Co-authored-by: Chris Maree <christopher.maree@gmail.com> * fix: do not hash bytes32 svm address Signed-off-by: Reinis Martinsons <reinis@umaproject.org> --------- Signed-off-by: Reinis Martinsons <reinis@umaproject.org> Co-authored-by: Chris Maree <christopher.maree@gmail.com> * feat: address to bytes32 contract changes (#650) * feat: add address to bytes32 contract changes Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * refactor: remove todos Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * refactor: imports Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * Update contracts/SpokePool.sol Co-authored-by: Reinis Martinsons <77973553+Reinis-FRP@users.noreply.github.com> * feat: bytes 32 comparisons Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * refactor: format code Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * fix: tests Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * feat: bytes 32 check Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * fix: ts Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * feat: reuse lib in cctp adapter Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * feat: _preExecuteLeafHook Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * refactor: comments Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * feat: _verifyUpdateV3DepositMessage Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * feat: backward compatibility Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * feat: backwards compatibility tests Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * feat: change comparison casting address bytes32 Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * fix: test Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * feat: merkle tree leaf to bytes32 Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * test: leaf type update fixes Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * feat: remove helper Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> --------- Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> Co-authored-by: Reinis Martinsons <77973553+Reinis-FRP@users.noreply.github.com> * feat: Add relayer repayment address (#653) * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> --------- Signed-off-by: chrismaree <christopher.maree@gmail.com> * fix: clean up cast utilities (#676) * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> --------- Signed-off-by: chrismaree <christopher.maree@gmail.com> * feat: update spokepool relayer refund to handle blocked transfers (#675) Co-authored-by: Matt Rice <matthewcrice32@gmail.com> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * fix(evm): merkle tree tests bytes32 Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * feat(svm): svm-dev fixes from review (#727) * refactor(svm): reuse bytes32 to address lib in svm adapter Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * feat: custom errors Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * feat: fix test Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> --------- Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * test: fix forge tests Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * proposal: ensure that EVM errors are always consistant on underflows (#720) * feat: revert bytes32 conversion for internal functions (#755) * Discard changes to contracts/Ovm_SpokePool.sol * fix: stack too deep (#766) * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * Revert "feat: update depositor to bytes32" (#764) This reverts commit 85f0001. * Discard changes to contracts/PolygonZkEVM_SpokePool.sol * Discard changes to contracts/Polygon_SpokePool.sol * fix: make event case consistant between evm & svm (#760) * feat(SpokePool): Remove depositExclusive (#642) This function was used to express exclusivity as a period but its no longer useful since depositV3 now allows caller to express exclusivityPeriod instead of exclusivityDeadline * feat: Introduce opt-in deterministic relay data hashes (again) (#639) * Revert "feat(SpokePool): Introduce opt-in deterministic relay data hashes (#583)" This reverts commit 9d21d1b. * Reapply "feat(SpokePool): Introduce opt-in deterministic relay data hashes (#583)" This reverts commit d363bf0. * add deposit nonces to 7683 Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * fix Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * WIP Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * feat(SpokePool): Introduce opt-in deterministic relay data hashes (#583) * fix(SpokePool): Apply exclusivity consistently The new relative exclusivity check has not been propagated to fillV3RelayWithUpdatedDeposit(). Identified via test case failures in the relayer. Signed-off-by: Paul <108695806+pxrl@users.noreply.github.com> * Also check on slow fill requests * Update contracts/SpokePool.sol * lint * Update * Add pure * Fix * Add tests * improve(SpokePool): _depositV3 interprets `exclusivityParameter` as 0, an offset, or a timestamp There should be a way for the deposit transaction to remove chain re-org risk affecting the block.timestamp by allowing the caller to set a fixed `exclusivityDeadline` value. This supports the existing behavior where the `exclusivityDeadline` is always emitted as its passed in. The new behavior is that if the `exclusivityParameter`, which replaces the `exclusivityDeadlineOffset` parameter, is 0 or greater than 1 year in seconds, then the `exclusivityDeadline` is equal to this parameter. Otherwise, its interpreted by `_depositV3()` as an offset. The offset would be useful in cases where the origin chain will not re-org, for example. * Update SpokePool.sol * Update SpokePool.Relay.ts * Update SpokePool.SlowRelay.ts * Update contracts/SpokePool.sol Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com> * Update SpokePool.sol * Update contracts/SpokePool.sol * rebase * Update SpokePool.sol * Revert "Merge branch 'npai/exclusivity-switch' into mrice32/deterministic-new" This reverts commit 2432944, reversing changes made to 6fe3534. * Revert "Merge branch 'npai/exclusivity-switch' into mrice32/deterministic-new" This reverts commit 2432944, reversing changes made to 6fe3534. * revert * Update SpokePool.sol * Fix * Update SpokePool.sol Co-authored-by: Chris Maree <christopher.maree@gmail.com> * WIP * WIP * wip * Update SpokePool.Relay.ts * Fix * Update SpokePool.sol * Update SpokePool.sol --------- Signed-off-by: Matt Rice <matthewcrice32@gmail.com> Signed-off-by: Paul <108695806+pxrl@users.noreply.github.com> Co-authored-by: nicholaspai <npai.nyc@gmail.com> Co-authored-by: nicholaspai <9457025+nicholaspai@users.noreply.github.com> Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com> Co-authored-by: Chris Maree <christopher.maree@gmail.com> * docs: fix comment duplication (#775) Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> * fix: emit hashed message in evm fill events (#772) * fix: emit hashed message in evm fill events Signed-off-by: Reinis Martinsons <reinis@umaproject.org> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * fix: linting Signed-off-by: Reinis Martinsons <reinis@umaproject.org> --------- Signed-off-by: Reinis Martinsons <reinis@umaproject.org> Signed-off-by: chrismaree <christopher.maree@gmail.com> Co-authored-by: chrismaree <christopher.maree@gmail.com> * fix: linting Signed-off-by: Reinis Martinsons <reinis@umaproject.org> * feat: improve _getV3RelayHash method (#779) * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * WIP Signed-off-by: chrismaree <christopher.maree@gmail.com> * fix: Address Storage layout issue in CI (#836) * add new storage layout Signed-off-by: Chris Maree <christopher.maree@gmail.com> * Discard changes to storage-layouts/PolygonZkEVM_SpokePool.json * Discard changes to storage-layouts/Redstone_SpokePool.json * Discard changes to storage-layouts/Scroll_SpokePool.json * Discard changes to storage-layouts/Zora_SpokePool.json * Discard changes to storage-layouts/WorldChain_SpokePool.json * add new storage layout Signed-off-by: Chris Maree <christopher.maree@gmail.com> --------- Signed-off-by: Chris Maree <christopher.maree@gmail.com> * fix(evm): C01 - Address incorrect use of relayerRefund over msg.sender in claimRelayerRefund function (#826) Signed-off-by: Chris Maree <christopher.maree@gmail.com> * fix(evm): L01 - Update function from public to external (#827) Signed-off-by: Chris Maree <christopher.maree@gmail.com> * fix(evm): L03 - Address incorrect Right Shift in AddressConverters Lib (#828) Signed-off-by: Chris Maree <christopher.maree@gmail.com> * fix(evm): L04 - Remove repeated function (#829) Signed-off-by: Chris Maree <christopher.maree@gmail.com> * fix(evm): N01 - Add missing docstring for repaymentAddress (#830) Signed-off-by: Chris Maree <christopher.maree@gmail.com> * fix(evm): N02 - Address typographical Errors in spoke pool (#831) * WIP Signed-off-by: Chris Maree <christopher.maree@gmail.com> * Update contracts/SpokePool.sol --------- Signed-off-by: Chris Maree <christopher.maree@gmail.com> Co-authored-by: Matt Rice <matthewcrice32@gmail.com> * feat: update function and event naming for backwards compatibility (#805) * WIP Signed-off-by: Chris Maree <chris@mac.speedport.ip> * WIP Signed-off-by: Chris Maree <chris@mac.speedport.ip> * WIP Signed-off-by: Chris Maree <christopher.maree@gmail.com> * WIP Signed-off-by: Chris Maree <christopher.maree@gmail.com> * refined overfloaded function structure Signed-off-by: Chris Maree <christopher.maree@gmail.com> * Discard changes to test/evm/hardhat/chain-specific-spokepools/Polygon_SpokePool.ts * WIP Signed-off-by: Chris Maree <christopher.maree@gmail.com> * WIP Signed-off-by: Chris Maree <christopher.maree@gmail.com> * WIP Signed-off-by: Chris Maree <christopher.maree@gmail.com> * WIP Signed-off-by: Chris Maree <christopher.maree@gmail.com> * WIP Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * WIP Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * WIP Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * WIP Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * update event names Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * fix tests Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * update function Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * update naming Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * drop unintended svm changes Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * WIP Signed-off-by: Chris Maree <christopher.maree@gmail.com> * WIP Signed-off-by: Chris Maree <christopher.maree@gmail.com> * WIP Signed-off-by: Chris Maree <christopher.maree@gmail.com> * feat: extend current add-legacy-fill-method-svm-dev (#864) * WIP Signed-off-by: Chris Maree <christopher.maree@gmail.com> --------- Signed-off-by: Chris Maree <chris@mac.speedport.ip> Signed-off-by: Chris Maree <christopher.maree@gmail.com> Signed-off-by: Matt Rice <matthewcrice32@gmail.com> Co-authored-by: Chris Maree <chris@mac.speedport.ip> Co-authored-by: Matt Rice <matthewcrice32@gmail.com> * fix: update legacy FilledV3Relay event to match old event signature (#873) * fix: update legacy event to match old event signature Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * WIP Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * WIP Signed-off-by: Matt Rice <matthewcrice32@gmail.com> --------- Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * fix: use entire message when calculating relay hash for evm chains (#867) * fix: hash entire message when calculating relay hash for evm chains Signed-off-by: bennett <bennett@umaproject.org> * make getV3RelayHash public Signed-off-by: bennett <bennett@umaproject.org> * update fixture with relay hash change Signed-off-by: bennett <bennett@umaproject.org> --------- Signed-off-by: bennett <bennett@umaproject.org> * feat(SpokePool): Permit historical fillDeadline on deposit (#870) * feat(SpokePool): Permit historical fillDeadline on deposit This removes a sharp edge for pre-fill deposits, where the deposit comes after the fill. Permitting a historical fillDeadline gives more flexibility to the relayer around when they submit the deposit on the origin chain. * fix test * restore test * Bump approvals * fix: add check to ensure depositor is a valid EVM address (#874) Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * fix(evm): L02 _destinationSettler Can Return Zero Address (#834) * fix: L02 _destinationSettler Can Return Zero Address * updated implementation to be in internal function Signed-off-by: Chris Maree <christopher.maree@gmail.com> --------- Signed-off-by: Chris Maree <christopher.maree@gmail.com> Co-authored-by: Chris Maree <christopher.maree@gmail.com> Co-authored-by: nicholaspai <npai.nyc@gmail.com> * improve: Verify relay hashes are the same pre and post upgrade (#878) * fix: hash entire message when calculating relay hash for evm chains Signed-off-by: bennett <bennett@umaproject.org> * make getV3RelayHash public Signed-off-by: bennett <bennett@umaproject.org> * update fixture with relay hash change Signed-off-by: bennett <bennett@umaproject.org> * improve: Verify relay hashes are the same pre and post upgrade Adds a simple unit test to check that the same data hash is constructed * fix * Update test/evm/hardhat/MerkleLib.Proofs.ts * Update test/evm/hardhat/SpokePool.Relay.ts * Update SpokePool.Relay.ts --------- Signed-off-by: bennett <bennett@umaproject.org> Co-authored-by: bennett <bennett@umaproject.org> * Fix merge conflict that removed exclusivity parameter * Fix SwapAndBridge merge conflict * reorder stack variables Signed-off-by: bennett <bennett@umaproject.org> * export test functions Signed-off-by: bennett <bennett@umaproject.org> * bump package Signed-off-by: bennett <bennett@umaproject.org> * fix: simpler solution to stack too deep --------- Signed-off-by: Reinis Martinsons <reinis@umaproject.org> Signed-off-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> Signed-off-by: chrismaree <christopher.maree@gmail.com> Signed-off-by: Matt Rice <matthewcrice32@gmail.com> Signed-off-by: Paul <108695806+pxrl@users.noreply.github.com> Signed-off-by: Chris Maree <christopher.maree@gmail.com> Signed-off-by: Chris Maree <chris@mac.speedport.ip> Signed-off-by: bennett <bennett@umaproject.org> Co-authored-by: Reinis Martinsons <77973553+Reinis-FRP@users.noreply.github.com> Co-authored-by: Pablo Maldonado <pablomaldonadoturci@gmail.com> Co-authored-by: Matt Rice <matthewcrice32@gmail.com> Co-authored-by: nicholaspai <9457025+nicholaspai@users.noreply.github.com> Co-authored-by: nicholaspai <npai.nyc@gmail.com> Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com> Co-authored-by: Reinis Martinsons <reinis@umaproject.org> Co-authored-by: Chris Maree <chris@mac.speedport.ip> Co-authored-by: bmzig <57361391+bmzig@users.noreply.github.com> Co-authored-by: bennett <bennett@umaproject.org>
Changes proposed in this PR: