Skip to content

Conversation

jplgarcia
Copy link

This PR introduces a comprehensive tutorial for deploying Cartesi Rollups Apps. The tutorial covers:

  • Setup of dependencies
  • Deploying the Cartesi core contracts to testnet/mainnet
  • Deploying application contracts
  • Detailed explanation of contract parameters
  • Explanation on data-availability parameter


Before beginning, ensure your environment is correctly set up. This includes having:

* [Corepack](https://nodejs.org/api/corepack.html), which manages multiple Node.js package managers,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add just pnpm as a depencency? The user maybe using pnpm through corepack but it is not strictly necessary.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We list corepack as a dependency on the root README because it already downloads the correct pnpm version listed on the package.json, although I agree that it is not strictly necessary because you could just install the correct version of pnpm yourself. I'd take a different route: just point to the "Getting started" section of the root README. If we decide to change the dependency list to pnpm instead of corepack, it's only one place we need to update, not two.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added reference to getting started in the deployment tutorial, for the interacting i had to explicitly link usecannon on a tip since it was not mentioned before

--private-key $DEPLOYER_PK --rpc-url $RPC_URL
```

After this transaction is confirmed, your Cartesi Rollups Application will be live and ready to process inputs through the deployed core and application contracts.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a section on how to send input to applications.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree. This is a tutorial on deploying contracts. We can later create another tutorial for interacting with the contracts, what do you think?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to write another tutorial on that once we wrap up this one


Before deploying, you can predict the addresses of your application and authority contracts using:

```bash

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a section showing how to use interactive cannon as an alternative to cast.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's easier to instruct people to use cast because it is non-interactive, though I'd also mention that Cannon has an interactive CLI and encourage curious readers to explore that route as well (though Cannon documentation is lacking).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this as a tip

Copy link
Collaborator

@guidanoli guidanoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, João. Nice work!

I think it would be better if we split the tutorial into two:

  1. docs/deploying.md - Deploying the Cartesi Rollups Contracts: just the singletons listed in the Cannonfile.

  2. docs/interacting.md - Interacting with the Cartesi Rollups Contracts: deploying contracts via ApplicationFactory, AuthorityFactory, and SelfHostedApplicationFactory; adding inputs; depositing assets; etc.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add documentation about deploying and interacting with the contracts
3 participants