Documentation
¶
Overview ¶
Package cantonops contains helpers for looking up or creating the Daml contracts the CLI commands depend on (PerPartyRouter, CCIPSender, CCIPReceiver) and for extracting a CCIPMessageSent message id from a submitted transaction.
Index ¶
- func GetMessageIdFromTransaction(tx *apiv2.Transaction) (string, error)
- func GetOrCreateReceiver(ctx context.Context, participant canton.Participant, ...) (string, error)
- func GetOrCreateRouter(ctx context.Context, participant canton.Participant, ...) (string, error)
- func GetOrCreateSender(ctx context.Context, participant canton.Participant) (string, error)
- func WaitForVerifierResult(ctx context.Context, idx *indexerclient.IndexerClient, messageID string, ...) (v1.VerifierResultsByMessageIDResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMessageIdFromTransaction ¶
func GetMessageIdFromTransaction(tx *apiv2.Transaction) (string, error)
GetMessageIdFromTransaction scans the transaction events for a created CCIPMessageSent contract and returns its message id, or an error.
func GetOrCreateReceiver ¶
func GetOrCreateReceiver( ctx context.Context, participant canton.Participant, receiverFinality core.FinalityConfig, requiredCCV contracts.RawInstanceAddress, ) (string, error)
GetOrCreateReceiver returns the CCIPReceiver contract id for the party with the requested finality config and attesting CCV, creating or updating one as needed. Multiple receivers per party are supported (e.g. full finality and FTF).
func GetOrCreateRouter ¶
func GetOrCreateRouter(ctx context.Context, participant canton.Participant, ccipEdsClient oapiCCIP.ClientWithResponsesInterface) (string, error)
GetOrCreateRouter returns the PerPartyRouter contract id for the participant's party, creating one via the factory if it doesn't exist.
func GetOrCreateSender ¶
GetOrCreateSender returns the CCIPSender contract id for the party, creating one if missing.
func WaitForVerifierResult ¶
func WaitForVerifierResult( ctx context.Context, idx *indexerclient.IndexerClient, messageID string, timeout time.Duration, ) (v1.VerifierResultsByMessageIDResponse, error)
WaitForVerifierResult polls the indexer for verifier results for the given message id until at least one is available, the context is cancelled or the timeout elapses.
Types ¶
This section is empty.