utils

package
v0.0.0-...-67263d3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const MCMSProposalVersion = "v1"

Variables

This section is empty.

Functions

func BuildProposalFromBatchesV2

func BuildProposalFromBatchesV2(
	e cldf.Environment,
	timelockAddressPerChain map[uint64]string,
	mcmsAddressPerChain map[uint64]string,
	inspectorPerChain map[uint64]mcmssdk.Inspector,
	batches []types.BatchOperation,
	description string,
	mcmsCfg cldfproposalutils.TimelockConfig,
) (*mcmslib.TimelockProposal, error)

BuildProposalFromBatchesV2 builds a timelock MCMS proposal from batch operations.

func CreateChunksAndStage

func CreateChunksAndStage(
	payload compile.CompiledPackage,
	mcmsContract mcmsbind.MCMS,
	chainSel uint64,
	seed string,
	codeObjectAddress *aptos.AccountAddress,
) ([]mcmstypes.Operation, error)

CreateChunksAndStage creates chunks from the compiled packages and build MCMS operations to stages them within the MCMS contract

func GenerateCurseMCMSProposal

func GenerateCurseMCMSProposal(
	env cldf.Environment,
	curseMCMSAddress aptos.AccountAddress,
	chainSel uint64,
	operations []mcmstypes.BatchOperation,
	description string,
	mcmsCfg cldfproposalutils.TimelockConfig,
) (*mcms.TimelockProposal, error)

GenerateCurseMCMSProposal creates a TimelockProposal targeting the CurseMCMS contract. It uses NewInspectorWithMCMSType(MCMSTypeCurse) so the inspector reads config from the "curse_mcms" module instead of "mcms". It also sets MCMSType=MCMSTypeCurse in the chain metadata so downstream tools (mcms-tools set-signers, executor, etc.) use the correct binding.

func GenerateMCMSTx

func GenerateMCMSTx(toAddress aptos.AccountAddress, moduleInfo bind.ModuleInformation, function string, args [][]byte) (mcmstypes.Transaction, error)

GenerateMCMSTx is a helper function that generates a MCMS txs for the given parameters

func GenerateProposal

func GenerateProposal(
	env cldf.Environment,
	mcmsAddress aptos.AccountAddress,
	chainSel uint64,
	operations []mcmstypes.BatchOperation,
	description string,
	mcmsCfg cldfproposalutils.TimelockConfig,
) (*mcms.TimelockProposal, error)

func IsMCMSStagingAreaClean

func IsMCMSStagingAreaClean(client aptos.AptosRpcClient, aptosMCMSObjAddr aptos.AccountAddress) (bool, error)

IsMCMSStagingAreaClean checks if the MCMS staging area is clean

func IsModuleDeployed

func IsModuleDeployed(client aptos.AptosRpcClient, address aptos.AccountAddress, moduleName string) (bool, error)

func ToBatchOperations

func ToBatchOperations(ops []mcmstypes.Operation) []mcmstypes.BatchOperation

ToBatchOperations converts Operations into BatchOperations with a single transaction each

Types

This section is empty.

Jump to

Keyboard shortcuts

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