[ZK Stack] - Instructions to Deploy a ZkStack Chain with Custom Token as a Gas token #816
-
Team or ProjectGotham Module Affected
Rust Version1.75.0 Operating System
Issue DescriptionI'm trying to create a custom zk chain, but after creating the ecosystem and trying to initialise the chain, I'm getting the following error. ● Initializing chain xxx Followed so far, I've used the governer wallet to deploy the token contract on L1 and used the same address while creating the chain, but when doing If I send the balance to that account and try again, getting BridgeHubAlreadyRegistered Error Expected BehaviorCustom token to be Gas token for the Rollup Current BehaviorGetting error setting up the Custom token Repository Link (if applicable)No response Additional DetailsNo response Prior Research
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It seems like you are encountering multiple issues while setting up a custom zk chain with a custom token as the gas token. Here are some steps and considerations based on the information you've provided:
For detailed guidance on setting up a custom zk chain with a custom ERC20 token as the gas token, you can refer to the Custom Base Tokens documentation. This guide provides comprehensive steps for deploying an ERC20 token to L1, creating a new chain that uses this ERC20 token, and setting it as the default. If these steps do not resolve your issues, it may be helpful to revisit the configuration files and deployment scripts to ensure all parameters and addresses are correctly set. Additionally, consider reaching out on the ZKsync developers discussions on Github for more in-depth support. Your feedback helps us serve you better. If this fully addresses your question, please give it a thumbs up. If it doesn't, please give it a thumbs down. This will inform the community and team so we can improve our support. |
Beta Was this translation helpful? Give feedback.
-
Did you make sure to initialize the ecosystem too? https://code.zksync.io/tutorials/custom-zk-chain#deploying-the-ecosystem I went through the tutorial and was able to get everything running. Had to change a few of the ports but ultimately got 2 chains deployed and one with a custom base token. |
Beta Was this translation helpful? Give feedback.
-
To fix |
Beta Was this translation helpful? Give feedback.
To fix
BridgeHubAlreadyRegistered
error, update the chain ID to something else. For example, if your chain ID is 456, change it to a different value. This error occurred because in your 1st attempt chain has been successfully registered to the Bridge Hub and you cannot register another chain with same ID.