Skip to content
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

Remove dupe FastHypERC20 for verifiable contracts #3091

Merged
merged 5 commits into from
Jan 25, 2024
Merged

Conversation

yorhodes
Copy link
Member

@yorhodes yorhodes commented Dec 20, 2023

Description

Duplicate FastHypERC20 implementations got into main following the v3 merge that prevent flattening used in verification

Related issues

Backward compatibility

Yes

Testing

Unit Tests

Copy link

changeset-bot bot commented Dec 20, 2023

⚠️ No Changeset found

Latest commit: 25aff14

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented Jan 25, 2024

Codecov Report

Merging #3091 (25aff14) into main (0d5a751) will increase coverage by 0.46%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3091      +/-   ##
==========================================
+ Coverage   67.18%   67.65%   +0.46%     
==========================================
  Files         101       99       -2     
  Lines        1021     1014       -7     
  Branches      106      106              
==========================================
  Hits          686      686              
+ Misses        291      284       -7     
  Partials       44       44              
Components Coverage Δ
core 50.00% <ø> (ø)
hooks 68.79% <ø> (ø)
isms 65.94% <ø> (ø)
token 58.41% <ø> (+3.78%) ⬆️
middlewares 81.46% <ø> (ø)

Copy link
Contributor

Storage Layout Diff

