Repository navigation
Switch Canton Chain to use dApp SDK Provider - #498
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
add class + parsing for CantonInstrumentId add static contract IDs to Canton ExtraArgs input simplify event parsing
createPerPartyRouter, createCCIPSender and createCCIPReceiver re-fetched the committed transaction by transactionHash. That field is only set for prepared transactions of external parties, so wallet submissions through prepareExecuteAndWait threw after the contract was created.
β¦t result submitCommands already returns the committed transaction, so createCCIPSender and createCCIPReceiver no longer fetch it again. createPerPartyRouter keeps one re-fetch for the interface views, without the guard for an id that is always set.
## What - Read the created contract from the transaction `submitCommands` returns in `createCCIPSender` and `createCCIPReceiver`, like `sendMessage` and `execute` do - Re-fetch by `updateId` instead of `transactionHash` in `createPerPartyRouter`, which still needs interface views ## Why - `transactionHash` is only set for prepared transactions of external parties. Wallet submissions through `prepareExecuteAndWait` leave it empty, so each create threw after the contract landed: ``` CantonChain.createPerPartyRouter: failed to create router: transaction hash not found in submitted transaction ``` - Hit in Transporter canton -> evm send setup with a fresh party on `c59d9415` ## Testing - No automated tests: `CantonChain` has a private constructor and no tests for the creates. `npm run typecheck`, `oxlint`, `oxfmt --check` and the 109 `src/canton` tests pass - Transporter, canton -> evm send with a fresh party, `disableAutomaticContractCreation: true`: 1. On `c59d9415`, sign the PerPartyRouter step. Confirm the error above, and that the retry lists only the CCIPSender step (the router was created) 2. On this branch, sign both steps. Confirm each create returns the contract id (not run yet) ## Notes - Stacked on #498 [JIRA](https://smartcontract-it.atlassian.net/browse/DAPP-12011)
|
You must have Developer access to commit code to Chainlink Labs on Vercel. If you contact an administrator and receive Developer access, commit again to see your changes. Learn more: https://vercel.com/docs/accounts/team-members-and-roles/access-roles#team-level-roles |
createPerPartyRouter, createCCIPSender and createCCIPReceiver return
{ contractId, updateId }, so callers that sign each create on its own
can link and confirm the ledger update without reading the wallet
response. The getOrCreate helpers still return the contract id.
## What
- Return `{ contractId, updateId }` from `createPerPartyRouter`,
`createCCIPSender` and `createCCIPReceiver` (new `CantonCreatedContract`
type)
- `getOrCreate*` still return the contract id
## Why
- Transporter signs each setup create as its own tx and shows its update
id as the tx link. Today it wraps the provider to read
`tx.payload.updateId` from `prepareExecuteAndWait`, which depends on the
wallet response shape
## Testing
- No automated tests: `CantonChain` has a private constructor and no
tests for the creates. `npm run typecheck -w ccip-sdk`, `oxlint`, `oxfmt
--check` and the 109 `src/canton` tests pass
- Transporter, canton -> evm send with a fresh party,
`disableAutomaticContractCreation: true`, provider wrapper removed (not
run yet):
1. Sign the PerPartyRouter step. Confirm the step links its update id
2. Sign the CCIPSender step, then the send. Confirm the send goes
through
## Notes
- Breaking for the three creates, but they are public only on
`canton-provider` (private on `main`, never released)
- `npm run typecheck` already fails in `ccip-cli` on `canton-provider`:
`filterEndpointsForFamily` and `isCantonLedgerUrl` are not exported
[JIRA](https://smartcontract-it.atlassian.net/browse/DAPP-12011)
getCCIPReceiver skipped a WaitForSafe receiver when the message finality was 'safe' and accepted it for every other finality. A safe message never found its receiver, and a finalized or block-depth message could resolve to a safe receiver. Move the finality match into receiverFinalityMatches with the WaitForSafe case fixed, and cover each receiver config against each finality.
# Conflicts: # ccip-api-ref/docs-cli/configuration.mdx # ccip-cli/package.json # ccip-cli/src/index.ts # ccip-cli/src/providers/index.ts # ccip-sdk/package.json # ccip-sdk/src/api/index.ts # ccip-sdk/src/canton/client/client.ts # ccip-sdk/src/canton/client/index.ts # ccip-sdk/src/canton/events.ts # ccip-sdk/src/canton/explicit-disclosures/eds.ts # ccip-sdk/src/canton/index.ts # ccip-sdk/src/canton/token-metadata/client.ts # ccip-sdk/src/canton/transfer-instruction/client.ts # ccip-sdk/src/canton/types.ts # ccip-sdk/src/canton/update-id.ts # package-lock.json
β¦vider # Conflicts: # ccip-sdk/src/canton/index.ts
CI Test Reportβ 4483/4483 tests passed (1111 suites) in 5m 50s SummaryCoverage report |
) ## What - Fix the `WaitForSafe` case in `CantonChain.getCCIPReceiver`: a safe receiver now matches only `'safe'` messages - The finality match moved into `receiverFinalityMatches` (`canton/receiver-finality.ts`) so it can be unit tested ## Why - The check was inverted (`if (finality === 'safe') return undefined`): - A safe message never found its receiver, so the setup step kept asking for a new one and `execute` threw with `disableAutomaticContractCreation` - A finalized or block-depth message could resolve to an existing safe receiver with the same CCVs ## Testing - `receiver-finality.test.ts` covers each receiver config against each finality; it fails on the old logic. All 113 `src/canton` tests, `tsc --noEmit`, `oxlint` and `oxfmt --check` pass in `ccip-sdk` - Not run against a ledger: Transporter has no safe-finality lane to Canton yet [JIRA](https://smartcontract-it.atlassian.net/browse/DAPP-11855)
# Conflicts: # ccip-sdk/package.json # ccip-sdk/src/canton/index.ts # package-lock.json
friedemannf
marked this pull request as ready for review
November 9, 2026 14:40
andrevmatos
approved these changes
Nov 10, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.