Skip to content

fix: update local USDCx bootstrap to create TransferOffer contracts instead of atomic holdings #258

@sadiq1971

Description

@sadiq1971

Problem

scripts/setup/bootstrap-usdcx.go creates a CIP56.TransferFactory::CIP56TransferFactory contract whose TransferFactory_Transfer choice creates CIP56Holding contracts atomically. On Canton devnet, DA's factory creates Utility.Registry.App.V0.Model.Transfer::TransferOffer contracts (pending state) — the receiver must exercise TransferInstruction_Accept to complete the transfer.

Local E2E tests pass because they never hit the offer/accept path. Devnet fails because they do.

Depends On

#257 (must know the correct template names and constructor fields first)

Changes Required

Option A (preferred — no Daml change): If utility_registry_app_v0 contains a bootstrappable factory template that creates TransferOffer contracts, update bootstrap-usdcx.go to create an instance of that template instead of CIP56TransferFactory. The utility_registry_app_v0 DARs are already deployed to both P1 and P2.

Option B (fallback — Daml change): Modify contracts/canton-erc20/daml/cip56-token/src/CIP56/TransferFactory.daml so TransferFactory_Transfer creates a Utility.Registry.App.V0.Model.Transfer::TransferOffer contract instead of a CIP56Holding. Rebuild the DAR.

In both cases, also bootstrap the required TransferRule contract(s) for the instrument. The accept choiceContext endpoint (see #259) queries these contracts from ACS.

Verification

After running updated bootstrap:

Metadata

Metadata

Assignees

Labels

Priority: P1Added to issues and PRs relating to a high severity bugs.Type: BugAdded to issues and PRs if they are addressing a bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions