deployment

package module
v0.0.0-...-5b16fae Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 16 Imported by: 5

Documentation

Index

Constants

View Source
const MCMSFastCurseLabel = "fastcurse"

MCMSLabel is the address book label applied to the fastcurse MCMS instance.

Variables

View Source
var (
	// CCIP
	SuiCCIPType                      deployment.ContractType = "SuiCCIP"
	SuiCCIPObjectRefType             deployment.ContractType = "SuiCCIPObjectRef"
	SuiCCIPOwnerCapObjectIDType      deployment.ContractType = "SuiCCIPOwnerCapObjectID"
	SuiCCIPUpgradeCapObjectIDType    deployment.ContractType = "SuiCCIPUpgradeCapObjectID"
	SuiFeeQuoterCapType              deployment.ContractType = "SuiCCIPFeeQuoterCap"
	SuiOnRampType                    deployment.ContractType = "SuiOnRamp"
	SuiOnRampStateObjectIDType       deployment.ContractType = "SuiOnRampStateObjectID"
	SuiOnRampOwnerCapObjectIDType    deployment.ContractType = "SuiOnRampOwnerCapObjectID"
	SuiOnRampUpgradeCapObjectIDType  deployment.ContractType = "SuiOnRampUpgradeCapObjectID"
	SuiOffRampType                   deployment.ContractType = "SuiOffRamp"
	SuiOffRampOwnerCapObjectIDType   deployment.ContractType = "SuiOffRampOwnerCapObjectID"
	SuiOffRampUpgradeCapObjectIDType deployment.ContractType = "SuiOffRampUpgradeCapObjectID"
	SuiOffRampStateObjectIDType      deployment.ContractType = "SuiOffRampStateObjectID"
	SuiLockReleaseTPType             deployment.ContractType = "SuiLockReleaseToken"
	SuiLockReleaseTPStateType        deployment.ContractType = "SuiLockReleaseTokenState"

	// CCIP Router
	SuiCCIPRouterType                 deployment.ContractType = "SuiRouter"
	SuiCCIPRouterStateObjectType      deployment.ContractType = "SuiRouterStateObjectID"
	SuiCCIPRouterOwnerCapObjectIDType deployment.ContractType = "SuiCCIPRouterOwnerCapObjectID"
	SuiRouterUpgradeCapObjectIDType   deployment.ContractType = "SuiRouterUpgradeCapObjectID"

	// MCMS Related
	SuiMCMSType                        deployment.ContractType = "SuiManyChainMultisig"
	SuiMcmsPackageIDType               deployment.ContractType = "SuiManyChainMultisigPackageID"
	SuiMcmsObjectIDType                deployment.ContractType = "SuiManyChainMultisigObjectID"
	SuiMcmsRegistryObjectIDType        deployment.ContractType = "SuiManyChainMultisigRegistryObjectID"
	SuiMcmsAccountStateObjectIDType    deployment.ContractType = "SuiManyChainMultisigAccountStateObjectID"
	SuiMcmsAccountOwnerCapObjectIDType deployment.ContractType = "SuiManyChainMultisigAccountOwnerCapObjectID"
	SuiMcmsTimelockObjectIDType        deployment.ContractType = "SuiManyChainMultisigTimelockObjectID"
	SuiMcmsDeployerObjectIDType        deployment.ContractType = "SuiManyChainMultisigDeployerObjectID"

	// MCMS User Related
	SuiMcmsUserPackageIDType        deployment.ContractType = "SuiMcmsUserPackageID"
	SuiMcmsUserDataObjectIDType     deployment.ContractType = "SuiMcmsUserDataObjectID"
	SuiMcmsUserOwnerCapObjectIDType deployment.ContractType = "SuiMcmsUserOwnerCapObjectID"

	// Link related
	SuiLinkTokenObjectMetadataID deployment.ContractType = "SuiLinkTokenObjectMetadataID"
	SuiLinkTokenTreasuryCapID    deployment.ContractType = "SuiLinkTokenTreasuryCapID"
	SuiLinkTokenUpgradeCapID     deployment.ContractType = "SuiLinkTokenUpgradeCapID"
	SuiLinkTokenType             deployment.ContractType = "SuiLinkToken"

	// Managed Token related
	// the coins under management
	SuiManagedTokenType               deployment.ContractType = "SuiManagedToken"
	SuiManagedTokenCoinMetadataIDType deployment.ContractType = "SuiManagedTokenCoinMetadataID"
	SuiManagedTokenTreasuryCapIDType  deployment.ContractType = "SuiManagedTokenTreasuryCapID"
	SuiManagedTokenUpgradeCapIDType   deployment.ContractType = "SuiManagedTokenUpgradeCapID"
	// the managed token wrapper package for the tokens
	SuiManagedTokenPackageIDType     deployment.ContractType = "SuiManagedTokenPackageID"
	SuiManagedTokenOwnerCapObjectID  deployment.ContractType = "SuiManagedTokenOwnerCapObjectID"
	SuiManagedTokenStateObjectID     deployment.ContractType = "SuiManagedTokenStateObjectID"
	SuiManagedTokenMinterCapID       deployment.ContractType = "SuiManagedTokenMinterCapID"
	SuiManagedTokenPublisherObjectId deployment.ContractType = "SuiManagedTokenPublisherObjectId"
	// Managed token faucet package
	SuiManagedTokenFaucetPackageIDType          deployment.ContractType = "SuiManagedTokenFaucetPackageID"
	SuiManagedTokenFaucetStateObjectIDType      deployment.ContractType = "SuiManagedTokenFaucetStateObjectID"
	SuiManagedTokenFaucetUpgradeCapObjectIDType deployment.ContractType = "SuiManagedTokenFaucetUpgradeCapObjectID"

	// BnM Token Pool related
	SuiBnMTokenPoolType        deployment.ContractType = "SuiBnMTokenPool"
	SuiBnMTokenPoolStateType   deployment.ContractType = "SuiBnMTokenPoolState"
	SuiBnMTokenPoolOwnerIDType deployment.ContractType = "SuiBnMTokenPoolOwnerID"

	// LnR Token Pool related
	SuiLnRTokenPoolType                deployment.ContractType = "SuiLnRTokenPool"
	SuiLnRTokenPoolStateType           deployment.ContractType = "SuiLnRTokenPoolState"
	SuiLnRTokenPoolOwnerIDType         deployment.ContractType = "SuiLnRTokenPoolOwnerID"
	SuiLnRTokenPoolRebalancerCapIDType deployment.ContractType = "SuiLnRTokenPoolRebalancerCapID"

	// Managed Token Pool related
	SuiManagedTokenPoolType        deployment.ContractType = "SuiManagedTokenPool"
	SuiManagedTokenPoolStateType   deployment.ContractType = "SuiManagedTokenPoolState"
	SuiManagedTokenPoolOwnerIDType deployment.ContractType = "SuiManagedTokenPoolOwnerID"

	// Upgrade Related
	SuiCCIPMockV2              deployment.ContractType = "SuiCCIPMockV2PackageID"
	SuiOnRampMockV2            deployment.ContractType = "SuiOnRampMockV2PackageID"
	SuiOffRampMockV2           deployment.ContractType = "SuiOffRampMockV2PackageID"
	SuiUpgradeRegistryObjectId deployment.ContractType = "SuiUpgradeRegistryObjectId"
)
View Source
var DefaultCCIPSeqConfig = ccipops.DeployAndInitCCIPSeqInput{

	MaxFeeJuelsPerMsg:            "200000000000000000000",
	TokenPriceStalenessThreshold: 1000000,

	AddMinFeeUsdCents:    []uint32{3000},
	AddMaxFeeUsdCents:    []uint32{30000},
	AddDeciBps:           []uint16{1000},
	AddDestGasOverhead:   []uint32{1000000},
	AddDestBytesOverhead: []uint32{1000},
	AddIsEnabled:         []bool{true},
	RemoveTokens:         []string{},

	IsEnabled:                         true,
	MaxNumberOfTokensPerMsg:           1,
	MaxDataBytes:                      16_000,
	MaxPerMsgGasLimit:                 3_000_000,
	DestGasOverhead:                   1_000_000,
	DestGasPerPayloadByteBase:         byte(16),
	DestGasPerPayloadByteHigh:         byte(40),
	DestGasPerPayloadByteThreshold:    uint16(3000),
	DestDataAvailabilityOverheadGas:   100,
	DestGasPerDataAvailabilityByte:    16,
	DestDataAvailabilityMultiplierBps: 1,
	ChainFamilySelector:               []byte{40, 18, 213, 44},
	EnforceOutOfOrder:                 false,
	DefaultTokenFeeUsdCents:           25,
	DefaultTokenDestGasOverhead:       90_000,
	DefaultTxGasLimit:                 200_000,
	GasMultiplierWeiPerEth:            1_000_000_000_000_000_000,
	GasPriceStalenessThreshold:        1_000_000,
	NetworkFeeUsdCents:                10,

	PremiumMultiplierWeiPerEth: []uint64{900_000_000_000_000_000},
}

These are the static/default FeeQuoter + chain params

View Source
var DefaultOffRampSeqConfig = offrampops.DeployAndInitCCIPOffRampSeqInput{
	InitializeOffRampInput: offrampops.InitializeOffRampInput{
		PremissionExecThresholdSeconds:        uint32(60 * 60 * 8),
		SourceChainsIsEnabled:                 []bool{true},
		SourceChainsIsRMNVerificationDisabled: []bool{true},
	},
}
View Source
var DefaultOnRampSeqConfig = onrampops.DeployAndInitCCIPOnRampSeqInput{
	OnRampInitializeInput: onrampops.OnRampInitializeInput{
		DestChainAllowListEnabled: []bool{true},
	},

	ApplyDestChainConfigureOnRampInput: onrampops.ApplyDestChainConfigureOnRampInput{

		DestChainAllowListEnabled: []bool{false},
	},

	ApplyAllowListUpdatesInput: onrampops.ApplyAllowListUpdatesInput{

		DestChainAllowListEnabled:     []bool{false},
		DestChainAddAllowedSenders:    [][]string{{}},
		DestChainRemoveAllowedSenders: [][]string{{}},
	},
}
View Source
var (
	Version1_0_0 = *semver.MustParse("1.0.0")
)

Functions

func LoadOnchainStatesui

