Commit 5c1e50e
authored
Feature: add zksync support to v1.5.0 (#742)
**This PR:**
- Implements
#766 by adding
the zksync support for deployment and testing contracts
- It is based on
#651. However,
Matter Labs has published many updates in the meantime, so there are
many changes
- Add zksync tests to the CI
**Importants changes**
- The zksync team did a great job of adding a lot of interoperability
features with hardhat's environment ethers object, however, there are
certain features we rely on that require zksync-specific adjustments,
such as compiling code from string, contract deployment, create2 address
calculation. Functions specific to that had to be adjusted
- we had incorrect test assumptions: for example, we assumed that
`hre.ethers.getContractAt` would always return a contract instance
connected to the first account returned from `hre.ethers.getSigners`.
This didn't hold in zksync environment as they use the 9th account
**Notes**
- This PR doesn't include changes to Safe Migration contract tests for
zksync, as we decided to merge this first and add the support to 1.4.1
and fix the migration contracts there, then cherry-pick it back to 1.5.0
**Proof of deployment:**
```
> hardhat deploy-contracts --network zkSyncSepolia
Yul codegen is only supported for solc >= 0.8. Flag forceEVMLA will automatically be set to true by default.
Yul codegen is only supported for solc >= 0.8. Flag forceEVMLA will automatically be set to true by default.
The zksolc compiler version in your Hardhat config file (1.5.2) is not the latest. We recommend using the latest version 1.5.3.
Nothing to compile
No need to generate any newer typings.
reusing "SimulateTxAccessor" at 0x1aaa95173dAA2F9B18df1277485CAd842Bb5EeFe
reusing "SafeProxyFactory" at 0x9c8588F1Cfbf54845c06C6924E90b20AB0912B6F
reusing "TokenCallbackHandler" at 0x94AA81a0E2e857A0e5978b7E4218DdAE2d611bCf
reusing "CompatibilityFallbackHandler" at 0x7e940bC046e2a069F67e40f00A9d5749Abf59f70
reusing "CreateCall" at 0xded498F0eEEAe67E2E339a42e5c926335fDDCcf7
reusing "MultiSend" at 0xE25a6DFf1cbD91d195D87ECb90C96517fc98F581
reusing "MultiSendCallOnly" at 0x0E5006a4179dF454031800eC575F413c83d7B025
reusing "SignMessageLib" at 0x97273487793848a571054bf3a5FDc9c0982648B9
reusing "Safe" at 0xB23798CfB614f3A1a6d0820c08e004922475CD76
reusing "SafeL2" at 0x0ED239feb23632cE272A0AE5f8bfd843377897DF
reusing "SafeToL2Migration" at 0x4c81Ce72dD304E27739A5607f0Ba7207eD415360
reusing "SafeMigration" at 0x80dd94053ED6075992771A2Df501eFF101fBc281
Verification status for CompatibilityFallbackHandler: SUCCESS
Verification status for CreateCall: SUCCESS
Verification status for MultiSend: SUCCESS
Verification status for MultiSendCallOnly: SUCCESS
Verification status for Safe: SUCCESS
Verification status for SafeL2: SUCCESS
Verification status for SafeMigration: SUCCESS
Verification status for SafeProxyFactory: SUCCESS
Verification status for SafeToL2Migration: SUCCESS
Verification status for SignMessageLib: SUCCESS
Verification status for SimulateTxAccessor: SUCCESS
Verification status for TokenCallbackHandler: SUCCESS
Running zk verification on block explorer
Verifying CompatibilityFallbackHandler at 0x7e940bC046e2a069F67e40f00A9d5749Abf59f70...
Your verification ID is: 23855
Contract successfully verified on ZKsync block explorer!
Verifying CreateCall at 0xded498F0eEEAe67E2E339a42e5c926335fDDCcf7...
Your verification ID is: 23856
Contract successfully verified on ZKsync block explorer!
Verifying MultiSend at 0xE25a6DFf1cbD91d195D87ECb90C96517fc98F581...
Your verification ID is: 23857
Contract successfully verified on ZKsync block explorer!
Verifying MultiSendCallOnly at 0x0E5006a4179dF454031800eC575F413c83d7B025...
Your verification ID is: 23858
Contract successfully verified on ZKsync block explorer!
Verifying Safe at 0xB23798CfB614f3A1a6d0820c08e004922475CD76...
Your verification ID is: 23859
Contract successfully verified on ZKsync block explorer!
Verifying SafeL2 at 0x0ED239feb23632cE272A0AE5f8bfd843377897DF...
Your verification ID is: 23860
Contract successfully verified on ZKsync block explorer!
Verifying SafeMigration at 0x80dd94053ED6075992771A2Df501eFF101fBc281...
Your verification ID is: 23861
Contract successfully verified on ZKsync block explorer!
Verifying SafeProxyFactory at 0x9c8588F1Cfbf54845c06C6924E90b20AB0912B6F...
Your verification ID is: 23862
Contract successfully verified on ZKsync block explorer!
Verifying SafeToL2Migration at 0x4c81Ce72dD304E27739A5607f0Ba7207eD415360...
Your verification ID is: 23863
Contract successfully verified on ZKsync block explorer!
Verifying SignMessageLib at 0x97273487793848a571054bf3a5FDc9c0982648B9...
Your verification ID is: 23864
Contract successfully verified on ZKsync block explorer!
Verifying SimulateTxAccessor at 0x1aaa95173dAA2F9B18df1277485CAd842Bb5EeFe...
Your verification ID is: 23865
Contract successfully verified on ZKsync block explorer!
Verifying TokenCallbackHandler at 0x94AA81a0E2e857A0e5978b7E4218DdAE2d611bCf...
Your verification ID is: 23866
Contract successfully verified on ZKsync block explorer!
Execution time: 51.41s
```1 parent c266ffc commit 5c1e50e
File tree
49 files changed
+3622
-1036
lines changed- .github/workflows
- .husky
- src
- deploy
- tasks
- utils
- test
- accessors
- core
- factory
- guards
- handlers
- integration
- libraries
- migration
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
49 files changed
+3622
-1036
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | 1 | | |
5 | 2 | | |
6 | 3 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
3 | 8 | | |
4 | 9 | | |
5 | 10 | | |
| |||
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
19 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
20 | 35 | | |
21 | 36 | | |
22 | 37 | | |
| |||
73 | 88 | | |
74 | 89 | | |
75 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
76 | 95 | | |
77 | 96 | | |
78 | 97 | | |
79 | 98 | | |
80 | 99 | | |
| 100 | + | |
81 | 101 | | |
82 | 102 | | |
83 | 103 | | |
| |||
116 | 136 | | |
117 | 137 | | |
118 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
119 | 153 | | |
120 | 154 | | |
121 | 155 | | |
| |||
0 commit comments