changesets

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeployMCMSWithTimelockProgramsSolana

func DeployMCMSWithTimelockProgramsSolana(
	e cldf.Environment,
	chain cldf_solana.Chain,
	addressBook cldf.AddressBook,
	config cldfproposalutils.MCMSWithTimelockConfig,
) (*familysolana.MCMSWithTimelockState, error)

DeployMCMSWithTimelockProgramsSolana deploys an MCMS program and initializes 3 instances for each of the timelock roles: Bypasser, ProposerMcm, Canceller on an Solana chain. as well as the timelock program. It's not necessarily the only way to use the timelock and MCMS, but its reasonable pattern.

func DeployMCMSWithTimelockProgramsSolanaV2

DeployMCMSWithTimelockProgramsSolanaV2 deploys an MCMS program using Operations API saves addresses to datastore

func GenericTransferOwnership added in v0.4.0

func GenericTransferOwnership(env cldf.Environment, req *TransferOwnershipRequest) (cldf.ChangesetOutput, error)

genericTransferOwnership handles the common ownership transfer logic

func GenericVerifyPreconditions added in v0.4.0

func GenericVerifyPreconditions(env cldf.Environment, chainSel uint64, version, qualifier string, contractType datastore.ContractType) error

genericVerifyPreconditions handles the common precondition verification logic

Types

type ContractConfig added in v0.4.0

type ContractConfig struct {
	ContractType datastore.ContractType
	StateType    datastore.ContractType
	OperationID  string
	Description  string
}

ContractConfig defines the configuration for a contract ownership transfer

type Deps added in v0.4.0

type Deps struct {
	Env   cldf.Environment
	State *solstate.MCMSWithTimelockState
	Chain cldfsol.Chain
}

type OwnableContract added in v0.4.0

type OwnableContract struct {
	ProgramID solana.PublicKey
	Seed      [32]byte
	OwnerPDA  solana.PublicKey
	Type      cldf.ContractType
}

type TransferMCMSToTimelockSolana added in v0.4.0

type TransferMCMSToTimelockSolana struct{}

TransferMCMSToTimelockSolana transfers set MCMS "contracts" to the timelock signer PDA. It relies on the TransferToTimelockSolana changeset and merely adds the MCM, Timelock and AccessController contracts found in the address book to the list of contracts to transfer.

func (TransferMCMSToTimelockSolana) Apply added in v0.4.0

func (TransferMCMSToTimelockSolana) VerifyPreconditions added in v0.4.0

type TransferMCMSToTimelockSolanaConfig added in v0.4.0

type TransferMCMSToTimelockSolanaConfig struct {
	Chains  []uint64
	MCMSCfg cldfproposalutils.TimelockConfig
}

type TransferOwnershipRequest added in v0.4.0

type TransferOwnershipRequest struct {
	ChainSel                    uint64
	CurrentOwner, ProposedOwner solana.PublicKey
	Version                     string
	Qualifier                   string
	MCMSCfg                     cldfproposalutils.TimelockConfig
	ContractConfig              ContractConfig
}

TransferOwnershipRequest represents a generic ownership transfer request

type TransferToTimelockInput added in v0.4.0

type TransferToTimelockInput struct {
	Contract OwnableContract
	MCMSCfg  cldfproposalutils.TimelockConfig
}

type TransferToTimelockOutput added in v0.4.0

type TransferToTimelockOutput struct {
	Batches []mcmstypes.BatchOperation
}

func TransferToTimelockSolanaOp added in v0.4.0

func TransferToTimelockSolanaOp(b operations.Bundle, deps Deps, in TransferToTimelockInput) (TransferToTimelockOutput, error)

type TransferToTimelockSolana added in v0.4.0

type TransferToTimelockSolana struct{}

TransferToTimelockSolana transfers a set of Solana "contracts" to the Timelock signer PDA. The "transfer ownership" instructions are immediately sent and confirmed onchain. The "accept ownership" instructions are added to an MCMS timelock proposal that should be executed using the standard MCMS workflows.

func (*TransferToTimelockSolana) Apply added in v0.4.0

func (*TransferToTimelockSolana) VerifyPreconditions added in v0.4.0

func (t *TransferToTimelockSolana) VerifyPreconditions(
	env cldf.Environment, config TransferToTimelockSolanaConfig,
) error

type TransferToTimelockSolanaConfig added in v0.4.0

type TransferToTimelockSolanaConfig struct {
	ContractsByChain map[uint64][]OwnableContract
	MCMSCfg          cldfproposalutils.TimelockConfig
}

TransferToTimelockSolanaConfig holds the configuration for an ownership transfer changeset

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL