Set up wallet contracts
Clone the wallet contracts from thezkevm-contracts repository and install the npm libraries.
Create wallets
-
Create a
wallets.jsfile. -
Copy/paste the JavaScript code below.
-
Generate the wallets.
Prepare environment variables
-
Edit the environment variables file.
-
Set the following variables.
-
Send 1 Sepolia ETH to the deployment address wallet listed in
wallets.txt.
Edit deployment configuration
-
Open the
deploy-parameters.jsonfile. -
Edit the following parameters to match the generated wallet parameters.
trustedSequencer: trusted sequencer address inwallets.txt.trustedAggregator: trusted aggregated address inwallets.txt.admin: deployment address inwallets.txt.zkEVMOwner: deployment address inwallets.txt.timelockAddress: deployment address inwallets.txt.initialZkEVMDeployerAddress: deployment address inwallets.txt.zkEVMDeployerAddress: deployment address inwallets.txt.emergencyCouncilAddress: deployment address inwallets.txt.deployerPvtKey: deployment private key inwallets.txt.
-
Open the
create_rollup_parameters.jsonfile. -
Edit the following parameters to match the rollup parameters
trustedSequencer: trusted sequencer address inwallets.txt.adminZkEVM: deployment address inwallets.txt.
Deploy & verify contracts
cd back to zkevm-contract root directory and run the deployment scripts.
-
Install Hardhat:
-
Deploy Polygon zkEVM deployer
You should see output that looks like this:
-
Verify deployer
You should see ouput that looks like this:
-
Prepare testnet
You should see output that looks like this:And now if you go to sepolia scan, you should also see that under your account, there’s a new
PolErc-20 token created with the balance of19,900,000tokens.