Documentation
¶
Index ¶
- func DeployMCMSWithTimelockProgramsSolana(e cldf.Environment, chain cldf_solana.Chain, addressBook cldf.AddressBook, ...) (*familysolana.MCMSWithTimelockState, error)
- func DeployMCMSWithTimelockProgramsSolanaV2(e cldf.Environment, ds datastore.MutableDataStore, chain cldf_solana.Chain, ...) (*familysolana.MCMSWithTimelockState, error)
- func GenericTransferOwnership(env cldf.Environment, req *TransferOwnershipRequest) (cldf.ChangesetOutput, error)
- func GenericVerifyPreconditions(env cldf.Environment, chainSel uint64, version, qualifier string, ...) error
- type ContractConfig
- type Deps
- type OwnableContract
- type TransferMCMSToTimelockSolana
- type TransferMCMSToTimelockSolanaConfig
- type TransferOwnershipRequest
- type TransferToTimelockInput
- type TransferToTimelockOutput
- type TransferToTimelockSolana
- type TransferToTimelockSolanaConfig
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 ¶
func DeployMCMSWithTimelockProgramsSolanaV2( e cldf.Environment, ds datastore.MutableDataStore, chain cldf_solana.Chain, config cldfproposalutils.MCMSWithTimelockConfig) (*familysolana.MCMSWithTimelockState, error)
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 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 (t TransferMCMSToTimelockSolana) Apply( env cldf.Environment, cfg TransferMCMSToTimelockSolanaConfig, ) (cldf.ChangesetOutput, error)
func (TransferMCMSToTimelockSolana) VerifyPreconditions ¶ added in v0.4.0
func (t TransferMCMSToTimelockSolana) VerifyPreconditions( env cldf.Environment, config TransferMCMSToTimelockSolanaConfig, ) error
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 (t *TransferToTimelockSolana) Apply( env cldf.Environment, cfg TransferToTimelockSolanaConfig, ) (cldf.ChangesetOutput, error)
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