Deploy a Rollup
General Info
Shiba Inu's Developer Portal offers the option of deploying a Optimism-based rollup on the Shibarium network. Rollups streamline the blockchain transaction process by serving as a dedicated execution layer and thus saving costs on fees and transaction time.
Local setup
1. Request a Rollup
To get started, you need to request a rollup from the Developer Portal.
2. Launch
Once the rollup is deployed, the Developer Portal page will show it under "My Rollups".
A zipped configuration file will come under the Action column. Download it.
After that, you should unzip the file and open its folder.
Now run the command below to launch the rollup:
chmod +x ./launch.sh && ./launch.sh`
If there is an error about pulling the image, you need to configure GCR by following these steps:
- Install gcloud.
- Configure GCR:
gcloud init
gcloud auth login //interactive through browser
gcloud auth configure-docker us-docker.pkg.dev
File Content
The zipped folder generated after the rollup was deployed contains the following files:
| File name | Content |
|---|---|
| .env | Enviroment variabless mostly required for rollup components only. |
| launch.sh | The Launch script. |
| docker-compose.yaml | Docker compose with configured opstack components. |
| addresses.json | File with addresses of smart contracts deployed on L1. Read more about them on the Optimism documentation. |
| genesis.json | |
| rollup.json | |
| l2_all.json | Initial EVM state of deployed rollup. |
| keys.json | Addresses and private keys of service accounts (admin, batcher, proposer, sequencer). |
| jwt.txt | Only for components internal use |
How to connect
To connect to the rollup, you will need the following information:
- The RPC_URL: localhost:8549
- and the CHAIN-ID, which can be found in the rollup.json file as
l2_chain_id.
With that information, you can connect to a wallet of your preference, such as MetaMask. If you are also writing a smart contract on Hardhat, for example, you will also need to provide the data above.
Add funds
For sending funds (native token) from L1 (or settlement layer) to your rollup, follow these steps:
- Open the addresses.json file and find
L1StandardBridgeProxyaddress. ****2. Send BONE (via simple transfer or metamask) to this address on puppynet to get native token on your rollup on the same address. - Wait some time after tx is added to the block for rollup sync (it’s supposed to be running).