contracts

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create3Factory added in v0.3.0

func Create3Factory(network netconf.ID) common.Address

Create3Factory returns the Create3 factory address for the given network.

func IsEmptyAddress added in v0.10.0

func IsEmptyAddress(addr common.Address) bool

func PackInitCode

func PackInitCode(abi *abi.ABI, bytecodeHex string, params ...any) ([]byte, error)

PackInitCode packs the init code for a contract deployment.

func UseStagingOmniRPC

func UseStagingOmniRPC(rpc string)

UseStagingOmniRPC overrides the default staging Omni EVM RPC URL.

Types

type Addresses

type Addresses struct {
	AVS            common.Address
	Create3Factory common.Address
	GasPump        common.Address
	GasStation     common.Address
	L1Bridge       common.Address
	Portal         common.Address
	Token          common.Address
	SolveOutbox    common.Address
	SolveInbox     common.Address
	FeeOracleV2    common.Address
}

func GetAddresses

func GetAddresses(ctx context.Context, network netconf.ID) (Addresses, error)

GetAddresses returns the contract addresses for the given network.

type Contract added in v0.11.0

type Contract struct {
	Name               string
	Address            common.Address
	FundThresholds     *FundThresholds
	WithdrawThresholds *WithdrawThresholds
	IsDeployedOn       func(chainID uint64, network netconf.ID) bool
	Tokens             func(chainID uint64, network netconf.ID) []Token
}

Contract defines a contract to monitor.

func ToFund

func ToFund(ctx context.Context, network netconf.ID) ([]Contract, error)

ToFund returns all fundable contracts for the given network.

func ToMonitor added in v0.11.0

func ToMonitor(ctx context.Context, network netconf.ID) ([]Contract, error)

ToMonitor returns all contracts for the given network relevant to the monitor.

type FundThresholds

type FundThresholds struct {
	// contains filtered or unexported fields
}

FundThresholds defines the thresholds for funding a contract.

func (FundThresholds) MinBalance

func (t FundThresholds) MinBalance() *big.Int

MinBalance returns the minimum balance required for funding a contract.

func (FundThresholds) TargetBalance

func (t FundThresholds) TargetBalance() *big.Int

TargetBalance returns the target balance to fund a contract to.

type Salts

type Salts struct {
	AVS         string
	GasPump     string
	GasStation  string
	L1Bridge    string
	Portal      string
	Token       string
	SolveOutbox string
	SolveInbox  string
	FeeOracleV2 string
}

func GetSalts

func GetSalts(ctx context.Context, network netconf.ID) (Salts, error)

GetSalts returns the contract salts for the given network.

type Token added in v0.1.9

type Token struct {
	Symbol  string
	Address common.Address
}

type WithdrawThresholds added in v0.11.0

type WithdrawThresholds struct {
	// contains filtered or unexported fields
}

WithdrawThresholds defines the thresholds for withdrawing from a contract.

func (WithdrawThresholds) MaxBalance added in v0.11.0

func (t WithdrawThresholds) MaxBalance() *big.Int

MaxBalance returns the max balance a contract can have before a withdrawal.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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