avs

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrForNetwork

func AddrForNetwork(network netconf.ID) (common.Address, bool)

func Deploy

func Deploy(ctx context.Context, network netconf.ID, backend *ethbackend.Backend) (common.Address, *ethtypes.Receipt, error)

Deploy deploys the AVS contract and returns the address and receipt. It only allows deployments to explicitly supported chains.

func DeployIfNeeded

func DeployIfNeeded(ctx context.Context, network netconf.ID, backend *ethbackend.Backend) (common.Address, *ethtypes.Receipt, error)

DeployIfNeeded deploys a new AVS contract if it is not already deployed.

func DeregisterOperatorFromAVS

func DeregisterOperatorFromAVS(ctx context.Context, addr common.Address, backend *ethbackend.Backend, operator common.Address) error

func IsDeployed

func IsDeployed(ctx context.Context, network netconf.ID, backend *ethbackend.Backend) (bool, common.Address, error)

IsDeployed checks if the OmniAVS contract is deployed to the provided backend to its expected network address.

func RegisterOperatorWithAVS

func RegisterOperatorWithAVS(ctx context.Context, addr common.Address, backend *ethbackend.Backend, operator common.Address) error

Types

type DeploymentConfig

type DeploymentConfig struct {
	Create3Factory   common.Address
	Create3Salt      string
	Eigen            EigenDeployments
	Deployer         common.Address
	Owner            common.Address
	ProxyAdmin       common.Address
	Portal           common.Address
	OmniChainID      uint64
	MetadataURI      string
	StrategyParams   []StrategyParam
	EthStakeInbox    common.Address
	MinOperatorStake *big.Int
	MaxOperatorCount uint32
	AllowlistEnabled bool
	ExpectedAddr     common.Address
}

func (DeploymentConfig) Validate

func (cfg DeploymentConfig) Validate() error

type EigenDeployments

type EigenDeployments struct {
	AVSDirectory      common.Address `json:"AVSDirectory"`
	DelegationManager common.Address `json:"DelegationManager"`
}

func (EigenDeployments) Validate

func (e EigenDeployments) Validate() error

type StrategyParam

type StrategyParam struct {
	Strategy   common.Address
	Multiplier *big.Int
}

Jump to

Keyboard shortcuts

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