You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cdk/get-started/deploy-rollup/create-wallets.md
+20-80Lines changed: 20 additions & 80 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,24 @@
1
-
## Clone the contracts
1
+
## Set up wallet contracts
2
2
3
-
Clone the contracts from our [github repository](https://github.com/0xPolygonHermez/zkevm-contracts):
3
+
Clone the wallet contracts from the [`zkevm-contracts` repository](https://github.com/0xPolygonHermez/zkevm-contracts) and install the `npm` libraries.
"initialZkEVMDeployerOwner": "", // from wallets.txt Deployment Address address
107
-
"maticTokenAddress": "", // put existing contract address or leave empty to auto-deploy a new contract
108
-
"zkEVMDeployerAddress": "", // put existing contract address or leave empty to auto-deploy a new contract
109
-
"deployerPvtKey": "",
110
-
"maxFeePerGas": "",
111
-
"maxPriorityFeePerGas": "",
112
-
"multiplierGas": ""
113
-
}
114
-
```
115
-
116
-
!!!caution
117
-
Get some GöETH
118
-
119
-
You will need to send 0.5 GöETH to the deployment address wallet listed in `wallets.txt`.
120
-
121
-
Adjust the `gasPrice` according to the network status. For Goerli, you can check it with the following command, where you insert your Etherscan API key, note this can sometimes be 0 for testnet:
Edit `~/zkevm/zkevm-contracts/deployment/helpers/deployment-helpers.js` to adjust the `gasPrice` according to network status. It is recommended to add 50 Gwei to the current `gasPrice` to ensure transactions are processed quickly.
128
-
129
-
```js
130
-
vim ~/zkevm-contracts/deployment/helpers/deployment-helpers.js
131
-
constgasPriceKeylessDeployment="50"; // 50 gwei
132
-
```
72
+
3. Send 0.5 GöETH to the deployment address wallet listed in `wallets.txt`.
133
73
134
74
## Deploy contracts
135
75
136
-
```bash
76
+
```sh
137
77
cd~/zkevm-contracts/
138
78
npm i @openzeppelin/hardhat-upgrades
139
79
npm run deploy:deployer:ZkEVM:goerli
@@ -142,9 +82,9 @@ npm run deploy:testnet:ZkEVM:goerli
142
82
npm run verify:ZkEVM:goerli
143
83
```
144
84
145
-
The previous scripts will auto-deploy the MATIC token contract and the `zkEVMDeployer` contract if required.
85
+
The scripts auto-deploy the MATIC token contract and the `zkEVMDeployer` contract if required.
146
86
147
-
You will see in the logs the verification of each smart contract deployed, but you can check it on etherscan too.
87
+
4. Check the deployment was successful on Etherscan.
148
88
149
89
```html
150
90
https://goerli.etherscan.io/address/0x -> Put the Deployment Address wallet from
Deploying the full stack Polygon CDK zkRollup EVM-compatible network requires installing and deploying a number of different components.
2
2
3
-
Implementing the full stack Polygon CDK zkRollup EVM-compatible network involves more than just running a node and the prover to validate batches and deploy smart contracts. In its entirety, it encompasses all these processes and more.
4
-
5
-
The common rollup actors are the sequencer, the aggregator, the synchroniser and the JSON RPC node. All these affect the L2 state.
6
-
7
-
Also, the aggregator uses the prover to avail verifiable proofs of sequenced batches. And the sequenced batches are composed of transactions taken from the pool database.
8
-
9
-
This highlights just a few main components. The rest of the components and those working in the background, are listed in the next subsection.
10
-
11
-
### Why you need Docker
12
-
13
-
The modular design of the CDK zkRollup EVM-compatible network allows for most components to be separately instantiated, and we therefore run each of these instances in a separate Docker container.
14
-
15
-
The below table enlists all the CDK zkRollup EVM-compatible components/services and their corresponding container-names.
16
-
17
-
Our CDK zkRollup deployment-guide provides CLI commands to automatically create these Docker containers.
| Etherman | zkevm-eth-tx-manager | Implements methods for all interactions with the L1 network and smart contracts. |
30
-
| Bridge UI | zkevm-bridge-ui | User-interface for bridging ERC-20 tokens between L2 and L1 or another L2. |
31
-
| Bridge DB | zkevm-bridge-db| A database for storing bridge-related transactions data. |
32
-
| Bridge service | zkevm-bridge-service | A backend service enabling clients like the web UI to interact with bridge smart contracts. |
33
-
| zkEVM explorer | zkevm-explorer-l2 | L2 network's block explorer. i.e., The zkRollup Etherscan [rxplorer](https://zkevm.polygonscan.com). |
34
-
| zkEVM explorer DB | zkevm-explorer-l2-db | Database for the L2 network's Block explorer. i.e., Where all the zkRollup Etherscan explorer queries are made. |
35
-
| Gas pricer | zkevm-l2gaspricer | Responsible for suggesting the gas price for the L2 network fees. |
| Synchronizer |`zkevm-sync`| Updates the state by fetching data from Ethereum through the Etherman. |
11
+
| JSON RPC |`zkevm-rpc`| An interface for interacting with the network. e.g., Metamask, Etherscan or Bridge. |
12
+
| State DB |`zkevm-state-db`| A database for permanently storing state data (apart from the Merkle tree). |
13
+
| Prover |`zkevm-prover-server`| Used by the aggregator to create zk-proofs. The full prover is extremely resource-heavy and runs on an external cloud server. Use the mock prover for evaluation/test purposes. |
14
+
| Pool DB |`zkevm-pool-db`| Stores txs from the RPC nodes, waiting to be put in a batch by the sequencer. |
| Etherman |`zkevm-eth-tx-manager`| Implements methods for all interactions with the L1 network and smart contracts. |
17
+
| Bridge UI |`zkevm-bridge-ui`| User-interface for bridging ERC-20 tokens between L2 and L1 or another L2. |
18
+
| Bridge DB |`zkevm-bridge-db`| A database for storing bridge-related transactions data. |
19
+
| Bridge service |`zkevm-bridge-service`| A backend service enabling clients like the web UI to interact with bridge smart contracts. |
20
+
| zkEVM explorer |`zkevm-explorer-l2`| L2 network's block explorer. i.e., The zkRollup Etherscan [explorer](https://zkevm.polygonscan.com). |
21
+
| zkEVM explorer DB |`zkevm-explorer-l2-db`| Database for the L2 network's Block explorer. i.e., Where all the zkRollup Etherscan explorer queries are made. |
22
+
| Gas pricer |`zkevm-l2gaspricer`| Responsible for suggesting the gas price for the L2 network fees. |
Next step in the process is to download the mainnet files. This download is over **70GB**, so it's recommended to run the download in a tmux/screen session to handle any network interruptions.
57
+
Next step in the process is to download the mainnet files.
42
58
43
-
The files are located in several urls, so a script can be used as shown below:
59
+
!!! important
60
+
- The download is over **70GB**.
61
+
- You might like to run the download in a tmux/screen session to handle any network interruptions.
44
62
45
-
```bash
63
+
The files are located in several urls, so a script can be used as shown below:
This quick start takes you through the process of deploying a full CDK zkRollup, EVM-compatible network on Goerli.
2
2
3
3
!!!caution
4
-
- Instructions in this document are subject to frequent updates as the software is still at an early development stage.
5
-
- Please [open a ticket](https://support.polygon.technology/support/tickets/new) or reach out to our[support team on Discord](https://discord.com/invite/0xPolygon) if you encounter any issues.
4
+
- This quick start is subject to frequent updates as the software remains at an early development stage.
5
+
- Please [open a ticket](https://support.polygon.technology/support/tickets/new) or reach out to the[support team on Discord](https://discord.com/invite/0xPolygon) if you encounter any issues.
6
6
7
-
The process is split into separate sections:
7
+
The process is split into the following sections:
8
8
9
-
1.[Overview of the full environment](environment-overview.md): Overview of the full CDK zkRollup environment we're building.
9
+
1.[Overview of the full environment](environment-overview.md).
10
10
11
-
2.[Prerequisites](prerequisites.md): Preliminary setup, checking system requirements, and prerequisite variables.
11
+
2.[Prerequisites steps](prerequisites.md): Preliminary setup, checking system requirements, and prerequisite variables.
12
12
13
-
2.[Installation](install-dependencies.md): Installing dependencies and downloading mainnet files.
13
+
3.[Install dependencies](install-dependencies.md): Install required dependencies and downloading mainnet files.
14
14
15
-
3.[Create wallets](create-wallets.md): Creating wallets and deploying contracts.
15
+
4.[Create wallets](create-wallets.md): Create wallets and deploy contracts.
16
16
17
-
4.[Deploy node](deploy-node.md): Deployment of the zkRollup EVM-compatible node.
17
+
5.[Deploy node](deploy-node.md): Deploy the zkRollup EVM-compatible node.
18
18
19
-
5.[Configure prover](configure-prover.md): Configuring the prover and services.
19
+
6.[Configure prover](configure-prover.md): Configure the prover and services.
20
20
21
-
6.[Set up Goerli node](setup-goerli-node.md): Activating forced transactions and bridging/claiming assets.
21
+
7.[Activate forced transactions](activate-forced-transactions.md): Activate forced transactions, and bridge/claim assets.
0 commit comments