See the contract repo for an overview of the Celer rollup architecture.
- Make sure you have
go
,geth
andmake
installed. - Prepare an Ethereum keystore file with an empty password. Eg. run:
geth account new --lightkdf --keystore <path-to-keystore-folder>
- We have mapped an ERC-20 token named MOON from Ropsten to the sidechain. Join our Discord server. Ping us to obtain some MOON tokens and sidechain ETH for gas. You should also obtain some Ropsten ETH from places like the MetaMask faucet.
- Clone the repository and install the demo binary:
git clone https://github.com/celer-network/go-rollup
cd go-rollup
make install-demo
- Deposit into the sidechain:
rollupdemo deposit --keystore <path-to-keystore-file> --amount <amount>
This deposits <amount>
MOON tokens into the sidechain.
- For an example of account-to-account transfer, run:
rollupdemo transfer-to-account --keystore <path-to-keystore-file> --recipient <recipient-address> --amount <amount>
This transfers <amount>
MOON tokens from the sender to the recipient.
- For an example of contract interaction, run:
rollupdemo transfer-to-contract --keystore <path-to-keystore-file> --amount <amount>
This deploys a dummy dApp
contract
on the sidechain and sends <amount>
MOON tokens to it.
- Deposit is sent to DepositWithdrawManager contract on Ropsten. The rollup aggregator will relay the deposit and mint corresponding amount of tokens on the sidechain.
- Optional rollup security for account-to-account transfers is ensured by registering on the AccountRegistry.
- Transfer to contracts and external accounts are similar to a regular ERC-20 transfer, with the exception that an additional signature needs to be supplied (Example).
- The rollup aggregator will pack the transfers into rollup blocks and commit to Ropsten.