Skip to main content

Create your first dApp

Once you learned how to run a simple example, it is now time to create one of your own. In order to do this, we will make use of the dApp template available in Cartesi's rollups-examples Github repository. Once again, make sure you have installed all the necessary requirements before proceeding.

Setting up the environment

First of all, clone the repository as follows:

$ git clone https://github.com/cartesi/rollups-examples.git

Customizing the dApp

Then, use create-dapp.sh to create a customized dApp:

cd custom-dapps
./create-dapp.sh <dapp-name>

A new directory, <dapp-name>, will be created with all the boiler plate infrastructure needed by the new dApp.

The new dApp will be provided with some basic back-end code, resembling what is available in the sample Echo Python dApp, as explained in the previous section.

Modifying the dApp logic

The back-end logic may be found at <dapp-name>/<dapp-name>.py.

The script comes with some reference code, which may be helpful during development. It may be replaced or extended according to the use case needs.

© 2024 Cartesi Foundation Ltd. All rights reserved.

The Cartesi Project is commissioned by the Cartesi Foundation.

We use cookies to ensure that we give you the best experience on our website. By using the website, you agree to the use of cookies.