Skip to main content

Building and Running locally

Running the node

To test and develop your app locally it is higly recommended that you use Brunodo since it contains all the experiemental features from Nonodo such as simulating Avail inputs.

With it you can skip a lot of the setup and send EIP-712 messages directly to the node using the nonce and submit endpoints that will be running on localhost:8080/nonce and localhost:8080/submit

  • Start brunodo using the command;
brunodo

Running the Machine

  • In another terminal, create and build a new Cartesi dApp using the following commands:

1. Python

cartesi create my-dapp --template python
cd my-dapp
cartesi build
  • Run the Cartesi Machine Locally on bare metal using the command;
cartesi-machine --network --flash-drive=label:root,filename:.cartesi/image.ext2 \
--volume=.:/mnt --env=ROLLUP_HTTP_SERVER_URL=http://10.0.2.2:5004 --workdir=/mnt -- python dapp.py

2. Rust

cartesi create my-dapp --template rust
cd my-dapp
cartesi build
  • Run the Cartesi Machine Locally on bare metal using the command;
cartesi-machine --network --flash-drive=label:root,filename:.cartesi/image.ext2 --env=ROLLUP_HTTP_SERVER_URL=http://10.0.2.2:5004 -- /opt/cartesi/dapp/dapp

3. Golang

cartesi create my-dapp --template go
cd my-dapp
cartesi build
  • Run the Cartesi Machine Locally on bare metal using the command;
cartesi-machine --network --flash-drive=label:root,filename:.cartesi/image.ext2 --env=ROLLUP_HTTP_SERVER_URL=http://10.0.2.2:5004 -- /opt/cartesi/dapp/dapp

4. Javascript

cartesi create my-dapp --template javascript
cd my-dapp
cartesi build
  • Run the Cartesi Machine Locally on bare metal using the command;
cartesi-machine --network --flash-drive=label:root,filename:.cartesi/image.ext2 \
--volume=.:/mnt --env=ROLLUP_HTTP_SERVER_URL=http://10.0.2.2:5004 --workdir=/opt/cartesi/dapp -- node index