Documentation
¶
Overview ¶
Package firedrill provides the MCMS signing fire-drill changeset and a registry for per-chain-family fire-drill implementations.
Usage ¶
Import the changeset and blank-import each chain family you use (plus MCMS readers for timelock proposal resolution):
import (
"time"
firedrill "github.com/smartcontractkit/cld-changesets/mcms/changesets/firedrill"
_ "github.com/smartcontractkit/cld-changesets/mcms/evm/readers"
_ "github.com/smartcontractkit/cld-changesets/mcms/evm/firedrill"
cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment"
mcmstypes "github.com/smartcontractkit/mcms/types"
)
rt.Exec(runtime.ChangesetTask(firedrill.Changeset{}, firedrill.Input{
MCMS: &cldf.MCMSTimelockProposalInput{
TimelockAction: mcmstypes.TimelockActionSchedule,
ValidUntil: uint32(time.Now().Add(24 * time.Hour).Unix()),
TimelockDelay: mcmstypes.NewDuration(time.Hour),
Description: "firedrill proposal",
},
Cfg: firedrill.Config{Selectors: []uint64{selector}},
}))
For pipelines that need every built-in family, blank-import [all] instead:
_ "github.com/smartcontractkit/cld-changesets/mcms/changesets/firedrill/all"
Changeset resolves target chains, runs each chain's fire-drill sequence to build noop batch operations from datastore MCMS refs, and returns an MCMS timelock proposal via cldf.OutputBuilder.WithTimelockProposal.
MCMS qualifier ¶
MCMS and timelock refs are resolved from the environment datastore using cldf.MCMSTimelockProposalInput.Qualifier. That qualifier applies to every chain in the drill. Chains that use different qualifiers (for example, one EVM deployment with "" and another with "staging") must be run as separate fire-drill changeset executions with matching Qualifier values.
Built-in EVM and Solana support ¶
EVM and Solana register themselves via init when their packages are imported. Importing firedrill alone does not register any family — you must blank-import mcms/<family>/firedrill (and mcms/<family>/readers for MCMS resolution).
Reference implementations ¶
See mcms/evm/firedrill and mcms/solana/firedrill for complete implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Registry = familyregistry.New[Sequence, ChainInput]("mcms firedrill")
Registry holds per-family fire-drill sequences.
Functions ¶
func EnvFromDeps ¶
func EnvFromDeps(deps Deps) cldf.Environment
EnvFromDeps reconstructs the environment fields sequences need for ref and MCMS resolution.
Types ¶
type ChainInput ¶
type ChainInput struct {
ChainSelector uint64 `json:"chainSelector"`
MCMS cldf.MCMSTimelockProposalInput `json:"mcms"`
}
ChainInput is the family-agnostic, per-chain request for a fire-drill sequence.
type Changeset ¶
type Changeset struct{}
Changeset creates an MCMS signing fire-drill proposal with noop operations per chain. It exercises signing and execution pipelines without mutating on-chain configuration.
func (Changeset) Apply ¶
func (Changeset) Apply(e cldf.Environment, input Input) (cldf.ChangesetOutput, error)
func (Changeset) VerifyPreconditions ¶
func (Changeset) VerifyPreconditions(e cldf.Environment, input Input) error
type Config ¶
type Config struct {
Selectors []uint64 `json:"selectors,omitempty"`
}
Config selects chains for the MCMS signing fire drill.
func (Config) ResolvedSelectors ¶
func (cfg Config) ResolvedSelectors(e cldf.Environment) []uint64
ResolvedSelectors returns the chain selectors VerifyPreconditions and Apply will use. When cfg.Selectors is empty, it defaults to every Solana chain in the environment followed by every EVM chain.
type Deps ¶
type Deps struct {
BlockChains chain.BlockChains
DataStore cldfdatastore.DataStore
}
Deps is the read-only dependency bundle available to every family sequence.
type Input ¶
type Input = sequenceutils.WithMCMS[Config]
Input is the changeset configuration with MCMS timelock proposal settings.
type Registration ¶
type Registration = familyregistry.Registration[Sequence, ChainInput]
Registration describes one chain family's MCMS fire-drill implementation.
type Sequence ¶
type Sequence = operations.Sequence[ChainInput, sequenceutils.OnChainOutput, Deps]
Sequence is the required operations sequence type for all family implementations.