:::info All the instructions listed on this page are for building using the Cartesi Coprocessor CLI. For an approach that does not use the CLI, please refer to the manual section of this tutorial. :::
Create a new Cartesi dApp project:
cartesi-coprocessor create --dapp-name <project_name> --template <go, python, javascript, rust>
cd my-cartesi-project
Implement your business logic by editing the pre-generated child contract in the src
folder to customize your logic.
Publish your program to the Coprocessor:
cartesi-coprocessor publish --network <devnet, mainnet or testnet>
This command not only builds the image of your Cartesi Machine, containing the application logic, but also uploads it to a pre-signed URL generated by the coprocessor solver then finally publishes the upload ID generated by that process to the solver, so it can invoke your application logic whenever a smart contract makes a call to it.
Check Publish Status:
cartesi-coprocessor publish-status --network <devnet, mainnet or testnet>
Checks with the Coprocessor task issuer for the status of the machine download process.
:::note
This should be run in the directory for your Cartesi program.
Not the base directory or the solidity contract directory.
:::
:::info On your local environment To be able to use these commands on your local environment you need to startup your devnet first.
Run the Cartesi Coprocessor Devnet Environment:
cartesi-coprocessor start-devnet
To stop and clean up the environment later, use:
cartesi-coprocessor stop-devnet
:::