From e7897fda5cb486262983feb04f3802a818887272 Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Fri, 27 Sep 2024 10:04:29 -0500 Subject: [PATCH] chore: update tutorial to reflect changes (#84) # Description - Updates tutorial so users make use of the `governors` address for deploying / setting owner for base token contract as expected by the `zk_toolbox` script: https://github.com/matter-labs/zksync-era/pull/2973/files - Removed the funding governor section as that is done by the script ## Linked Issues ## Additional context --- .../20.customizing-your-chain.md | 35 +++---------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/content/tutorials/custom-zk-chain/20.customizing-your-chain.md b/content/tutorials/custom-zk-chain/20.customizing-your-chain.md index 2204601..970a7e1 100644 --- a/content/tutorials/custom-zk-chain/20.customizing-your-chain.md +++ b/content/tutorials/custom-zk-chain/20.customizing-your-chain.md @@ -90,11 +90,12 @@ Next, create a `.env` file with: touch .env ``` -Add the `WALLET_PRIVATE_KEY` environment variable with the private key of the rich wallet we've been using -so that we can deploy using a pre-funded address: +Add the governor private key from our elastic_chain setup to ensure that this address becomes the owner of the token contract. Here's how +you can add the `WALLET_PRIVATE_KEY` environment variable: ```bash -WALLET_PRIVATE_KEY=0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110 +# Use the private key of the `governor` from wallet.yaml +WALLET_PRIVATE_KEY= ``` ### Deploying an ERC20 Contract @@ -223,34 +224,6 @@ For example, if we set the nominator to 20 and the denominator to 1, together th this would mean that 20 tokens would be given the equivalent value as 1 ETH for gas. For testing purposes, we'll just use a 1:1 ratio. -### Funding the governor addresses - -Now that you have some tokens and created a new chain, -the next step is to send some to each of the governor's addresses for the ecosystem and chain on the L1. -This will allow you to register and deploy your chain, and deploy the paymaster. -For the _ecosystem governor_, you can find the address in `/configs/wallets.yaml` under `governor`. - -The second governor address you need to fund is for the _chain governor_. -The chain governor address can be found in `/chains/custom_zk_chain/configs/wallets.yaml` also under `governor`. - -Run the command below **twice** (once for each governor address) to use `cast` to transfer some of your ERC20 tokens to the governor's address on the L1. - -```bash -cast send <0xYOUR_TOKEN_ADDRESS> "transfer(address,uint256)" \ -<0x_YOUR_GOVERNOR_ADDRESS> 1000000000000000000 \ ---private-key 0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110 \ ---rpc-url http://localhost:8545 \ ---gas-price 30000000000 -``` - -To verify that this worked, check the balance of both governor addresses: - -```bash -cast balance --erc20 <0xYOUR_TOKEN_ADDRESS> \ -<0x_YOUR_GOVERNOR_ADDRESS> \ ---rpc-url http://localhost:8545 -``` - ### Initializing the chain ::callout{icon="i-heroicons-exclamation-triangle" color="amber"}