Skip to content

register

Register your Micro-Rollup with Stackr

The register command is the most crucial command in the Stackr SDK. It is used to register your Micro-Rollup with the Stackr on-chain registry.

Usage

» stackr register --help
USAGE
  $ stackr register [--envFile <value>] [--privateKey <value>]
 
FLAGS
  --envFile=<value>     [default: .env] Path to the .env file
  --privateKey=<value>  Private key of the account to be used to register the contract
 
EXAMPLES
  $ stackr register
 
  $ stackr register --privateKey <privateKey> --envFile <path>

Example

npx @stackr/cli@latest register

This command reads your stackr.config.json file for project details and sends a transaction to Stackr's on-chain registry to deploy a new AppInbox contract for the application. All the blocks that the app produces will be sent to this contract.

Deployment cost

In addition to gas fees, the deployment cost for the AppInbox contract is 0.001 ETH. Make sure you have enough balance in your account to deploy the contract. This ETH is sent to the Vulcan operator.

We have kept this fees in this initial phase to prevent spamming and to ensure that the operator has enough funds to run the network.

Output

terminal
 📝 Registered application on registry
 🧰 Updated deployment.json

Once the registration is successful, a new deployment.json file is created in the root of your project directory. This file looks like this:

deployment.json
{
  "appId": 18,
  "appInbox": "0x808c6cc1299A76ec3D1f6D37d1786801fF8d8f86",
  "chainId": 11155111
}