Documentation
¶
Index ¶
- Constants
- func BuildBatchFromOutputs(outputs []opcontract.ExerciseOutput) (mcms_types.BatchOperation, error)
- func BuildDualTimelockProposalsFromBatchOps(ctx context.Context, e cldf.Environment, chain canton.Chain, ...) ([]mcms.TimelockProposal, error)
- func BuildTimelockProposalForOwner(ctx context.Context, e cldf.Environment, chain canton.Chain, ...) (*mcms.TimelockProposal, error)
- func ConsolidateBatchOpsPerChain(ops []mcms_types.BatchOperation) []mcms_types.BatchOperation
- func GenerateTimelockProposal(ctx context.Context, stateClient apiv2.StateServiceClient, party string, ...) (*mcms.TimelockProposal, error)
- func SplitBatchOpsByOwner(batchOps []mcms_types.BatchOperation) (ccip, ccv, rmn []mcms_types.BatchOperation)
- type MCMSContractInfo
- type ProposalConfig
Constants ¶
const ( QualifierCCIPOwner = "ccipOwner" QualifierCCVOwner = "ccvOwner" // QualifierRMNOwner is the MCMS instance for RMNRemote deploy and curse operations. QualifierRMNOwner = "rmnOwner" )
MCMS datastore qualifiers for Canton triple-owner governance. Each qualifier maps to a distinct MCMS contract instance (separate instanceId@owner).
const DefaultTimelockExpirationHours = 72
Variables ¶
This section is empty.
Functions ¶
func BuildBatchFromOutputs ¶
func BuildBatchFromOutputs(outputs []opcontract.ExerciseOutput) (mcms_types.BatchOperation, error)
BuildBatchFromOutputs is a convenience wrapper around opcontract.NewBatchOperationFromExercises.
func BuildDualTimelockProposalsFromBatchOps ¶
func BuildDualTimelockProposalsFromBatchOps( ctx context.Context, e cldf.Environment, chain canton.Chain, chainSelector uint64, batchOps []mcms_types.BatchOperation, input ccipmcms.Input, description string, ) ([]mcms.TimelockProposal, error)
BuildDualTimelockProposalsFromBatchOps builds ccipOwner, ccvOwner, and rmnOwner timelock proposals for one Canton chain. Proposals target separate MCMS instances and may be signed in parallel.
func BuildTimelockProposalForOwner ¶
func BuildTimelockProposalForOwner( ctx context.Context, e cldf.Environment, chain canton.Chain, chainSelector uint64, ownerQualifier string, batchOps []mcms_types.BatchOperation, input ccipmcms.Input, description string, ) (*mcms.TimelockProposal, error)
BuildTimelockProposalForOwner builds one timelock proposal against the MCMS instance for ownerQualifier.
func ConsolidateBatchOpsPerChain ¶
func ConsolidateBatchOpsPerChain(ops []mcms_types.BatchOperation) []mcms_types.BatchOperation
ConsolidateBatchOpsPerChain merges multiple batch operations for the same chain into one.
func GenerateTimelockProposal ¶
func GenerateTimelockProposal( ctx context.Context, stateClient apiv2.StateServiceClient, party string, config ProposalConfig, batchOps []mcms_types.BatchOperation, ) (*mcms.TimelockProposal, error)
GenerateTimelockProposal builds a valid mcms.TimelockProposal by querying on-chain MCMS state and assembling all required metadata. This mirrors Sui's GenerateProposal helper.
func SplitBatchOpsByOwner ¶
func SplitBatchOpsByOwner(batchOps []mcms_types.BatchOperation) (ccip, ccv, rmn []mcms_types.BatchOperation)
SplitBatchOpsByOwner separates Canton MCMS transactions into ccipOwner, ccvOwner, and rmnOwner batches.
Types ¶
type MCMSContractInfo ¶
type MCMSContractInfo struct {
// RawInstanceAddress is the "instanceId@partyId" format of the MCMS contract.
RawInstanceAddress contracts.RawInstanceAddress
// InstanceAddress is the 32-byte Keccak256 hash of the raw instance address.
InstanceAddress contracts.InstanceAddress
}
MCMSContractInfo describes an on-chain MCMS contract needed for proposal generation.
type ProposalConfig ¶
type ProposalConfig struct {
// MCMSContract describes the MCMS contract to build the proposal for.
MCMSContract MCMSContractInfo
// ChainSelector is the Canton chain selector.
ChainSelector mcms_types.ChainSelector
// TimelockAddress is the timelock address for this chain (same as MCMS instance address hex for Canton).
TimelockAddress string
// Description is a human-readable description of the proposal.
Description string
// MinDelay is the timelock execution delay.
MinDelay time.Duration
// OverridePreviousRoot overrides the existing root if true.
OverridePreviousRoot bool
// Action is the timelock action (schedule, cancel, bypass).
Action mcms_types.TimelockAction
// ValidUntil is the Unix timestamp when the proposal expires. If zero, defaults to now + 72h.
ValidUntil uint32
// Role determines which MCMS role state to query for OpCount (proposer, canceller, bypasser).
Role cantonsdk.TimelockRole
}
ProposalConfig holds parameters for generating an MCMS timelock proposal.