Documentation
¶
Index ¶
- Variables
- func ResolveLocalDecimals(ctx context.Context, client coinMetadataClient, tokenType string, ...) (byte, error)
- func SerializeMcmsObjectAddrs(ids ...string) ([]byte, error)
- func ValidateRegisterPoolLocalDecimals(ctx context.Context, client coinMetadataClient, tokenType string, ...) error
- type AcceptAdminRoleInput
- type AcceptOwnershipStateObjectInput
- type AcceptOwnershipStateObjectObjects
- type AddAllowedModulesStateObjectInput
- type AddAllowedModulesStateObjectObjects
- type AddPackageIdStateObjectInput
- type AddPackageIdStateObjectObjects
- type BackfillAllLocalDecimalsInput
- type BackfillAllLocalDecimalsOutput
- type BackfillLocalDecimalsInput
- type BackfillLocalDecimalsSeqInput
- type BackfillLocalDecimalsSeqOutput
- type BlockFunctionInput
- type BlockFunctionObjects
- type BlockVersionInput
- type BlockVersionObjects
- type DeployAndInitCCIPSeqInput
- type DeployAndInitDummyReceiverInput
- type DeployCCIPInput
- type DeployCCIPObjects
- type DeployCCIPSeqObjects
- type DeployCCIPSeqOutput
- type DeployDummyReceiverInput
- type DeployDummyReceiverObjects
- type DeployDummyReceiverSeqObjects
- type DeployDummyReceiverSeqOutput
- type DestroyFeeQuoterCapInput
- type ExecuteOwnershipTransferToMcmsStateObjectInput
- type ExecuteOwnershipTransferToMcmsStateObjectObjects
- type FeeQuoterApplyDestChainConfigUpdatesInput
- type FeeQuoterApplyFeeTokenUpdatesInput
- type FeeQuoterApplyPremiumMultiplierWeiPerEthUpdatesInput
- type FeeQuoterApplyTokenTransferFeeConfigUpdatesInput
- type FeeQuoterUpdatePricesWithOwnerCapInput
- type FeeQuoterUpdateTokenPricesInput
- type GetModuleRestrictionsInput
- type GetModuleRestrictionsOutput
- type GetOwnerCapIdStateObjectInput
- type GetOwnerCapIdStateObjectOutput
- type GetOwnerStateObjectInput
- type GetOwnerStateObjectOutput
- type GetPendingTransferStateObjectInput
- type GetPendingTransferStateObjectOutput
- type InitFeeQuoterInput
- type InitFeeQuoterObjects
- type InitLocalDecimalsInput
- type InitNMInput
- type InitNMObjects
- type InitRMNRemoteInput
- type InitRMNRemoteObjects
- type InitRecRegInput
- type InitRecRegObjects
- type InitTARInput
- type InitTARObjects
- type InitUpgradeRegistryInput
- type InitUpgradeRegistryObjects
- type IsFunctionAllowedInput
- type IsFunctionAllowedOutput
- type NewFeeQuoterCapInput
- type NewFeeQuoterCapObjects
- type NoObjects
- type RMNRemoteCurseInput
- type RMNRemoteCurseMultipleInput
- type RMNRemoteSetConfigInput
- type RMNRemoteUncurseInput
- type RMNRemoteUncurseMultipleInput
- type RegisterDummyReceiverInput
- type RegisterDummyReceiverObjects
- type RemovePackageIdStateObjectInput
- type RemovePackageIdStateObjectObjects
- type TransferAdminRoleInput
- type TransferOwnershipStateObjectInput
- type TransferOwnershipStateObjectObjects
- type UnblockFunctionInput
- type UnblockFunctionObjects
- type UnblockVersionInput
- type UnblockVersionObjects
- type UnregisterPoolInput
- type VerifyFunctionAllowedInput
- type VerifyFunctionAllowedObjects
- type VerifyLocalDecimalsInput
- type VerifyLocalDecimalsMismatch
- type VerifyLocalDecimalsOutput
Constants ¶
This section is empty.
Variables ¶
var AcceptOwnershipStateObjectOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "state_object", "accept_ownership"), semver.MustParse("0.1.0"), "Accepts ownership of the CCIP StateObject", acceptOwnershipStateObjectHandler, )
var AddAllowedModulesStateObjectOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "state_object", "add_allowed_modules"), semver.MustParse("0.1.0"), "Adds module names to the MCMS registry allowlist via the CCIP state_object MCMS entrypoint (state_object::add_allowed_modules)", addAllowedModulesStateObjectHandler, )
var AddPackageIdStateObjectOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "state_object", "add_package_id"), semver.MustParse("0.1.0"), "Adds a new package ID to the CCIP StateObject for upgrade tracking", addPackageIdStateObjectHandler, )
var AllOperationsCCIP = []any{ *FeeQuoterInitializeOp, *FeeQuoterApplyFeeTokenUpdatesOp, *FeeQuoterApplyTokenTransferFeeConfigUpdatesOp, *FeeQuoterApplyDestChainConfigUpdatesOp, *FeeQuoterApplyPremiumMultiplierWeiPerEthUpdatesOp, *FeeQuoterUpdateTokenPricesOp, *FeeQuoterNewFeeQuoterCapOp, *FeeQuoterDestroyFeeQuoterCapOp, *FeeQuoterUpdatePricesWithOwnerCapOp, *AddPackageIdStateObjectOp, *RemovePackageIdStateObjectOp, *GetOwnerCapIdStateObjectOp, *GetOwnerStateObjectOp, *GetPendingTransferStateObjectOp, *TransferOwnershipStateObjectOp, *AcceptOwnershipStateObjectOp, *ExecuteOwnershipTransferToMcmsStateObjectOp, *AddAllowedModulesStateObjectOp, *TokenAdminRegistryInitializeOp, *TokenAdminRegistryInitializeLocalDecimalsOp, *TokenAdminRegistryBackfillLocalDecimalsOp, *TokenAdminRegistryBackfillAllLocalDecimalsOp, *TokenAdminRegistryVerifyLocalDecimalsOp, *TokenAdminRegistryUnregisterPoolOp, *TokenAdminRegistryTransferAdminRoleOp, *TokenAdminRegistryAcceptAdminRoleOp, *UpgradeRegistryInitializeOp, *BlockVersionOp, *BlockFunctionOp, *UnblockFunctionOp, *UnblockVersionOp, *GetModuleRestrictionsOp, *IsFunctionAllowedOp, *VerifyFunctionAllowedOp, *RMNRemoteInitializeOp, *RMNRemoteSetConfigOp, *RMNRemoteCurseOp, *RMNRemoteCurseMultipleOp, *RMNRemoteUncurseOp, *RMNRemoteUncurseMultipleOp, }
Exports every operation available so they can be registered to be used in dynamic changesets
var BackfillLocalDecimalsSequence = cld_ops.NewSequence( sui_ops.NewSuiOperationName("ccip", "token_admin_registry", "backfill_local_decimals"), semver.MustParse("0.1.0"), "Verifies and backfills local token decimals, producing MCMS proposal inputs when ProposalOnly is set", func(b cld_ops.Bundle, deps sui_ops.OpTxDeps, input BackfillLocalDecimalsSeqInput) (BackfillLocalDecimalsSeqOutput, error) { reports := make([]cld_ops.Report[any, any], 0) verifyReport, err := cld_ops.ExecuteOperation( b, TokenAdminRegistryVerifyLocalDecimalsOp, deps, VerifyLocalDecimalsInput{ CCIPPackageId: input.CCIPPackageId, StateObjectId: input.StateObjectId, }, ) if err != nil { return BackfillLocalDecimalsSeqOutput{}, fmt.Errorf("failed to verify local decimals: %w", err) } reports = append(reports, verifyReport.ToGenericReport()) mismatches := verifyReport.Output.Objects.Mismatches if len(mismatches) > 0 && input.VerifyOnly { return BackfillLocalDecimalsSeqOutput{Reports: reports}, fmt.Errorf( "local decimals verification failed for %d token(s)", len(mismatches), ) } if input.VerifyOnly || len(mismatches) == 0 { return BackfillLocalDecimalsSeqOutput{Reports: reports}, nil } if input.ProposalOnly || deps.Signer == nil { originalPkgId := input.OriginalCCIPPackageId if originalPkgId == "" { originalPkgId = input.CCIPPackageId } encodeDeps := deps if input.ProposalOnly { encodeDeps.Signer = nil } defs := make([]cld_ops.Definition, 0, len(mismatches)) inputs := make([]any, 0, len(mismatches)) for _, mismatch := range mismatches { report, err := cld_ops.ExecuteOperation( b, TokenAdminRegistryBackfillLocalDecimalsOp, encodeDeps, BackfillLocalDecimalsInput{ CCIPPackageId: originalPkgId, LatestPackageId: input.CCIPPackageId, StateObjectId: input.StateObjectId, OwnerCapObjectId: input.OwnerCapObjectId, CoinMetadataAddress: mismatch.CoinMetadataAddress, TokenType: mismatch.TokenType, }, ) if err != nil { return BackfillLocalDecimalsSeqOutput{Reports: reports}, fmt.Errorf( "failed to encode backfill local decimals for %s: %w", mismatch.CoinMetadataAddress, err, ) } defs = append(defs, report.Def) inputs = append(inputs, report.Input) reports = append(reports, report.ToGenericReport()) } return BackfillLocalDecimalsSeqOutput{ Reports: reports, McmsDefs: defs, McmsInputs: inputs, }, nil } backfillReport, err := cld_ops.ExecuteOperation( b, TokenAdminRegistryBackfillAllLocalDecimalsOp, deps, BackfillAllLocalDecimalsInput{ CCIPPackageId: input.CCIPPackageId, StateObjectId: input.StateObjectId, OwnerCapObjectId: input.OwnerCapObjectId, }, ) if err != nil { return BackfillLocalDecimalsSeqOutput{Reports: reports}, fmt.Errorf("failed to backfill local decimals: %w", err) } reports = append(reports, backfillReport.ToGenericReport()) verifyAfterReport, err := cld_ops.ExecuteOperation( b, TokenAdminRegistryVerifyLocalDecimalsOp, deps, VerifyLocalDecimalsInput{ CCIPPackageId: input.CCIPPackageId, StateObjectId: input.StateObjectId, }, ) if err != nil { return BackfillLocalDecimalsSeqOutput{Reports: reports}, fmt.Errorf("failed to re-verify local decimals: %w", err) } reports = append(reports, verifyAfterReport.ToGenericReport()) if len(verifyAfterReport.Output.Objects.Mismatches) > 0 { return BackfillLocalDecimalsSeqOutput{Reports: reports}, fmt.Errorf( "local decimals still mismatched for %d token(s) after backfill", len(verifyAfterReport.Output.Objects.Mismatches), ) } return BackfillLocalDecimalsSeqOutput{Reports: reports}, nil }, )
var BlockFunctionOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "upgrade_registry", "block_function"), semver.MustParse("0.1.0"), "Blocks a specific function in a specific version in the UpgradeRegistry", blockFunctionHandler, )
var BlockVersionOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "upgrade_registry", "block_version"), semver.MustParse("0.1.0"), "Blocks an entire version of a module in the UpgradeRegistry", blockVersionHandler, )
var DeployAndInitCCIPSequence = cld_ops.NewSequence( "sui-deploy-ccip-seq", semver.MustParse("0.1.0"), "Deploys and sets initial CCIP configuration", func(env cld_ops.Bundle, deps sui_ops.OpTxDeps, input DeployAndInitCCIPSeqInput) (DeployCCIPSeqOutput, error) { deployReport, err := cld_ops.ExecuteOperation(env, DeployCCIPOp, deps, input.DeployCCIPInput) if err != nil { return DeployCCIPSeqOutput{}, err } initUpgradeRegistryReport, err := cld_ops.ExecuteOperation( env, UpgradeRegistryInitializeOp, deps, InitUpgradeRegistryInput{ CCIPPackageId: deployReport.Output.PackageId, StateObjectId: deployReport.Output.Objects.CCIPObjectRefObjectId, OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, }, ) if err != nil { return DeployCCIPSeqOutput{}, err } initFQReport, err := cld_ops.ExecuteOperation( env, FeeQuoterInitializeOp, deps, InitFeeQuoterInput{ CCIPPackageId: deployReport.Output.PackageId, StateObjectId: deployReport.Output.Objects.CCIPObjectRefObjectId, OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, MaxFeeJuelsPerMsg: input.MaxFeeJuelsPerMsg, LinkTokenCoinMetadataObjectId: input.LinkTokenCoinMetadataObjectId, TokenPriceStalenessThreshold: input.TokenPriceStalenessThreshold, FeeTokens: []string{input.LinkTokenCoinMetadataObjectId}, }, ) if err != nil { return DeployCCIPSeqOutput{}, err } initNMReport, err := cld_ops.ExecuteOperation( env, NonceManagerInitializeOp, deps, InitNMInput{ CCIPPackageId: deployReport.Output.PackageId, StateObjectId: deployReport.Output.Objects.CCIPObjectRefObjectId, OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, }, ) if err != nil { return DeployCCIPSeqOutput{}, err } initRecRegReport, err := cld_ops.ExecuteOperation( env, ReceiverRegistryInitializeOp, deps, InitRecRegInput{ CCIPPackageId: deployReport.Output.PackageId, StateObjectId: deployReport.Output.Objects.CCIPObjectRefObjectId, OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, }, ) if err != nil { return DeployCCIPSeqOutput{}, err } initRMNRemoteReport, err := cld_ops.ExecuteOperation( env, RMNRemoteInitializeOp, deps, InitRMNRemoteInput{ CCIPPackageId: deployReport.Output.PackageId, StateObjectId: deployReport.Output.Objects.CCIPObjectRefObjectId, OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, LocalChainSelector: input.LocalChainSelector, }, ) if err != nil { return DeployCCIPSeqOutput{}, err } initTARReport, err := cld_ops.ExecuteOperation( env, TokenAdminRegistryInitializeOp, deps, InitTARInput{ CCIPPackageId: deployReport.Output.PackageId, StateObjectId: deployReport.Output.Objects.CCIPObjectRefObjectId, OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, LocalChainSelector: input.LocalChainSelector, }, ) if err != nil { return DeployCCIPSeqOutput{}, err } _, err = cld_ops.ExecuteOperation( env, TokenAdminRegistryInitializeLocalDecimalsOp, deps, InitLocalDecimalsInput{ CCIPPackageId: deployReport.Output.PackageId, StateObjectId: deployReport.Output.Objects.CCIPObjectRefObjectId, OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, }, ) if err != nil { return DeployCCIPSeqOutput{}, err } _, err = cld_ops.ExecuteOperation( env, FeeQuoterApplyTokenTransferFeeConfigUpdatesOp, deps, FeeQuoterApplyTokenTransferFeeConfigUpdatesInput{ CCIPPackageId: deployReport.Output.PackageId, StateObjectId: deployReport.Output.Objects.CCIPObjectRefObjectId, OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, AddTokens: []string{input.LinkTokenCoinMetadataObjectId}, AddMinFeeUsdCents: input.AddMinFeeUsdCents, AddMaxFeeUsdCents: input.AddMaxFeeUsdCents, AddDeciBps: input.AddDeciBps, AddDestGasOverhead: input.AddDestGasOverhead, AddDestBytesOverhead: input.AddDestBytesOverhead, AddIsEnabled: input.AddIsEnabled, RemoveTokens: input.RemoveTokens, }, ) if err != nil { return DeployCCIPSeqOutput{}, err } _, err = cld_ops.ExecuteOperation( env, FeeQuoterApplyDestChainConfigUpdatesOp, deps, FeeQuoterApplyDestChainConfigUpdatesInput{ CCIPPackageId: deployReport.Output.PackageId, StateObjectId: deployReport.Output.Objects.CCIPObjectRefObjectId, OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, DestChainSelector: input.DestChainSelector, IsEnabled: input.IsEnabled, MaxNumberOfTokensPerMsg: input.MaxNumberOfTokensPerMsg, MaxDataBytes: input.MaxDataBytes, MaxPerMsgGasLimit: input.MaxPerMsgGasLimit, DestGasOverhead: input.DestGasOverhead, DestGasPerPayloadByteBase: input.DestGasPerPayloadByteBase, DestGasPerPayloadByteHigh: input.DestGasPerPayloadByteHigh, DestGasPerPayloadByteThreshold: input.DestGasPerPayloadByteThreshold, DestDataAvailabilityOverheadGas: input.DestDataAvailabilityOverheadGas, DestGasPerDataAvailabilityByte: input.DestGasPerDataAvailabilityByte, DestDataAvailabilityMultiplierBps: input.DestDataAvailabilityMultiplierBps, ChainFamilySelector: input.ChainFamilySelector, EnforceOutOfOrder: input.EnforceOutOfOrder, DefaultTokenFeeUsdCents: input.DefaultTokenFeeUsdCents, DefaultTokenDestGasOverhead: input.DefaultTokenDestGasOverhead, DefaultTxGasLimit: input.DefaultTxGasLimit, GasMultiplierWeiPerEth: input.GasMultiplierWeiPerEth, GasPriceStalenessThreshold: input.GasPriceStalenessThreshold, NetworkFeeUsdCents: input.NetworkFeeUsdCents, }, ) if err != nil { return DeployCCIPSeqOutput{}, err } _, err = cld_ops.ExecuteOperation( env, FeeQuoterApplyPremiumMultiplierWeiPerEthUpdatesOp, deps, FeeQuoterApplyPremiumMultiplierWeiPerEthUpdatesInput{ CCIPPackageId: deployReport.Output.PackageId, StateObjectId: deployReport.Output.Objects.CCIPObjectRefObjectId, OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, Tokens: []string{input.LinkTokenCoinMetadataObjectId}, PremiumMultiplierWeiPerEth: input.PremiumMultiplierWeiPerEth, }, ) if err != nil { return DeployCCIPSeqOutput{}, err } _, err = cld_ops.ExecuteOperation( env, TransferOwnershipStateObjectOp, deps, TransferOwnershipStateObjectInput{ CCIPPackageId: deployReport.Output.PackageId, CCIPObjectRefObjectId: deployReport.Output.Objects.CCIPObjectRefObjectId, OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, To: input.DeployCCIPInput.McmsPackageId, }, ) return DeployCCIPSeqOutput{ CCIPPackageId: deployReport.Output.PackageId, Objects: DeployCCIPSeqObjects{ CCIPObjectRefObjectId: deployReport.Output.Objects.CCIPObjectRefObjectId, OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, FeeQuoterCapObjectId: initFQReport.Output.Objects.FeeQuoterCapObjectId, FeeQuoterStateObjectId: initFQReport.Output.Objects.FeeQuoterStateObjectId, NonceManagerStateObjectId: initNMReport.Output.Objects.NonceManagerStateObjectId, NonceManagerCapObjectId: initNMReport.Output.Objects.NonceManagerCapObjectId, ReceiverRegistryStateObjectId: initRecRegReport.Output.Objects.ReceiverRegistryStateObjectId, RMNRemoteStateObjectId: initRMNRemoteReport.Output.Objects.RMNRemoteStateObjectId, TokenAdminRegistryStateObjectId: initTARReport.Output.Objects.TARStateObjectId, UpgradeRegistryObjectId: initUpgradeRegistryReport.Output.Objects.UpgradeRegistryObjectId, SourceTransferCapObjectId: deployReport.Output.Objects.SourceTransferCapObjectId, DestTransferCapObjectId: deployReport.Output.Objects.DestTransferCapObjectId, UpgradeCapObjectId: deployReport.Output.Objects.UpgradeCapObjectId, }, }, nil }, )
var DeployAndInitDummyReceiverSequence = cld_ops.NewSequence( "sui-deploy-dummy-receiver-seq", semver.MustParse("0.1.0"), "Deploys CCIP dummy receiver and registers it with the receiver registry", func(env cld_ops.Bundle, deps sui_ops.OpTxDeps, input DeployAndInitDummyReceiverInput) (DeployDummyReceiverSeqOutput, error) { lggr := env.Logger lggr.Debugw("Deploying dummy receiver", "input", input) deployReport, err := cld_ops.ExecuteOperation(env, DeployCCIPDummyReceiverOp, deps, input.DeployDummyReceiverInput) if err != nil { return DeployDummyReceiverSeqOutput{}, err } env.Logger.Infow("Dummy receiver deployed successfully", "packageId", deployReport.Output.PackageId, "receiverStateId", deployReport.Output.Objects.CCIPReceiverStateObjectId, ) _, err = cld_ops.ExecuteOperation( env, RegisterDummyReceiverOp, deps, RegisterDummyReceiverInput{ OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, CCIPObjectRefObjectId: input.CCIPObjectRefObjectId, DummyReceiverPackageId: deployReport.Output.PackageId, }, ) if err != nil { return DeployDummyReceiverSeqOutput{}, err } env.Logger.Infow("Dummy receiver registered successfully with receiver registry") return DeployDummyReceiverSeqOutput{ DummyReceiverPackageId: deployReport.Output.PackageId, Objects: DeployDummyReceiverSeqObjects{ OwnerCapObjectId: deployReport.Output.Objects.OwnerCapObjectId, CCIPReceiverStateObjectId: deployReport.Output.Objects.CCIPReceiverStateObjectId, }, }, nil }, )
var DeployCCIPDummyReceiverOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip-dummy-receiver", "package", "deploy"), semver.MustParse("0.1.0"), "Deploys the CCIP dummy receiver package", deployDummyReceiverHandler, )
var DeployCCIPOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "package", "deploy"), semver.MustParse("0.1.0"), "Deploys the CCIP package", deployHandler, )
var ExecuteOwnershipTransferToMcmsStateObjectOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "state_object", "execute_ownership_transfer_to_mcms"), semver.MustParse("0.1.0"), "Executes ownership transfer to MCMS for the CCIP StateObject", executeOwnershipTransferToMcmsStateObjectHandler, )
var FeeQuoterApplyDestChainConfigUpdatesOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "fee_quoter", "apply_dest_chain_config_updates"), semver.MustParse("0.1.0"), "Apply destination chain config updates in the CCIP Fee Quoter contract", applyDestChainConfigHandler, )
var FeeQuoterApplyFeeTokenUpdatesOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "fee_quoter", "apply_fee_token_updates"), semver.MustParse("0.1.0"), "Apply fee token updates in the CCIP Fee Quoter contract", applyUpdatesHandler, )
var FeeQuoterApplyPremiumMultiplierWeiPerEthUpdatesOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "fee_quoter", "apply_premium_multiplier_wei_per_eth_updates"), semver.MustParse("0.1.0"), "Apply premium multiplier wei per eth updates in the CCIP Fee Quoter contract", applyPremiumMultiplierHandler, )
var FeeQuoterApplyTokenTransferFeeConfigUpdatesOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "fee_quoter", "apply_token_transfer_fee_config_updates"), semver.MustParse("0.1.0"), "Apply transfer fee config updates in the CCIP Fee Quoter contract", applyTokenTransferFeeHandler, )
var FeeQuoterDestroyFeeQuoterCapOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "fee_quoter", "destroy_fee_quoter_cap"), semver.MustParse("0.1.0"), "Destroy a fee quoter cap in the CCIP Fee Quoter contract", destroyFeeQuoterCapHandler, )
var FeeQuoterInitializeOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "fee_quoter", "initialize"), semver.MustParse("0.1.0"), "Initializes the CCIP Fee Quoter contract", initFQHandler, )
var FeeQuoterNewFeeQuoterCapOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "fee_quoter", "new_fee_quoter_cap"), semver.MustParse("0.1.0"), "Create a new fee quoter cap in the CCIP Fee Quoter contract", newFeeQuoterCapHandler, )
var FeeQuoterUpdatePricesWithOwnerCapOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "fee_quoter", "update_prices_with_owner_cap"), semver.MustParse("0.1.0"), "Update prices using owner cap in CCIP Fee Quoter contract", updatePricesWithOwnerCapHandler, )
var FeeQuoterUpdateTokenPricesOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "fee_quoter", "update_prices"), semver.MustParse("0.1.0"), "Apply update prices in CCIP Fee Quoter contract", updateTokenPrices, )
var FeeQuoterUpdateTokenPricesWithOwnerCapOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "fee_quoter", "update_prices_with_owner_cap"), semver.MustParse("0.1.0"), "Apply update prices with ownerCap in CCIP Fee Quoter contract", updateTokenPricesWithOwnerCap, )
var GetModuleRestrictionsOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "upgrade_registry", "get_module_restrictions"), semver.MustParse("0.1.0"), "Gets module restrictions from the UpgradeRegistry", getModuleRestrictionsHandler, )
var GetOwnerCapIdStateObjectOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "state_object", "get_owner_cap_id"), semver.MustParse("0.1.0"), "Gets the owner cap ID from the CCIP StateObject", getOwnerCapIdStateObjectHandler, )
var GetOwnerStateObjectOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "state_object", "get_owner"), semver.MustParse("0.1.0"), "Gets the owner from the CCIP StateObject", getOwnerStateObjectHandler, )
var GetPendingTransferStateObjectOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "state_object", "get_pending_transfer"), semver.MustParse("0.1.0"), "Gets pending transfer information from the CCIP StateObject", getPendingTransferStateObjectHandler, )
var IsFunctionAllowedOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "upgrade_registry", "is_function_allowed"), semver.MustParse("0.1.0"), "Checks if a function is allowed in the UpgradeRegistry", isFunctionAllowedHandler, )
var NonceManagerInitializeOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "nonce_manager", "initialize"), semver.MustParse("0.1.0"), "Initializes the CCIP Nonce Manager contract", initNMHandler, )
var RMNRemoteCurseMultipleOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "rmn_remote", "curse_multiple"), semver.MustParse("0.1.0"), "Curses multiple subjects in the CCIP RMN Remote contract", handlerCurseMultiple, )
var RMNRemoteCurseOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "rmn_remote", "curse"), semver.MustParse("0.1.0"), "Curses a subject in the CCIP RMN Remote contract", handlerCurse, )
var RMNRemoteInitializeOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "rmn_remote", "initialize"), semver.MustParse("0.1.0"), "Initializes the CCIP RMN Remote contract", initRMNRemoteHandler, )
var RMNRemoteSetConfigOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "rmn_remote", "set_config"), semver.MustParse("0.1.0"), "Sets config the CCIP RMN Remote contract", handlerSetconfig, )
var RMNRemoteUncurseMultipleOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "rmn_remote", "uncurse_multiple"), semver.MustParse("0.1.0"), "Uncurses multiple subjects in the CCIP RMN Remote contract", handlerUncurseMultiple, )
var RMNRemoteUncurseOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "rmn_remote", "uncurse"), semver.MustParse("0.1.0"), "Uncurses a subject in the CCIP RMN Remote contract", handlerUncurse, )
var ReceiverRegistryInitializeOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "receiver_registry", "initialize"), semver.MustParse("0.1.0"), "Initializes the CCIP Receiver Registry contract", initRecRegHandler, )
var RegisterDummyReceiverOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip-dummy-receiver", "dummy_receiver", "register_receiver"), semver.MustParse("0.1.0"), "Registers the CCIP dummy receiver with the receiver registry using the dummy receiver's register_receiver function", registerDummyReceiverHandler, )
var RemovePackageIdStateObjectOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "state_object", "remove_package_id"), semver.MustParse("0.1.0"), "Removes a package ID from the CCIP StateObject", removePackageIdStateObjectHandler, )
var TokenAdminRegistryAcceptAdminRoleOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "token_admin_registry", "accept_admin_role"), semver.MustParse("0.1.0"), "Accepts admin role for a token in the CCIP Token Admin Registry", acceptAdminRoleHandler, )
var TokenAdminRegistryBackfillAllLocalDecimalsOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "token_admin_registry", "backfill_all_local_decimals"), semver.MustParse("0.1.0"), "Backfills local token decimals for every registered token using on-chain coin metadata", backfillAllLocalDecimalsHandler, )
var TokenAdminRegistryBackfillLocalDecimalsOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "token_admin_registry", "backfill_local_decimals"), semver.MustParse("0.1.0"), "Backfills local token decimals for an already-registered pool", backfillLocalDecimalsHandler, )
var TokenAdminRegistryInitializeLocalDecimalsOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "token_admin_registry", "initialize_local_decimals"), semver.MustParse("0.1.0"), "Initializes local token decimals state on the CCIP Token Admin Registry", initLocalDecimalsHandler, )
var TokenAdminRegistryInitializeOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "token_admin_registry", "initialize"), semver.MustParse("0.1.0"), "Initializes the CCIP Token Admin Registry contract", initTarHandler, )
var TokenAdminRegistryTransferAdminRoleOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "token_admin_registry", "transfer_admin_role"), semver.MustParse("0.1.0"), "Transfers admin role for a token in the CCIP Token Admin Registry", transferAdminRoleHandler, )
var TokenAdminRegistryUnregisterPoolOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "token_admin_registry", "unregister_pool"), semver.MustParse("0.1.0"), "Unregisters a token pool from the CCIP Token Admin Registry", unregisterPoolHandler, )
var TokenAdminRegistryVerifyLocalDecimalsOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "token_admin_registry", "verify_local_decimals"), semver.MustParse("0.1.0"), "Verifies registry local decimals match on-chain coin metadata for all registered tokens", verifyLocalDecimalsHandler, )
var TransferOwnershipStateObjectOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "state_object", "transfer_ownership"), semver.MustParse("0.1.0"), "Transfers ownership of the CCIP StateObject", transferOwnershipStateObjectHandler, )
var UnblockFunctionOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "upgrade_registry", "unblock_function"), semver.MustParse("0.1.0"), "Unblocks a specific function in a specific version in the UpgradeRegistry", unblockFunctionHandler, )
var UnblockVersionOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "upgrade_registry", "unblock_version"), semver.MustParse("0.1.0"), "Unblocks an entire version of a module in the UpgradeRegistry", unblockVersionHandler, )
var UpgradeRegistryInitializeOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "upgrade_registry", "initialize"), semver.MustParse("0.1.0"), "Initializes the CCIP UpgradeRegistry contract", initUpgradeRegistryHandler, )
var VerifyFunctionAllowedOp = cld_ops.NewOperation( sui_ops.NewSuiOperationName("ccip", "upgrade_registry", "verify_function_allowed"), semver.MustParse("0.1.0"), "Verifies that a function is allowed in the UpgradeRegistry (throws error if not allowed)", verifyFunctionAllowedHandler, )
Functions ¶
func ResolveLocalDecimals ¶
func ResolveLocalDecimals( ctx context.Context, client coinMetadataClient, tokenType string, supplied *byte, ) (byte, error)
ResolveLocalDecimals returns on-chain decimals for a token type and optionally validates a caller-supplied value.
func SerializeMcmsObjectAddrs ¶
SerializeMcmsObjectAddrs BCS-encodes fixed 32-byte object addresses for MCMS callback validate_obj_addrs payloads. Order must match the Move callback's deserialize order.
Types ¶
type AcceptAdminRoleInput ¶
type AcceptOwnershipStateObjectObjects ¶
type AcceptOwnershipStateObjectObjects struct {
}
type AddAllowedModulesStateObjectInput ¶
type AddAllowedModulesStateObjectInput struct {
PackageId string // original CCIP package ID (MCMS registry identity; used as binary when LatestPackageId is "")
LatestPackageId string // optional: upgraded CCIP package ID (PTB execution target when set)
MCMSRegistryObjId string // mcms_registry Registry shared object ID
AllowedModules []string
}
AddAllowedModulesStateObjectInput configures mcms_registry::add_allowed_modules<T>
type AddAllowedModulesStateObjectObjects ¶
type AddAllowedModulesStateObjectObjects struct{}
type AddPackageIdStateObjectInput ¶
type AddPackageIdStateObjectInput struct {
PackageId string // original package ID (MCMS registry identity; used as binary when LatestPackageId is "")
LatestPackageId string // optional: upgraded package ID (PTB execution target when set)
CCIPObjectRefObjectId string
OwnerCapObjectId string
NewPackageId string // the package ID to register in the CCIP StateObject
}
type AddPackageIdStateObjectObjects ¶
type AddPackageIdStateObjectObjects struct {
}
type BackfillAllLocalDecimalsOutput ¶
type BackfillAllLocalDecimalsOutput struct {
BackfilledTokens []string
}
type BackfillLocalDecimalsInput ¶
type BackfillLocalDecimalsInput struct {
CCIPPackageId string // original CCIP package = MCMS on-chain identity (proposal target)
LatestPackageId string // upgraded CCIP package = PTB dispatch / direct-exec binary (empty when not upgraded)
StateObjectId string
OwnerCapObjectId string
CoinMetadataAddress string
TokenType string
LocalDecimals *byte
}
type BackfillLocalDecimalsSeqInput ¶
type BackfillLocalDecimalsSeqInput struct {
CCIPPackageId string // effective/latest CCIP package: used for reads (verify) and direct execution
// OriginalCCIPPackageId is the original/defining CCIP package, used as the MCMS on-chain identity
// (proposal target) for the proposal-routed backfill ops. Falls back to CCIPPackageId when empty.
OriginalCCIPPackageId string
StateObjectId string
OwnerCapObjectId string
VerifyOnly bool
// ProposalOnly encodes MCMS backfill ops without executing them. Verify still uses deps.Signer.
ProposalOnly bool
}
type BlockFunctionInput ¶
type BlockFunctionInput struct {
PackageId string // original package ID (MCMS registry identity; used as binary when LatestPackageId is "")
LatestPackageId string // optional: upgraded package ID (PTB execution target when set)
StateObjectId string
OwnerCapObjectId string
ModuleName string
FunctionName string
Version uint8
}
type BlockFunctionObjects ¶
type BlockFunctionObjects struct {
}
type BlockVersionInput ¶
type BlockVersionInput struct {
PackageId string // original package ID (MCMS registry identity; used as binary when LatestPackageId is "")
LatestPackageId string // optional: upgraded package ID (PTB execution target when set)
StateObjectId string
OwnerCapObjectId string
ModuleName string
Version uint8
}
type BlockVersionObjects ¶
type BlockVersionObjects struct {
}
type DeployAndInitCCIPSeqInput ¶
type DeployAndInitCCIPSeqInput struct {
LinkTokenCoinMetadataObjectId string
LocalChainSelector uint64
DestChainSelector uint64
DeployCCIPInput
// Fee Quoter
MaxFeeJuelsPerMsg string
TokenPriceStalenessThreshold uint64
// Fee Quoter configuration
AddMinFeeUsdCents []uint32
AddMaxFeeUsdCents []uint32
AddDeciBps []uint16
AddDestGasOverhead []uint32
AddDestBytesOverhead []uint32
AddIsEnabled []bool
RemoveTokens []string
// Fee Quoter destination chain configuration
IsEnabled bool
MaxNumberOfTokensPerMsg uint16
MaxDataBytes uint32
MaxPerMsgGasLimit uint32
DestGasOverhead uint32
DestGasPerPayloadByteBase byte
DestGasPerPayloadByteHigh byte
DestGasPerPayloadByteThreshold uint16
DestDataAvailabilityOverheadGas uint32
DestGasPerDataAvailabilityByte uint16
DestDataAvailabilityMultiplierBps uint16
ChainFamilySelector []byte
EnforceOutOfOrder bool
DefaultTokenFeeUsdCents uint16
DefaultTokenDestGasOverhead uint32
DefaultTxGasLimit uint32
GasMultiplierWeiPerEth uint64
GasPriceStalenessThreshold uint32
NetworkFeeUsdCents uint32
// Premium multiplier updates
PremiumMultiplierWeiPerEth []uint64
// RMN Remote config
RmnHomeContractConfigDigest []byte
SignerOnchainPublicKeys [][]byte
NodeIndexes []uint64
FSign uint64
}
type DeployAndInitDummyReceiverInput ¶
type DeployAndInitDummyReceiverInput struct {
// For deployment
DeployDummyReceiverInput
// For registration
CCIPObjectRefObjectId string
}
type DeployCCIPInput ¶
type DeployCCIPObjects ¶
type DeployCCIPSeqObjects ¶
type DeployCCIPSeqObjects struct {
CCIPObjectRefObjectId string
OwnerCapObjectId string
FeeQuoterCapObjectId string
FeeQuoterStateObjectId string
NonceManagerStateObjectId string
NonceManagerCapObjectId string
ReceiverRegistryStateObjectId string
RMNRemoteStateObjectId string
TokenAdminRegistryStateObjectId string
UpgradeRegistryObjectId string
SourceTransferCapObjectId string
DestTransferCapObjectId string
UpgradeCapObjectId string
}
type DeployCCIPSeqOutput ¶
type DeployCCIPSeqOutput struct {
CCIPPackageId string
Objects DeployCCIPSeqObjects
}
type DeployDummyReceiverSeqOutput ¶
type DeployDummyReceiverSeqOutput struct {
DummyReceiverPackageId string
Objects DeployDummyReceiverSeqObjects
}
type DestroyFeeQuoterCapInput ¶
type DestroyFeeQuoterCapInput struct {
CCIPPackageId string
CCIPObjectRef string
OwnerCapObjectId string
FeeQuoterCapObjectId string
}
FEE QUOTER -- destroy_fee_quoter_cap
type ExecuteOwnershipTransferToMcmsStateObjectObjects ¶
type ExecuteOwnershipTransferToMcmsStateObjectObjects struct {
}
type FeeQuoterApplyDestChainConfigUpdatesInput ¶
type FeeQuoterApplyDestChainConfigUpdatesInput struct {
CCIPPackageId string
LatestPackageId string // optional: upgraded package ID for PTB execution when CCIPPackageId is the MCMS registry identity
StateObjectId string
OwnerCapObjectId string
DestChainSelector uint64
IsEnabled bool
MaxNumberOfTokensPerMsg uint16
MaxDataBytes uint32
MaxPerMsgGasLimit uint32
DestGasOverhead uint32
DestGasPerPayloadByteBase byte
DestGasPerPayloadByteHigh byte
DestGasPerPayloadByteThreshold uint16
DestDataAvailabilityOverheadGas uint32
DestGasPerDataAvailabilityByte uint16
DestDataAvailabilityMultiplierBps uint16
ChainFamilySelector []byte
EnforceOutOfOrder bool
DefaultTokenFeeUsdCents uint16
DefaultTokenDestGasOverhead uint32
DefaultTxGasLimit uint32
GasMultiplierWeiPerEth uint64
GasPriceStalenessThreshold uint32
NetworkFeeUsdCents uint32
}
FEE QUOTER -- apply_dest_chain_config_updates
type FeeQuoterApplyPremiumMultiplierWeiPerEthUpdatesInput ¶
type FeeQuoterApplyPremiumMultiplierWeiPerEthUpdatesInput struct {
CCIPPackageId string
LatestPackageId string // optional: upgraded package ID for PTB execution when CCIPPackageId is the MCMS registry identity
StateObjectId string
OwnerCapObjectId string
Tokens []string
PremiumMultiplierWeiPerEth []uint64
}
FEE QUOTER -- apply_premium_multiplier_wei_per_eth_updates
type FeeQuoterApplyTokenTransferFeeConfigUpdatesInput ¶
type FeeQuoterApplyTokenTransferFeeConfigUpdatesInput struct {
CCIPPackageId string
LatestPackageId string // optional: upgraded package ID for PTB execution when CCIPPackageId is the MCMS registry identity
StateObjectId string
OwnerCapObjectId string
DestChainSelector uint64
AddTokens []string
AddMinFeeUsdCents []uint32
AddMaxFeeUsdCents []uint32
AddDeciBps []uint16
AddDestGasOverhead []uint32
AddDestBytesOverhead []uint32
AddIsEnabled []bool
RemoveTokens []string
}
FEE QUOTER -- apply_token_transfer_fee_config_updates
type FeeQuoterUpdatePricesWithOwnerCapInput ¶
type FeeQuoterUpdatePricesWithOwnerCapInput struct {
CCIPPackageId string
CCIPObjectRef string
OwnerCapObjectId string
SourceTokens []string
SourceUsdPerToken []*big.Int
GasDestChainSelectors []uint64
GasUsdPerUnitGas []*big.Int
}
FEE QUOTER -- update_prices_with_owner_cap
type FeeQuoterUpdateTokenPricesInput ¶
type FeeQuoterUpdateTokenPricesInput struct {
CCIPPackageId string
CCIPObjectRef string
SourceTokens []string
SourceUsdPerToken []*big.Int
GasDestChainSelectors []uint64
GasUsdPerUnitGas []*big.Int
FeeQuoterCapId string // optional: only provide if you're running direct UpdateTokenPrice
OwnerCapId string // optional: only provide if you're running UpdateTokenPricesWithOwnerCap
}
type GetModuleRestrictionsOutput ¶
type GetModuleRestrictionsOutput struct {
Restrictions [][]byte
}
type GetOwnerCapIdStateObjectOutput ¶
type GetOwnerCapIdStateObjectOutput struct {
OwnerCapId string
}
type GetOwnerStateObjectOutput ¶
type GetOwnerStateObjectOutput struct {
Owner string
}
type InitFeeQuoterInput ¶
type InitFeeQuoterObjects ¶
FEE QUOTER -- INITIALIZE
type InitLocalDecimalsInput ¶
type InitNMInput ¶
type InitNMObjects ¶
type InitRMNRemoteInput ¶
type InitRMNRemoteObjects ¶
type InitRMNRemoteObjects struct {
RMNRemoteStateObjectId string
}
type InitRecRegInput ¶
type InitRecRegObjects ¶
type InitRecRegObjects struct {
ReceiverRegistryStateObjectId string
}
type InitTARInput ¶
type InitTARObjects ¶
type InitTARObjects struct {
TARStateObjectId string
}
type InitUpgradeRegistryObjects ¶
type InitUpgradeRegistryObjects struct {
UpgradeRegistryObjectId string
}
type IsFunctionAllowedInput ¶
type IsFunctionAllowedOutput ¶
type IsFunctionAllowedOutput struct {
IsAllowed bool
}
type NewFeeQuoterCapInput ¶
type NewFeeQuoterCapObjects ¶
type NewFeeQuoterCapObjects struct {
FeeQuoterCapObjectId string
}
FEE QUOTER -- new_fee_quoter_cap
type RMNRemoteCurseInput ¶
type RMNRemoteSetConfigInput ¶
type RMNRemoteUncurseInput ¶
type RegisterDummyReceiverObjects ¶
type RegisterDummyReceiverObjects struct {
}
type RemovePackageIdStateObjectObjects ¶
type RemovePackageIdStateObjectObjects struct {
}
type TransferAdminRoleInput ¶
type TransferOwnershipStateObjectObjects ¶
type TransferOwnershipStateObjectObjects struct {
}
type UnblockFunctionInput ¶
type UnblockFunctionInput struct {
PackageId string // original package ID (MCMS registry identity; used as binary when LatestPackageId is "")
LatestPackageId string // optional: upgraded package ID (PTB execution target when set)
StateObjectId string
OwnerCapObjectId string
ModuleName string
FunctionName string
Version uint8
}
type UnblockFunctionObjects ¶
type UnblockFunctionObjects struct {
}
type UnblockVersionInput ¶
type UnblockVersionInput struct {
PackageId string // original package ID (MCMS registry identity; used as binary when LatestPackageId is "")
LatestPackageId string // optional: upgraded package ID (PTB execution target when set)
StateObjectId string
OwnerCapObjectId string
ModuleName string
Version uint8
}
type UnblockVersionObjects ¶
type UnblockVersionObjects struct {
}
type UnregisterPoolInput ¶
type VerifyFunctionAllowedObjects ¶
type VerifyFunctionAllowedObjects struct {
}
type VerifyLocalDecimalsOutput ¶
type VerifyLocalDecimalsOutput struct {
CheckedTokens int
Mismatches []VerifyLocalDecimalsMismatch
}
Source Files
¶
- local_decimals.go
- local_decimals_ops.go
- mcms_callback_data.go
- op_deploy.go
- op_deploy_dummy_receiver.go
- op_fee_quoter.go
- op_nonce_manager.go
- op_receiver_registry.go
- op_register_dummy_receiver.go
- op_registry.go
- op_rmn_remote.go
- op_state_object.go
- op_token_admin_registry.go
- op_upgrade_registry.go
- seq_backfill_local_decimals.go
- seq_deploy_and_init_ccip.go
- seq_deploy_and_init_dummy_receiver.go