This repository hosts rollapp-evm
, a template implementation of a dymension rollapp with EVM
execution layer.
rollapp-evm
is an example of a working RollApp using dymension-RDK
and dymint
.
It uses Cosmos-SDK's simapp as a reference, but with the following changes:
- minimal app setup
- wired with EVM and ERC20 modules by Evmos
- wired IBC for ICS 20 Fungible Token Transfers
- Uses
dymint
for block sequencing and replacingtendermint
- Uses modules from
dymension-RDK
to sync withdymint
and provide RollApp custom logic
Note: Requires Go 1.20
Get started with building RollApps
Build and install the rollapp-evm
binary:
make install
export the following variables:
export ROLLAPP_CHAIN_ID="rollappEVM_1234-1"
export KEY_NAME_ROLLAPP="rol-user"
export DENOM="urax"
export MONIKER="$ROLLAPP_CHAIN_ID-sequencer"
And initialize the rollapp:
sh scripts/init.sh
rollapp-evm start
You should have a running local rollapp!
Follow the instructions on Dymension Hub docs to run local dymension hub node
create sequencer key using dymd
dymd keys add sequencer --keyring-dir ~/.rollapp_evm/sequencer_keys --keyring-backend test --algo secp256k1
SEQUENCER_ADDR=`dymd keys show sequencer --address --keyring-backend test --keyring-dir ~/.rollapp_evm/sequencer_keys`
fund the sequencer account
dymd tx bank send local-user $SEQUENCER_ADDR 10000000000000000000000udym --keyring-backend test --broadcast-mode block
sh scripts/settlement/register_rollapp_to_hub.sh
sh scripts/settlement/register_sequencer_to_hub.sh
Modify dymint.toml
in the chain directory (~/.rollapp_evm/config
)
set:
settlement_layer = "dymension"
rollapp-evm start
git clone https://github.com/dymensionxyz/go-relayer.git --branch v0.2.0-v2.3.1-relayer
cd relayer && make install
while the rollapp and the local dymension hub node running, run:
sh scripts/ibc/setup_ibc.sh
After successful run, the new established channels will be shown
rly start hub-rollapp
TODO