Skip to content

CCTP V2 on Sui - #32

Merged
cyan1-circle merged 1 commit into
circlefin:masterfrom
drewstaylor:feature/contracts-v2
Oct 5, 2026
Merged

cyan1-circle merged 1 commit into
circlefin:masterfrom
drewstaylor:feature/contracts-v2

Conversation

@drewstaylor

Copy link
Copy Markdown
Contributor

V2 Sui smart contracts used by the Cross-Chain Transfer Protocol.

@drewstaylor
drewstaylor force-pushed the feature/contracts-v2 branch 3 times, most recently from bee7005 to 6bef662 Compare September 21, 2026 15:28
Brings the repository up to date with the current V2 contract source.
The tree had not been updated since the V1 launch, so this is a large
change: four new Move packages, a rewritten scripts/ tree, and new
root infrastructure.

Contracts
- New packages: cctp_extensions, message_transmitter_v2,
  token_messenger_minter_v2 and stablecoin_handler, each with version
  control, migration and role management.
- V1 packages are frozen, already-deployed artifacts. They are retained
  and continue to build under their original Sui release.

Tooling
- setup.sh installs both pinned Sui toolchains into ./bin (v1.37.3 for
  V1, v1.76.1 for V2), initializes submodules, and applies the
  stablecoin-sui unpin patch. versions.sh holds the package to toolchain
  mapping.
- run.sh builds, tests and verifies each package with its pinned
  toolchain and build environment.
- scripts/sui/ replaces scripts/sui-scripts/, adding V2 deploy, example
  and upgrade/migration tooling alongside the existing V1 scripts.
- scripts/test/ adds V2 unit and end-to-end suites. The V2 end-to-end
  suite synthesizes EVM messages in TypeScript, so it needs only a local
  Sui node.
- The V2 example scripts run against localnet, testnet or mainnet. Object
  ids come from the dotenv record named by `--config`, so a caller who did
  not deploy the contracts can point them at an existing deployment with
  their own key. Off localnet no attestation is forged: the burn prints the
  message and the url to poll, and the receive requires `--message` and
  `--attestation` from the attestation service. `scripts/sui/network.ts`
  and `scripts/sui/exampleCli.ts` hold the shared network resolution and
  CLI helpers.

Dependencies
- stablecoin-sui and evm-cctp-contracts submodules advance to the
  revisions the V2 packages build against.
- Removes the empty root yarn.lock, a stale Yarn v1 artifact; the
  project uses Yarn 3 under scripts/.
- Does not carry over editor configuration; .vscode/ is a local
  preference rather than something the project should pin.
- Adds CONTRIBUTING.md, which the repository was missing. Uses Circle's
  standard public template with the repository name substituted.

Verified on a clean checkout: setup.sh completes, all six packages
build, and lint and formatting are clean. `./run.sh test --version 2`
passes 391 of 391 Move tests with coverage at or above 99.85% per
package, the V2 end-to-end suite passes 35 tests against a local node,
and both example scripts complete a localnet burn and receive.
@drewstaylor
drewstaylor force-pushed the feature/contracts-v2 branch from 4f78b89 to efa8676 Compare October 1, 2026 19:28
@cyan1-circle
cyan1-circle merged commit b23b83b into circlefin:master Oct 5, 2026
1 check passed
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.

2 participants