func LoadOnchainStatesui(env cldf.Environment) (map[uint64]CCIPChainState, error)

LoadOnchainStatesui loads chain state for sui chains from env

func StrTo32

func StrTo32(s string) ([]byte, error)

func StrToBytes

func StrToBytes(s string) ([]byte, error)

Types

type CCIPChainState

type CCIPChainState struct {
	// MCMS related (normal governance instance)
	MCMSPackageID               string
	MCMSStateObjectID           string
	MCMSRegistryObjectID        string
	MCMSDeployerStateObjectID   string
	MCMSAccountStateObjectID    string
	MCMSAccountOwnerCapObjectID string
	MCMSTimelockObjectID        string

	// FastCurse MCMS related (fastcurse governance instance, stored with label "fastcurse")
	FastCurseMCMSPackageID               string
	FastCurseMCMSStateObjectID           string
	FastCurseMCMSRegistryObjectID        string
	FastCurseMCMSDeployerStateObjectID   string
	FastCurseMCMSAccountStateObjectID    string
	FastCurseMCMSAccountOwnerCapObjectID string
	FastCurseMCMSTimelockObjectID        string

	// CCIP related
	CCIPAddress            string
	CCIPObjectRef          string
	CCIPOwnerCapObjectId   string
	CCIPUpgradeCapObjectId string
	FeeQuoterCapId         string

	// CCIP Router related
	CCIPRouterAddress          string
	CCIPRouterStateObjectID    string
	CCIPRouterOwnerCapObjectId string
	CCIPRouterUpgradeCapId     string

	// OnRamp related
	OnRampAddress          string
	OnRampStateObjectId    string
	OnRampOwnerCapObjectId string
	OnRampUpgradeCapId     string

	// OffRamp related
	OffRampAddress       string
	OffRampStateObjectId string
	OffRampOwnerCapId    string
	OffRampUpgradeCapId  string

	// LINK token related
	LinkTokenAddress        string
	LinkTokenCoinMetadataId string
	LinkTokenTreasuryCapId  string
	LinkTokenUpgradeCapId   string

	// Managed Token related
	ManagedTokens       map[string]ManagedTokenState
	ManagedTokenFaucets map[string]ManagedTokenFaucetState

	// Token pools related
	LnRTokenPools     map[string]CCIPPoolState
	BnMTokenPools     map[string]CCIPPoolState
	ManagedTokenPools map[string]CCIPPoolState

	// mock upgrade related
	OnRampMockV2PackageId  string
	OffRampMockV2PackageId string
	CCIPMockV2PackageId    string
}

