Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dymensionxyz/rollapp
Template for building RollApps
https://github.com/dymensionxyz/rollapp
rdk rollapps template
Last synced: 4 days ago
JSON representation
Template for building RollApps
- Host: GitHub
- URL: https://github.com/dymensionxyz/rollapp
- Owner: dymensionxyz
- License: apache-2.0
- Created: 2023-07-09T07:39:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-19T14:32:43.000Z (6 months ago)
- Last Synced: 2024-09-09T11:09:16.071Z (2 months ago)
- Topics: rdk, rollapps, template
- Language: Go
- Homepage:
- Size: 603 KB
- Stars: 65
- Watchers: 6
- Forks: 53
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - dymensionxyz/rollapp - Template for building RollApps (Go)
README
Dymension Rollapp
# Rollappd - A template RollApp chain
This repository hosts `rollappd`, a template implementation of a dymension rollapp.
`rollappd` is an example of a working RollApp using `dymension-RDK` and `dymint`.
It uses Cosmos-SDK's [simapp](https://github.com/cosmos/cosmos-sdk/tree/main/simapp) as a reference, but with the following changes:
- minimal app setup
- wired IBC for [ICS 20 Fungible Token Transfers](https://github.com/cosmos/ibc/tree/main/spec/app/ics-020-fungible-token-transfer)
- Uses `dymint` for block sequencing and replacing `tendermint`
- Uses modules from `dymension-RDK` to sync with `dymint` and provide RollApp custom logic## Overview
**Note**: Requires [Go 1.19](https://go.dev/)
## Quick guide
Get started with [building RollApps](https://docs.dymension.xyz/develop/get-started/setup)
## Installing / Getting started
Build and install the ```rollappd``` binary:
```shell
make install
```### Initial configuration
export the following variables:
```shell
export ROLLAPP_CHAIN_ID="demo-dymension-rollapp"
export KEY_NAME_ROLLAPP="rol-user"
export DENOM="urax"
export MONIKER="$ROLLAPP_CHAIN_ID-sequencer"
```And initialize the rollapp:
```shell
sh scripts/init.sh
```### Run rollapp
```shell
rollappd start
```You should have a running local rollapp!
## Run a rollapp with local settlement node
### Run local dymension hub node
Follow the instructions on [Dymension Hub docs](https://docs.dymension.xyz/develop/get-started/run-base-layers) to run local dymension hub node
### Create sequencer keys
create sequencer key using `dymd`
```shell
dymd keys add sequencer --keyring-dir ~/.rollapp/sequencer_keys --keyring-backend test
SEQUENCER_ADDR=`dymd keys show sequencer --address --keyring-backend test --keyring-dir ~/.rollapp/sequencer_keys`
```fund the sequencer account
```shell
dymd tx bank send local-user $SEQUENCER_ADDR 10000000000000000000000udym --keyring-backend test --broadcast-mode block
```### Register rollapp on settlement
```shell
sh scripts/settlement/register_rollapp_to_hub.sh
```### Register sequencer for rollapp on settlement
```shell
sh scripts/settlement/register_sequencer_to_hub.sh
```### Configure the rollapp
Modify `dymint.toml` in the chain directory (`~/.rollapp/config`)
set:```shell
settlement_layer = "dymension"
```### Run rollapp locally
```shell
rollappd start
```## Setup IBC between rollapp and local dymension hub node
### Install dymension relayer
```shell
git clone https://github.com/dymensionxyz/go-relayer.git --branch v0.2.0-v2.3.1-relayer
cd relayer && make install
```### Establish IBC channel
while the rollapp and the local dymension hub node running, run:
```shell
sh scripts/ibc/setup_ibc.sh
```After successful run, the new established channels will be shown
### run the relayer
```shell
rly start hub-rollapp
```## Developers guide
TODO