view

package
v0.0.0-...-c0b9fb2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 19 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AptosChainView

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

	MCMSWithTimelock MCMSWithTimelockView `json:"mcmsWithTimelock"`

	LinkToken TokenView            `json:"linkToken"`
	Tokens    map[string]TokenView `json:"tokens,omitempty"`

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

	TokenPools map[string]map[string]TokenPoolView `json:"poolByTokens,omitempty"`

	UpdateMu *sync.Mutex `json:"-"`
}

func NewAptosChainView

func NewAptosChainView() AptosChainView

type CCIPView

type CCIPView struct {
	ContractMetaData

	FeeQuoter          FeeQuoterView          `json:"feeQuoter"`
	RMNRemote          RMNRemoteView          `json:"rmnRemote"`
	TokenAdminRegistry TokenAdminRegistryView `json:"tokenAdminRegistry"`
	NonceManager       NonceManagerView       `json:"nonceManager"`
	ReceiverRegistry   ReceiverRegistryView   `json:"receiverRegistry"`
}

func GenerateCCIPView

func GenerateCCIPView(chain cldf_aptos.Chain, ccipAddress aptos.AccountAddress, routerAddress aptos.AccountAddress) (CCIPView, error)

type ContractMetaData

type ContractMetaData struct {
	Address        string `json:"address,omitempty"`
	Owner          string `json:"owner,omitempty"`
	TypeAndVersion string `json:"typeAndVersion,omitempty"`
}

type DestChainSpecificData

type DestChainSpecificData struct {
	AllowedSendersList []string              `json:"allowedSendersList"`
	DestChainConfig    OnRampDestChainConfig `json:"destChainConfig"`
}

type FeeQuoterDestChainConfig

type FeeQuoterDestChainConfig struct {
	IsEnabled                         bool   `json:"isEnabled"`
	MaxNumberOfTokensPerMsg           uint16 `json:"maxNumberOfTokensPerMsg"`
	MaxDataBytes                      uint32 `json:"maxDataBytes"`
	MaxPerMsgGasLimit                 uint32 `json:"maxPerMsgGasLimit"`
	DestGasOverhead                   uint32 `json:"destGasOverhead"`
	DestGasPerPayloadByteBase         uint8  `json:"destGasPerPayloadByteBase"`
	DestGasPerPayloadByteHigh         uint8  `json:"destGasPerPayloadByteHigh"`
	DestGasPerPayloadByteThreshold    uint16 `json:"destGasPerPayloadByteThreshold"`
	DestDataAvailabilityOverheadGas   uint32 `json:"destDataAvailabilityOverheadGas"`
	DestGasPerDataAvailabilityByte    uint16 `json:"destGasPerDataAvailabilityByte"`
	DestDataAvailabilityMultiplierBps uint16 `json:"destDataAvailabilityMultiplierBps"`
	ChainFamilySelector               string `json:"chainFamilySelector"`
	EnforceOutOfOrder                 bool   `json:"enforceOutOfOrder"`
	DefaultTokenFeeUsdCents           uint16 `json:"defaultTokenFeeUsdCents"`
	DefaultTokenDestGasOverhead       uint32 `json:"defaultTokenDestGasOverhead"`
	DefaultTxGasLimit                 uint32 `json:"defaultTxGasLimit"`
	GasMultiplierWeiPerEth            uint64 `json:"gasMultiplierWeiPerEth"`
	GasPriceStalenessThreshold        uint32 `json:"gasPriceStalenessThreshold"`
	NetworkFeeUsdCents                uint32 `json:"networkFeeUsdCents"`
}

type FeeQuoterStaticConfig

type FeeQuoterStaticConfig struct {
	MaxFeeJuelsPerMsg            string `json:"maxFeeJuelsPerMsg"`
	LinkToken                    string `json:"linkToken"`
	TokenPriceStalenessThreshold uint64 `json:"tokenPriceStalenessThreshold"`
}

type FeeQuoterView

type FeeQuoterView struct {
	ContractMetaData

	FeeTokens               []string                            `json:"feeTokens"`
	StaticConfig            FeeQuoterStaticConfig               `json:"staticConfig"`
	DestinationChainConfigs map[uint64]FeeQuoterDestChainConfig `json:"destinationChainConfigs"`
}

type MCMSWithTimelockView

type MCMSWithTimelockView struct {
	ContractMetaData

	Bypasser  mcmstypes.Config
	Proposer  mcmstypes.Config
	Canceller mcmstypes.Config

	TimelockMinDelay         uint64
	TimelockBlockedFunctions []TimelockBlockedFunction
}

func GenerateMCMSWithTimelockView

func GenerateMCMSWithTimelockView(chain cldf_aptos.Chain, mcmsAddress aptos.AccountAddress) (MCMSWithTimelockView, error)

type NonceManagerView

type NonceManagerView struct {
	ContractMetaData
}

type OffRampDynamicConfig

type OffRampDynamicConfig struct {
	FeeQuoter                               string
	PermissionlessExecutionThresholdSeconds uint32
}

type OffRampSourceChainConfig

type OffRampSourceChainConfig struct {
	Router                    string
	IsEnabled                 bool
	IsRMNVerificationDisabled bool
	OnRamp                    string
}

type OffRampStaticConfig

type OffRampStaticConfig struct {
	ChainSelector      uint64
	RMNRemote          string
	TokenAdminRegistry string
	NonceManager       string
}

type OffRampView

type OffRampView struct {
	ContractMetaData

	StaticConfig       OffRampStaticConfig                 `json:"staticConfig"`
	DynamicConfig      OffRampDynamicConfig                `json:"dynamicConfig"`
	SourceChainConfigs map[uint64]OffRampSourceChainConfig `json:"sourceChainConfigs"`
}