diff --unified solidity/base-storage/FastHypERC20.md solidity/HEAD-storage/FastHypERC20.md
--- solidity/base-storage/FastHypERC20.md	2024-01-25 20:27:18.896234839 +0000
+++ solidity/HEAD-storage/FastHypERC20.md	2024-01-25 20:26:41.648475759 +0000
@@ -1,21 +1,21 @@
-| Name                     | Type                                            | Slot | Offset | Bytes | Contract                                      |
-|--------------------------|-------------------------------------------------|------|--------|-------|-----------------------------------------------|
-| _initialized             | uint8                                           | 0    | 0      | 1     | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| _initializing            | bool                                            | 0    | 1      | 1     | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| __gap                    | uint256[50]                                     | 1    | 0      | 1600  | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| _balances                | mapping(address => uint256)                     | 51   | 0      | 32    | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| _allowances              | mapping(address => mapping(address => uint256)) | 52   | 0      | 32    | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| _totalSupply             | uint256                                         | 53   | 0      | 32    | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| _name                    | string                                          | 54   | 0      | 32    | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| _symbol                  | string                                          | 55   | 0      | 32    | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| __gap                    | uint256[45]                                     | 56   | 0      | 1440  | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| _owner                   | address                                         | 101  | 0      | 20    | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| __gap                    | uint256[49]                                     | 102  | 0      | 1568  | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| hook                     | contract IPostDispatchHook                      | 151  | 0      | 20    | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| interchainSecurityModule | contract IInterchainSecurityModule              | 152  | 0      | 20    | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| __GAP                    | uint256[48]                                     | 153  | 0      | 1536  | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| _routers                 | struct EnumerableMapExtended.UintToBytes32Map   | 201  | 0      | 96    | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| __GAP                    | uint256[48]                                     | 204  | 0      | 1536  | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| destinationGas           | mapping(uint32 => uint256)                      | 252  | 0      | 32    | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| fastTransferId           | uint256                                         | 253  | 0      | 32    | contracts/token/FastHypERC20.sol:FastHypERC20 |
-| filledFastTransfers      | mapping(bytes32 => address)                     | 254  | 0      | 32    | contracts/token/FastHypERC20.sol:FastHypERC20 |
+| Name                     | Type                                            | Slot | Offset | Bytes | Contract                                                 |
+|--------------------------|-------------------------------------------------|------|--------|-------|----------------------------------------------------------|
+| _initialized             | uint8                                           | 0    | 0      | 1     | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| _initializing            | bool                                            | 0    | 1      | 1     | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| __gap                    | uint256[50]                                     | 1    | 0      | 1600  | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| _balances                | mapping(address => uint256)                     | 51   | 0      | 32    | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| _allowances              | mapping(address => mapping(address => uint256)) | 52   | 0      | 32    | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| _totalSupply             | uint256                                         | 53   | 0      | 32    | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| _name                    | string                                          | 54   | 0      | 32    | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| _symbol                  | string                                          | 55   | 0      | 32    | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| __gap                    | uint256[45]                                     | 56   | 0      | 1440  | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| _owner                   | address                                         | 101  | 0      | 20    | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| __gap                    | uint256[49]                                     | 102  | 0      | 1568  | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| hook                     | contract IPostDispatchHook                      | 151  | 0      | 20    | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| interchainSecurityModule | contract IInterchainSecurityModule              | 152  | 0      | 20    | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| __GAP                    | uint256[48]                                     | 153  | 0      | 1536  | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| _routers                 | struct EnumerableMapExtended.UintToBytes32Map   | 201  | 0      | 96    | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| __GAP                    | uint256[48]                                     | 204  | 0      | 1536  | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| destinationGas           | mapping(uint32 => uint256)                      | 252  | 0      | 32    | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| fastTransferId           | uint256                                         | 253  | 0      | 32    | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
+| filledFastTransfers      | mapping(bytes32 => address)                     | 254  | 0      | 32    | contracts/token/extensions/FastHypERC20.sol:FastHypERC20 |
diff --unified solidity/base-storage/FastHypERC20Collateral.md solidity/HEAD-storage/FastHypERC20Collateral.md
--- solidity/base-storage/FastHypERC20Collateral.md	2024-01-25 20:27:18.188239415 +0000
+++ solidity/HEAD-storage/FastHypERC20Collateral.md	2024-01-25 20:26:39.508489543 +0000
@@ -1,15 +1,15 @@
-| Name                     | Type                                          | Slot | Offset | Bytes | Contract                                                          |
-|--------------------------|-----------------------------------------------|------|--------|-------|-------------------------------------------------------------------|
-| _initialized             | uint8                                         | 0    | 0      | 1     | contracts/token/FastHypERC20Collateral.sol:FastHypERC20Collateral |
-| _initializing            | bool                                          | 0    | 1      | 1     | contracts/token/FastHypERC20Collateral.sol:FastHypERC20Collateral |
-| __gap                    | uint256[50]                                   | 1    | 0      | 1600  | contracts/token/FastHypERC20Collateral.sol:FastHypERC20Collateral |
-| _owner                   | address                                       | 51   | 0      | 20    | contracts/token/FastHypERC20Collateral.sol:FastHypERC20Collateral |
-| __gap                    | uint256[49]                                   | 52   | 0      | 1568  | contracts/token/FastHypERC20Collateral.sol:FastHypERC20Collateral |
-| hook                     | contract IPostDispatchHook                    | 101  | 0      | 20    | contracts/token/FastHypERC20Collateral.sol:FastHypERC20Collateral |
-| interchainSecurityModule | contract IInterchainSecurityModule            | 102  | 0      | 20    | contracts/token/FastHypERC20Collateral.sol:FastHypERC20Collateral |
-| __GAP                    | uint256[48]                                   | 103  | 0      | 1536  | contracts/token/FastHypERC20Collateral.sol:FastHypERC20Collateral |
-| _routers                 | struct EnumerableMapExtended.UintToBytes32Map | 151  | 0      | 96    | contracts/token/FastHypERC20Collateral.sol:FastHypERC20Collateral |
-| __GAP                    | uint256[48]                                   | 154  | 0      | 1536  | contracts/token/FastHypERC20Collateral.sol:FastHypERC20Collateral |
-| destinationGas           | mapping(uint32 => uint256)                    | 202  | 0      | 32    | contracts/token/FastHypERC20Collateral.sol:FastHypERC20Collateral |
-| fastTransferId           | uint256                                       | 203  | 0      | 32    | contracts/token/FastHypERC20Collateral.sol:FastHypERC20Collateral |
-| filledFastTransfers      | mapping(bytes32 => address)                   | 204  | 0      | 32    | contracts/token/FastHypERC20Collateral.sol:FastHypERC20Collateral |
+| Name                     | Type                                          | Slot | Offset | Bytes | Contract                                                                     |
+|--------------------------|-----------------------------------------------|------|--------|-------|------------------------------------------------------------------------------|
+| _initialized             | uint8                                         | 0    | 0      | 1     | contracts/token/extensions/FastHypERC20Collateral.sol:FastHypERC20Collateral |
+| _initializing            | bool                                          | 0    | 1      | 1     | contracts/token/extensions/FastHypERC20Collateral.sol:FastHypERC20Collateral |
+| __gap                    | uint256[50]                                   | 1    | 0      | 1600  | contracts/token/extensions/FastHypERC20Collateral.sol:FastHypERC20Collateral |
+| _owner                   | address                                       | 51   | 0      | 20    | contracts/token/extensions/FastHypERC20Collateral.sol:FastHypERC20Collateral |
+| __gap                    | uint256[49]                                   | 52   | 0      | 1568  | contracts/token/extensions/FastHypERC20Collateral.sol:FastHypERC20Collateral |
+| hook                     | contract IPostDispatchHook                    | 101  | 0      | 20    | contracts/token/extensions/FastHypERC20Collateral.sol:FastHypERC20Collateral |
+| interchainSecurityModule | contract IInterchainSecurityModule            | 102  | 0      | 20    | contracts/token/extensions/FastHypERC20Collateral.sol:FastHypERC20Collateral |
+| __GAP                    | uint256[48]                                   | 103  | 0      | 1536  | contracts/token/extensions/FastHypERC20Collateral.sol:FastHypERC20Collateral |
+| _routers                 | struct EnumerableMapExtended.UintToBytes32Map | 151  | 0      | 96    | contracts/token/extensions/FastHypERC20Collateral.sol:FastHypERC20Collateral |
+| __GAP                    | uint256[48]                                   | 154  | 0      | 1536  | contracts/token/extensions/FastHypERC20Collateral.sol:FastHypERC20Collateral |
+| destinationGas           | mapping(uint32 => uint256)                    | 202  | 0      | 32    | contracts/token/extensions/FastHypERC20Collateral.sol:FastHypERC20Collateral |
+| fastTransferId           | uint256                                       | 203  | 0      | 32    | contracts/token/extensions/FastHypERC20Collateral.sol:FastHypERC20Collateral |
+| filledFastTransfers      | mapping(bytes32 => address)                   | 204  | 0      | 32    | contracts/token/extensions/FastHypERC20Collateral.sol:FastHypERC20Collateral |

@yorhodes yorhodes enabled auto-merge (squash) January 25, 2024 20:29
@yorhodes yorhodes merged commit fa465b7 into main Jan 25, 2024
26 of 27 checks passed
@yorhodes yorhodes deleted the verify-eclipse-fi branch January 25, 2024 20:50
ltyu pushed a commit to ltyu/hyperlane-monorepo that referenced this pull request Mar 13, 2024
### Description

Duplicate FastHypERC20 implementations got into main following the v3
merge that prevent flattening used in verification

### Related issues

- Unblocks hyperlane-xyz/issues#886

### Backward compatibility

Yes

### Testing

Unit Tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants