Upgrade to rollups-contracts 3.0.0-alpha.9 - #151
Conversation
🦋 Changeset detectedLatest commit: 3e3c26e The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
guidanoli
left a comment
There was a problem hiding this comment.
Glad to see TXT files were easier to parse in TypeScript!
Just raising two minor documentation nits.
|
@tuler, even though I don't see it in the changed files here when I check out the branch, I got some warnings and noticed the git submodule file is missing. Also, the README in the root matches the |
The release assets were renamed from `rollups-contracts-<version>-*.tar.gz` to `cartesi-rollups-contracts-<version>-*.tar.gz`, so the default tarball URLs change along with `DEFAULT_VERSION` and the expected SHA-256 hashes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MfKJYzfUL9quYaKBwQ7CwW
Update the `include` lists to the renamed contracts (`ERC` is now spelled `Erc`), drop the `DataAvailability` library, which the release removed, and pick up `RefundOutputBuilder`, which it deploys as a core contract. The node still reports an application's data availability as a call encoded against the removed library, so `@cartesi/client` keeps a local copy of its ABI to decode that field, leaving `Application.dataAvailability` unchanged. The docs deposit examples follow the portal function renames. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MfKJYzfUL9quYaKBwQ7CwW
3.0.0-alpha.7 restricts the published build artifacts to the contracts clients are expected to use, so curating an `include` list here is redundant. The codec package keeps its list, as it only needs the input and output interfaces plus the portals it dispatches deposits on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MfKJYzfUL9quYaKBwQ7CwW
The release is additive over alpha.7: no contract renames or interface changes, a new devnet `TestUsdc` token, and redeployed core contracts, so every address changes again. It also writes deployment addresses as plaintext `<Contract>.txt` files and deprecates the JSON ones, advising clients to migrate. Read the plaintext files when a chain directory has them, taking the contract name from the file name, and keep reading the JSON files otherwise, so older releases still work. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MfKJYzfUL9quYaKBwQ7CwW
… files Nothing older than rollups-contracts 3.0.0-alpha.8 needs to be supported, so drop the JSON deployment reader instead of keeping it as a fallback. A chain directory without plaintext files now fails with an explicit error, rather than silently generating contracts without addresses. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MfKJYzfUL9quYaKBwQ7CwW
They pinned 3.0.0-alpha.6, which ships neither the `cartesi-` prefixed release assets nor the plaintext deployment files the plugin now reads, so the example no longer worked. Point it at 3.0.0-alpha.8 and state that the release must be that one or later. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MfKJYzfUL9quYaKBwQ7CwW
`downloadAndExtract` no longer caches across runs, so the page contradicted the README and the plugin documentation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MfKJYzfUL9quYaKBwQ7CwW
5fbf1fc to
0c9a591
Compare
No, it was just a little behind, not main. Started when |
|
@tuler I know there is the PRT PR #162. However, should we include the |
The release is additive over alpha.8, but it also ships an anvil tarball carrying the deployment addresses on the devnet (chain 31337) next to the state dump the devnet is started from. Read it through the new `anvil` option, defaulting to the `DEFAULT_VERSION` release and disabled with `false`, and merge those addresses into the generated contracts. The devnet is where the test tokens and the USD withdrawal output builder live. The latter is stored as `TestUsdWithdrawalOutputBuilder`, a name no artifact matches, since the release publishes the interface but not the concrete contract the factory deploys, so it takes the ABI of `IUsdWithdrawalOutputBuilder` through an alias. Core contracts are deployed at the same addresses on the devnet as on the livenets, so they keep collapsing to a single address. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MfKJYzfUL9quYaKBwQ7CwW
Summary
Move the generated contracts from rollups-contracts
3.0.0-alpha.6to3.0.0-alpha.9, and generate the devnet addresses alongside the livenet ones.Every deployment address changed, and the contracts were renamed and curated along the way, so this is a breaking change for
@cartesi/client,@cartesi/reactand@cartesi/codec.@cartesi/wagmi-pluginDEFAULT_VERSIONis now3.0.0-alpha.9, with new SHA-256 hashes. Release assets are namedcartesi-rollups-contracts-<version>-*.tar.gzsince alpha.7, so the default URLs changed shape too.<chainId>/<Contract>.txtfiles that alpha.8 introduced, which deprecate the JSON ones. The JSON files are no longer read: adeploymentstarball older than alpha.8 now fails with an explicit error instead of silently generating contracts without addresses.anviloption, defaulting to the release's anvil tarball (DEFAULT_ANVIL,DEFAULT_ANVIL_VERSION). Besides the state dump the devnet is started from, that tarball carries the deployment addresses on chain 31337, which are now merged into the generated contracts. Setanvil: falseto generate livenet addresses only.TestUsdWithdrawalOutputBuilderis deployed on the devnet under a name no artifact matches, because the release publishesIUsdWithdrawalOutputBuilderbut not the concrete contract the factory deploys. It takes the interface ABI through an alias, so it is generated like any other deployed contract.@cartesi/client,@cartesi/reactand@cartesi/codecERCis spelledErcin contract names since alpha.7, so the generated identifiers follow:ISafeERC20Transfer→ISafeErc20Transfer, and the portal deposit functions becomedepositErc20Tokens,depositErc721Token,depositSingleErc1155TokenanddepositBatchErc1155Token.erc20PortalAbiand friends keep their names.DataAvailabilitylibrary was removed from rollups-contracts in alpha.7, so its ABI is no longer generated. The node still reportsdata_availabilityas a call encoded against it, so@cartesi/clientdecodes that field against a local copy of the ABI andApplication.dataAvailabilityis unchanged.@cartesi/clientand@cartesi/reactno longer curate anincludelist and generate the whole set.RefundOutputBuilder, the devnet test tokens (TestFungibleToken,TestNonFungibleToken,TestMultiToken,TestUsdc) andTestUsdWithdrawalOutputBuilderjoin the previously generated contracts.@cartesi/codeckeeps its list, since it only needs the input and output interfaces plus the portals it dispatches deposits on.Verification
pnpm build,@cartesi/codec(70 tests) and@cartesi/client(6 tests) pass, along withbiome check.https://claude.ai/code/session_01MfKJYzfUL9quYaKBwQ7CwW