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

Upgradable warp routes #3474

Merged
merged 22 commits into from
Mar 31, 2024
Merged

Upgradable warp routes #3474

merged 22 commits into from
Mar 31, 2024

Conversation

ltyu
Copy link
Contributor

@ltyu ltyu commented Mar 21, 2024

Description

Makes the following Warp Routes upgradable through CLI deployment

- FastHypERC20Collateral
- FastHypERC20
- HypERC20
- HypERC20Collateral
- HypERC20CollateralVaultDeposit
- HypNative
- HypNativeScaled
- HypERC721Collateral
- HypERC721
- HypERC721URICollateral
- HypERC721URIStorage
  • Adds initialize() to each contract
    • It mostly contains _MailboxClient_initialize, and any additional proxy specific constructor logic
  • Refactors
    • Update GasRouterDeployer to inherit from ProxiedRouterDeployer
    • Update ProxiedRouterDeployer.routerContractName to abstract ProxiedRouterDeployer.routerContractName(): RouterKey .
      • This allows child classes to specify their own contract name instead of being locked-in to a single name upon construction. Similar concept to the existing ProxiedRouterDeployer.constructorArgs() and ProxiedRouterDeployer.initializeArgs()
    • Update router()
      • Add function into InterchainQueryDeployer
      • Add function into InterchainAccountDeployer
      • Update to abstract function in ProxiedRouterDeployer
      • Drive-by changes

Related issues

Fixes #999

Backward compatibility

  • Should be backward compatible

Testing

  • Updates contract unit tests
  • Manual testing through CLI and verified contracts

Copy link

changeset-bot bot commented Mar 21, 2024

⚠️ No Changeset found

Latest commit: d8de904

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 Mar 21, 2024

Codecov Report

Merging #3474 (d8de904) into main (5373d54) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3474   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          1       1           
  Lines         16      16           
=====================================
  Misses        16      16           
Components Coverage Δ
core ∅ <ø> (∅)
hooks ∅ <ø> (∅)
isms ∅ <ø> (∅)
token ∅ <ø> (∅)
middlewares ∅ <ø> (∅)

@ltyu ltyu force-pushed the upgradable-warp-routes branch from 3c4700a to dd3c182 Compare March 25, 2024 22:08
Copy link
Contributor

@nbayindirli nbayindirli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why we're using Transparent over UUPS? UUPS tends to be the de-facto recommendation these days (cheaper gas, more flexible, can eventually remove upgradability)

@ltyu ltyu force-pushed the upgradable-warp-routes branch from 4683604 to 4ef2e82 Compare March 26, 2024 14:58
@ltyu ltyu force-pushed the upgradable-warp-routes branch from 4ef2e82 to b5b7d8d Compare March 26, 2024 15:12
@ltyu ltyu force-pushed the upgradable-warp-routes branch from 45e8d61 to 74c3549 Compare March 26, 2024 17:47
@ltyu ltyu marked this pull request as ready for review March 26, 2024 18:52
@ltyu ltyu removed the request for review from tkporter March 26, 2024 18:52
@ltyu
Copy link
Contributor Author

ltyu commented Mar 26, 2024

Should merge after #3490

Copy link
Member

@yorhodes yorhodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work
glad we reused ProxiedRouterDeployer

solidity/contracts/token/HypERC20.sol Show resolved Hide resolved
solidity/contracts/token/HypERC721.sol Outdated Show resolved Hide resolved
typescript/sdk/src/token/deploy.ts Outdated Show resolved Hide resolved
typescript/sdk/src/token/deploy.ts Outdated Show resolved Hide resolved
typescript/sdk/src/token/deploy.ts Show resolved Hide resolved
typescript/sdk/src/token/deploy.ts Show resolved Hide resolved
typescript/sdk/src/token/deploy.ts Show resolved Hide resolved
@ltyu ltyu force-pushed the upgradable-warp-routes branch from f032ab7 to 27ad190 Compare March 27, 2024 18:43
@ltyu ltyu force-pushed the upgradable-warp-routes branch from 7e74982 to 21e0aa3 Compare March 28, 2024 20:55
@ltyu ltyu force-pushed the upgradable-warp-routes branch from 21e0aa3 to 901e6c1 Compare March 28, 2024 21:00
@ltyu ltyu enabled auto-merge (squash) March 30, 2024 19:05
@ltyu ltyu merged commit db85f8a into main Mar 31, 2024
35 of 36 checks passed
@ltyu ltyu deleted the upgradable-warp-routes branch March 31, 2024 14:40
yorhodes pushed a commit that referenced this pull request Apr 14, 2024
### Description

Makes the following Warp Routes upgradable through CLI deployment
```
- FastHypERC20Collateral
- FastHypERC20
- HypERC20
- HypERC20Collateral
- HypERC20CollateralVaultDeposit
- HypNative
- HypNativeScaled
- HypERC721Collateral
- HypERC721
- HypERC721URICollateral
- HypERC721URIStorage
```

- Adds `initialize()` to each contract
- It mostly contains `_MailboxClient_initialize`, and any additional
proxy specific constructor logic
- Refactors
	- Update `GasRouterDeployer` to inherit from `ProxiedRouterDeployer`
- Update `ProxiedRouterDeployer.routerContractName` to `abstract
ProxiedRouterDeployer.routerContractName(): RouterKey` .
- This allows child classes to specify their own contract name instead
of being locked-in to a single name upon construction. Similar concept
to the existing `ProxiedRouterDeployer.constructorArgs()` and
`ProxiedRouterDeployer.initializeArgs()`
	- Update `router()` 
		- Add function into `InterchainQueryDeployer`
		- Add function into `InterchainAccountDeployer`
		- Update to abstract function in `ProxiedRouterDeployer`
		- ### Drive-by changes

### Related issues
Fixes #999 

### Backward compatibility
- Should be backward compatible

### Testing
- Updates contract unit tests
- Manual testing through CLI and verified contracts
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.

3 participants