eds: add BurnMintFactory URL resolution for utility-registry instruments #794
Merged
Conversation
…egistry endpoint Adds URL-based factory resolution for BurnMintTokenPool, enabling CCIP bridging for Splice utility-registry instruments (e.g. USD1) whose factory contracts (AllocationFactory) don't have an instanceId field and thus can't be resolved via the existing FactoryTypeAddress branch. Changes: - config.go: Add TokenStandardURL + TokenStandardAuthConfig fields to BurnMintFactory, extend validate tag to oneof='' address url - token_standard.go: Implement FactoryTypeURL branch calling DA's /mint/v0/request endpoint (read-only, returns factoryId + choice context with issuer-credentials + disclosed contracts). Use /mint/v0/request instead of /burn-mint-factory because the latter has a bug returning issuer-credentials: []. Both endpoints return the same factoryId (AllocationFactory) and context keys. Revisit when DA fixes /burn-mint-factory. - token_standard.go: Change burnMintFactory signature to return ChoiceContext (mirroring transferFactory) so credentials flow through - tokenpool.go: Merge factory-returned context into burn-mint-factory- extra-args-values context key at both send + execute paths - config_validation_test.go: Add test cases for FactoryTypeURL
stackman27
marked this pull request as ready for review
July 20, 2026 16:14
rodrigombsoares
approved these changes
Jul 20, 2026
JohnChangUK
approved these changes
Jul 20, 2026
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.
Summary
Adds URL-based factory resolution (
FactoryTypeURL) forBurnMintTokenPool, enabling CCIP bridging for Splice utility-registry instruments whose factory contracts don't have aninstanceIdfield and thus can't be resolved via the existingFactoryTypeAddressbranch.Problem
The EDS's
getBurnMintFactoryonly supportedFactoryTypeAddress, which callsacs.Get(InstanceAddress)against the local ACS store. This requires the factory contract to have aninstanceIdcreate-arg field (used to computekeccak256(instanceId@party)for address indexing).Utility-registry factory contracts (e.g.
AllocationFactoryfromutility-registry-app-v0) have create args{operator, provider, registrar}— noinstanceIdfield. They're silently dropped from the address index (getInstanceAddressesinactive_contract_store.gorequiresinstanceId), soacs.Getmisses and theburn-mint-factorycontext key is never populated. The pool'slookupBurnMintFactoryaborts with:Missing context entry for: burn-mint-factory
Additionally,
AllocationFactory_InternalBurnMintreadsinstrument-configurationandissuer-credentialsfrom the choice context (extraArgs.context.values). The existingFactoryTypeAddressbranch returns emptyChoiceContext{}, so evenif the factory were findable by address, the choice would fail on missing instrument config + credentials.
Solution
Config schema (
eds/config/config.go)TokenStandardURL+TokenStandardAuthConfigfields toBurnMintFactory(mirrorsTransferFactory's existing URL fields)oneof='' address→oneof='' address urlResolver (
eds/internal/api/tokenpool/token_standard.go)FactoryTypeURLbranch: calls DA's utility-registry backend endpoint via HTTP, parsesFactoryWithChoiceContextresponse (factoryId+choiceContext.choiceContextData+choiceContext.disclosedContracts)burnMintFactoryfunction signature to return(string, ChoiceContext, []DisclosedContract, error)— mirroringtransferFactory— so the credentials and instrument config returned by the backend can flow through to the pool'scontext
/mint/v0/requestendpoint (read-only, does not actually mint) because DA's/burn-mint-factoryendpoint currently has a bug returningissuer-credentials: []. Both endpoints return the samefactoryId(AllocationFactory) and the samecontext keys. Revisit when DA fixes
/burn-mint-factory— switchtoken_standard_urlconfig to the burn-mint-factory path and change the request body shape.Call sites (
eds/internal/api/tokenpool/tokenpool.go)ChoiceContext.Values(includingissuer-credentials+instrument-configuration) intoburnMintFactoryContext, which gets promoted tochoiceContext["burn-mint-factory-extra-args-values"]by existing code — thecontext key the pool reads at
BurnMintTokenPoolV2.daml:87-97Tests (
eds/config/config_validation_test.go)FactoryTypeURL(valid + missing URL)Config example