Initialize
Set RollApp info defaults
- EVM
- CosmWasm
Export default values:
export KEY_NAME_ROLLAPP="rol-user"
export MONIKER="$ROLLAPP_CHAIN_ID-sequencer"
export ROLLAPP_HOME_DIR="${HOME}/.rollapp_evm"
export ROLLAPP_SETTLEMENT_INIT_DIR_PATH="${ROLLAPP_HOME_DIR}/init"
export EXECUTABLE=$(which rollapp-evm)
Export default values:
export KEY_NAME_ROLLAPP="rol-user"
export MONIKER="$ROLLAPP_CHAIN_ID-sequencer"
export ROLLAPP_HOME_DIR="${HOME}/.rollapp-wasm"
export ROLLAPP_ScETTLEMENT_INIT_DIR_PATH="${ROLLAPP_HOME_DIR}/init"
export EXECUTABLE=$(which rollapp-wasm)
Setup Dymension network
export HUB_RPC_URL="https://dymension-testnet-tendermint.public.blastapi.io:443"
export HUB_CHAIN_ID="blumbus_111-1"
dymd config chain-id ${HUB_CHAIN_ID}
dymd config node ${HUB_RPC_URL}
dymd config keyring-backend test
Initialize RollApp configurations
sh scripts/init.sh
Setup Dymension addresses
Fund the following addresses using Dymension Discord's testnet faucet.
- Registration
- Sequencer
This address registers the RollApp on Dymension and if applicable may register multiple RollApps.
To get an address whitlisted proceed to the join-language-community channel on Discord. Once there, press the 🏗️ to receive the @Blumbus RollApp Deployer
role. Now you have access to the ✅・whitelist-requests-for-rollapp-deployers. Use that channel to post a message containing just the dymension
address you’d like to get whitelisted.
Set the key name
export PERMISSIONED_KEY="blumbus-rollapp-whitelisted"
export HUB_PERMISSIONED_KEY="$PERMISSIONED_KEY"
export HUB_KEY_WITH_FUNDS="$PERMISSIONED_KEY"
Create the address
dymd keys add $PERMISSIONED_KEY --keyring-backend=test
View address
dymd keys show $PERMISSIONED_KEY --address --keyring-backend test
This address publishes state updates and operates the RollApp, you don't need to whitelist this address.
Set max amount of sequencers (i.e. 1)
export MAX_SEQUENCERS=1
Create address
dymd keys add sequencer --keyring-dir "${ROLLAPP_HOME_DIR}/sequencer_keys" --keyring-backend test
Store address
export SEQUENCER_ADDR=$(dymd keys show sequencer --address --keyring-backend test --keyring-dir "${ROLLAPP_HOME_DIR}/sequencer_keys")
Fund the sequencer account
If you're using a remote hub node, you must fund the sequencer account or you must have an account with enough funds in your keyring.
# retrieve the minimal bond amount from hub sequencer params
# you have to account for gas fees so it should the final value should be increased
BOND_AMOUNT="$(dymd q sequencer params -o json | jq -r '.params.min_bond.amount')$(dymd q sequencer params -o json | jq -r '.params.min_bond.denom')"
# Extract the numeric part
NUMERIC_PART=$(echo $BOND_AMOUNT | sed 's/adym//')
# Add 100000000000000000000 for fees
NEW_NUMERIC_PART=$(echo "$NUMERIC_PART + 100000000000000000000" | bc)
# Append 'adym' back
TRANSFER_AMOUNT="${NEW_NUMERIC_PART}adym"
dymd tx bank send $HUB_KEY_WITH_FUNDS $SEQUENCER_ADDR ${TRANSFER_AMOUNT} --keyring-backend test --broadcast-mode block --fees 1dym -y --node ${HUB_RPC_URL}