func (CCIPChainState) GenerateView

func (s CCIPChainState) GenerateView(e *cldf.Environment, selector uint64, chainName string) (SuiChainView, error)

func (CCIPChainState) MCMSState

func (s CCIPChainState) MCMSState(isFastCurse bool) MCMSStateFields

MCMSState returns the MCMS object IDs for the requested instance. When isFastCurse is true the fastcurse instance fields are returned; otherwise the normal governance instance fields are returned.

type CCIPPoolState

type CCIPPoolState struct {
	PackageID        string
	StateObjectId    string
	OwnerCapObjectId string
	RebalancerCapIds []string // only applicable for LR TP
}

type MCMSStateFields

type MCMSStateFields struct {
	PackageID               string
	StateObjectID           string
	RegistryObjectID        string
	DeployerStateObjectID   string
	AccountStateObjectID    string
	AccountOwnerCapObjectID string
	TimelockObjectID        string
}

MCMSStateFields holds the seven object IDs that describe one MCMS deployment.

type ManagedTokenFaucetState

type ManagedTokenFaucetState struct {
	PackageID          string
	StateObjectId      string
	UpgradeCapObjectId string
}

type ManagedTokenState

type ManagedTokenState struct {
	TokenPackageID      string
	TokenCoinMetadataID string
	TokenTreasuryCapID  string
	TokenUpgradeCapID   string
	PackageID           string
	StateObjectId       string
	OwnerCapObjectId    string
	MinterCapObjectIds  []string
	PublisherObjectId   string
}

type SuiChainView

type SuiChainView struct {
	ChainSelector uint64 `json:"chainSelector,omitempty"`
	ChainID       string `json:"chainID,omitempty"`

	MCMSWithTimelock          view.MCMSWithTimelockView `json:"mcmsWithTimelock"`
	FastCurseMCMSWithTimelock view.MCMSWithTimelockView `json:"fastcurseMcmsWithTimelock,omitempty"`

	CCIP    view.CCIPView               `json:"ccip,omitempty"`
	OnRamp  map[string]view.OnRampView  `json:"onRamp,omitempty"`
	OffRamp map[string]view.OffRampView `json:"offRamp,omitempty"`
	Router  view.RouterView             `json:"router,omitempty"`

	TokenPools map[string]map[string]view.TokenPoolView `json:"tokenPools,omitempty"` // TokenSymbol => TokenPool Address => PoolView
}

type TokenPoolType

type TokenPoolType string
const (
	TokenPoolTypeBurnMint    TokenPoolType = "bnm"
	TokenPoolTypeLockRelease TokenPoolType = "lnr"
	TokenPoolTypeManaged     TokenPoolType = "managed"
)

Directories

Path Synopsis
ops
ccip_router
Package routerops provides operations for deploying and managing CCIP Router contracts.
Package routerops provides operations for deploying and managing CCIP Router contracts.
rmn

Jump to

Keyboard shortcuts

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