Skip to content

ulbqb/cw-dymension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CW Dymension

This is a engine contract (like x/rollapp and x/sequencer) of Dymension rollapp. This enables to run Dymension Rollapp on any Cosmwasm chains.

Demo on Neutron Testnet (Pion)

This demo uses a pre-deployed contract on Neutron testnet so you don't need to deploy the contract.

Clone CW Dymension

$ git clone https://github.com/ulbqb/cw-dymension.git
$ cd cw-dymension

Install Binaries

Install neutrond.

$ git clone https://github.com/neutron-org/neutron.git
$ cd neutron
$ git checkout v2.0.1
$ make install
$ neutrond version
2.0.1

Install rollapp-evm.

$ git clone https://github.com/ulbqb/rollapp-evm.git
$ cd rollapp-evm
$ git checkout 81405c59acb59285054cacc33a3f2932fccf83c2
$ make install
$ rollapp-evm version
HEAD-81405c59acb59285054cacc33a3f2932fccf83c2

Setup Enviroiment

Copy env file for Neutron testnet and generate rollapp id.

$ cd scripts
$ cp envs/pion.env env
$ perl -pi -e "s|^export ROLLAPP_CHAIN_ID=.*|export ROLLAPP_CHAIN_ID=$(tr -dc a-z </dev/urandom | head -c 8; echo)_1000-1|" env

Setup Account

Generate an account for sequencer.

$ neutrond keys add sequencer --keyring-backend test --home $HOME/.sequencer

Refer to Neutron Doc and get the test token. And then check your balance.

$ neutrond q bank balances $(neutrond keys show sequencer --keyring-backend test --home $HOME/.sequencer -a) --node https://rpc-palvus.pion-1.ntrn.tech:443
balances:
- amount: "1000000"
  denom: untrn
pagination:
  next_key: null
  total: "0"

Run Rollapp

Setup rollapp and run.

$ cd scripts
$ bash 6_init_rollapp.sh
$ bash 7_create_rollapp.sh
$ bash 8_create_sequencer.sh
$ bash 9_run_rollapp.sh
$ tail -f logs/rollapp-evm.log

Stop Rollapp

$ pkill rollapp-evm

Dependecies