Skip to content

Commit 8763ccb

Browse files
committed
add script deploy zksync
1 parent 47910c3 commit 8763ccb

10 files changed

Lines changed: 5740 additions & 23 deletions

File tree

ā€Ž.env.exampleā€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@ ETHERSCAN_API_KEY=
33
BSCSCAN_API_KEY=
44
PRIVATE_KEY=
55
VERIFY_CODE_TIMEOUT="30000" # in miliseconds
6+
7+
# Flag zkSync
8+
0 = not using zkSync source path
9+
1 = using mainnet
10+
2 = using testnet
11+
ZK_FLAGS=2
12+
ADMIN_FACTORY=

ā€Ž.gitignoreā€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#Hardhat files
22
cache
33
artifacts
4+
cache-zk
5+
artifacts-zk
46
node_modules
57
build
68

ā€ŽREADME.mdā€Ž

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,12 @@ Example: `npx hardhat deploy --tags KyberSwap --network rinkeby --gasprice 30000
5050
`--silent`: This flag remove hardhat-deploy log output (see log function and log options for hre.deployments)
5151
`--watch`: This flag make the task never ending, watching for file changes in the deploy scripts folder and the contract source folder. If any changes happen the contracts are recompiled and the deploy script are re-run. Combined with a proxy deployment (Proxies or Diamond) this allow to have HCR (Hot Contract Replacement).
5252

53-
---
53+
---
54+
55+
### How to deploy on zkSync
56+
- Update `ZK_FLAGS` env to
57+
`0` default, not using zkSync network
58+
`1` if using mainnet
59+
`2` if using testnet
60+
- `yarn hardhat compile --network zkSyncNetwork`
61+
- `yarn hardhat deployZkSync --network zkSyncNetwork`

0 commit comments

Comments
Ā (0)
⚔