func GenerateOffRampView

func GenerateOffRampView(chain cldf_aptos.Chain, offRampAddress aptos.AccountAddress, routerAddress aptos.AccountAddress) (OffRampView, error)

type OnRampDestChainConfig

type OnRampDestChainConfig struct {
	AllowlistEnabled   bool
	Router             string
	RouterStateAddress string
}

type OnRampDynamicConfig

type OnRampDynamicConfig struct {
	FeeAggregator  string
	AllowlistAdmin string
}

type OnRampStaticConfig

type OnRampStaticConfig struct {
	ChainSelector uint64
}

type OnRampView

type OnRampView struct {
	ContractMetaData

	StaticConfig          OnRampStaticConfig               `json:"staticConfig"`
	DynamicConfig         OnRampDynamicConfig              `json:"dynamicConfig"`
	SourceTokenToPool     map[string]string                `json:"sourceTokenToPool"`
	DestChainSpecificData map[uint64]DestChainSpecificData `json:"destChainSpecificData"`
}

func GenerateOnRampView

func GenerateOnRampView(
	chain cldf_aptos.Chain,
	onRampAddress aptos.AccountAddress,
	routerAddress aptos.AccountAddress,
	ccipAddress aptos.AccountAddress,
) (OnRampView, error)

type PoolInterface

type PoolInterface interface {
	Owner(opts *bind.CallOpts) (aptos.AccountAddress, error)
	TypeAndVersion(opts *bind.CallOpts) (string, error)
	GetToken(opts *bind.CallOpts) (aptos.AccountAddress, error)
	GetAllowlistEnabled(opts *bind.CallOpts) (bool, error)
	GetAllowlist(opts *bind.CallOpts) ([]aptos.AccountAddress, error)
	GetSupportedChains(opts *bind.CallOpts) ([]uint64, error)
	GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error)
	GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error)
	GetCurrentInboundRateLimiterState(opts *bind.CallOpts, remoteChainSelector uint64) (module_rate_limiter.TokenBucket, error)
	GetCurrentOutboundRateLimiterState(opts *bind.CallOpts, remoteChainSelector uint64) (module_rate_limiter.TokenBucket, error)
}

type RMNRemoteCurseEntry

type RMNRemoteCurseEntry struct {
	Subject  string `json:"subject"`
	Selector uint64 `json:"selector"`
}

type RMNRemoteSigner

type RMNRemoteSigner struct {
	OnchainPublicKey string `json:"onchain_public_key"` // Follow EVM snake_case
	NodeIndex        uint64 `json:"node_index"`
}

type RMNRemoteVersionedConfig

type RMNRemoteVersionedConfig struct {
	Version uint32            `json:"version"`
	Signers []RMNRemoteSigner `json:"signers"`
	Fsign   uint64            `json:"fSign"`
}

type RMNRemoteView

type RMNRemoteView struct {
	ContractMetaData
	IsCursed             bool                     `json:"isCursed"`
	Config               RMNRemoteVersionedConfig `json:"config"`
	CursedSubjectEntries []RMNRemoteCurseEntry    `json:"cursedSubjectEntries"`
}

type RateLimiterConfig

type RateLimiterConfig struct {
	IsEnabled bool
	Capacity  uint64
	Rate      uint64
}

type ReceiverRegistryView

type ReceiverRegistryView struct {
	ContractMetaData
}

type RemoteChainConfig

type RemoteChainConfig struct {
	RemoteTokenAddress        string
	RemotePoolAddresses       []string
	InboundRateLimiterConfig  RateLimiterConfig
	OutboundRateLimiterConfig RateLimiterConfig
}

type RouterView

type RouterView struct {
	ContractMetaData

	IsTestRouter bool              `json:"isTestRouter"`
	OnRamps      map[uint64]string `json:"onRamps"`  // Map of DestinationChainSelector to OnRampAddress
	OffRamps     map[uint64]string `json:"offRamps"` // Map of DestinationChainSelector to OffRampAddress
}

func GenerateRouterView

func GenerateRouterView(chain cldf_aptos.Chain, routerAddress aptos.AccountAddress, offRampAddresses []aptos.AccountAddress, isTestRouter bool) (RouterView, error)

type TimelockBlockedFunction

type TimelockBlockedFunction struct {
	Target       string
	ModuleName   string
	FunctionName string
}

type TokenAdminRegistryView

type TokenAdminRegistryView struct {
	ContractMetaData
}

type TokenPoolView

type TokenPoolView struct {
	ContractMetaData

	Token              string                       `json:"token"`
	RemoteChainConfigs map[uint64]RemoteChainConfig `json:"remoteChainConfigs"`
	AllowList          []string                     `json:"allowList"`
	AllowListEnabled   bool                         `json:"allowListEnabled"`
}

func GenerateTokenPoolView

func GenerateTokenPoolView(chain cldf_aptos.Chain, address aptos.AccountAddress, boundTokenPoolModule PoolInterface) (TokenPoolView, error)

type TokenView

type TokenView struct {
	ContractMetaData

	Name       string `json:"name"`
	Symbol     string `json:"symbol"`
	Decimals   uint8  `json:"decimals"`
	IconURI    string `json:"iconURI,omitempty"`
	ProjectURI string `json:"projectURI,omitempty"`

	Burners                   []aptos.AccountAddress `json:"burners"`
	Minters                   []aptos.AccountAddress `json:"minters"`
	ManagedTokenObjectAddress string                 `json:"managedTokenObjectAddress,omitempty"`
}

func GenerateTokenView

func GenerateTokenView(chain cldf_aptos.Chain, managedTokenObjectAddress aptos.AccountAddress) (TokenView, error)

GenerateTokenView generates a token view for a given managed token. The provided address must be a `managed_token` deployment.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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