Deploy contracts
To deploy the Thanos chain, which interacts with the L1 chain, system contracts need to be deployed on the L1 chain.
To proceed with this process, you need to clone the following repository:
GitHub - tokamak-network/tokamak-thanos
The deployment consumes over 80 million gas; monitoring gas prices is crucial to minimize ETH costs during mainnet deployment.
Create deploy-config file
Enter some information on the Tokamak Rollup Hub website and download the
deploy-config
file.
Configure env
Before starting the deployment, you need to set up the environment variables required by the deployment script.
Go to the scripts directory
Copy the
env.example.deploy
toenv
Please fill in the values for the items listed below in the copied file and save.
GS_ADMIN_PRIVATE_KEY
: Admin private key for deploying contractsL1_RPC_URL
: L1 RPC URL address
Build repository
Go to the scripts directory
Build repository
Deploy contracts
In this step, we will deploy the system contracts along with the deploy-config
file.
Run the script with deploy. You need to provide the paths to the
deploy-config
file and theenv
file as options.After finish deploy, you can check the deployed contract addresses in the file below.
Generate genesis and rollup files
To run the Thanos chain, a genesis file and a rollup file are required.
Go to the scripts directory
Run script with generate.
The generated files can be found at the path below.
Once everything is complete, proceed to the next phase
Last updated