Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Aug 5, 2024
1 parent 98e0483 commit a5d2ac4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions v2/scripts/deploy/deterministic/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Deterministic GatewayEVM deployments

`DeployGatewayEVMCreate2` script uses create2 with Foundry (https://book.getfoundry.sh/tutorials/create2-tutorial) to perform deterministic deployment of `GatewayEVM` contracts.
This ensures that on every EVM chain `GatewayEVM` contract will be on same address.

Since UUPS proxy is used for `GatewayEVM` contract, both implementation and `ERC1967Proxy` are deployed using above technique:

- calculate expected address
- adding a salt to deployment
- basic assertions to verify that deployed address is same as expected

`UpgradeGatewayEVM` script uses OpenZeppelin's Foundry Upgrades plugin (https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades), to upgrade `GatewayEVM`:

- deploy new implementation (doesn't need to be deterministic since proxy address doesn't change)
- use plugin to upgrade proxy


0 comments on commit a5d2ac4

Please sign in to comment.