This guide uses Foundry to deploy your dApp to testnet or mainnet.
:::info Ensure Foundry is installed and accessible:
forge --version
If you don't have Foundry installed, please refer to the installation guide and set it up before proceeding. :::
Publish your program to the Coprocessor:
cartesi-coprocessor publish --network <testnet, mainnet>
Check Status:
cartesi-coprocessor publish-status --network <testnet, mainnet>
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.
:::
cartesi-coprocessor address-book
This command prints a list of useful contacts and their addresses.
:::note Retrieving important addresses Running this command in the directory containing your Cartesi program and not the base directory or solidity contract directory also displays the machine hash of your program if your program has been built previously. It also contains the task issuer which is the Coprocessor address your smart contract needs.
You can use those during the contract deployment step. :::
Deploys the solidity contract of your project to any specified network of your choice
cartesi-coprocessor deploy --contract-name <contract name> --network <testnet, mainnet> --constructor-args <arguments separated by single space>
:::note Run in the correct directory This should be run in the directory for your solidity contract not the base directory. :::
:::note Multiple Deploys Each successful deployment is logged and stored in a separate directory called deployment_history. :::