chains

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EthMainnet      = new(Chain)
	EthRinkeby      = new(Chain)
	EthGoerli       = new(Chain)
	EthKovan        = new(Chain)
	OptimismMainnet = new(Chain)
	OptimismKovan   = new(Chain)
	ArbitrumMainnet = new(Chain)
	ArbitrumRinkeby = new(Chain)
	BSCMainnet      = new(Chain)
	HecoMainnet     = new(Chain)
	FantomMainnet   = new(Chain)
	FantomTestnet   = new(Chain)
	PolygonMainnet  = new(Chain)
	PolygonMumbai   = new(Chain)
	XDaiMainnet     = new(Chain)
	RSKMainnet      = new(Chain)
	AvalancheFuji   = new(Chain)
)

Functions

This section is empty.

Types

type Chain

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

Chain represents a blockchain with a unique Chain ID

func ChainFromID

func ChainFromID(id *big.Int) *Chain

ChainFromID returns the chain for the given ID If no chain is found, creates a new one and returns that

func (*Chain) Config

func (c *Chain) Config() ChainSpecificConfig

func (*Chain) ID

func (c *Chain) ID() *big.Int

func (*Chain) IsArbitrum

func (c *Chain) IsArbitrum() bool

IsArbitrum returns true if the chain is arbitrum mainnet or testnet

func (*Chain) IsL2

func (c *Chain) IsL2() bool

IsL2 returns true if this chain is an L2 chain, notably that the block numbers used for log searching are different from calling block.number

func (*Chain) IsOptimism

func (c *Chain) IsOptimism() bool

IsOptimism returns true if the chain is optimism mainnet or testnet

type ChainSpecificConfig

type ChainSpecificConfig struct {
	EnableLegacyJobPipeline          bool
	EthBalanceMonitorBlockDelay      uint16
	EthFinalityDepth                 uint
	EthGasBumpThreshold              uint64
	EthGasBumpWei                    big.Int
	EthGasLimitDefault               uint64
	EthGasLimitTransfer              uint64
	EthGasPriceDefault               big.Int
	EthHeadTrackerHistoryDepth       uint
	EthHeadTrackerSamplingInterval   time.Duration
	EthMaxGasPriceWei                big.Int
	EthMaxInFlightTransactions       uint32
	EthMaxQueuedTransactions         uint64
	EthMinGasPriceWei                big.Int
	EthTxResendAfterThreshold        time.Duration
	GasUpdaterBatchSize              uint32
	GasUpdaterBlockDelay             uint16
	GasUpdaterBlockHistorySize       uint16
	GasUpdaterEnabled                bool
	LinkContractAddress              string
	MinIncomingConfirmations         uint32
	MinRequiredOutgoingConfirmations uint64
	MinimumContractPayment           *assets.Link
	OCRContractConfirmations         uint16
	// contains filtered or unexported fields
}

ChainSpecificConfig lists the config defaults specific to a particular chain ID

var FallbackConfig ChainSpecificConfig

FallbackConfig represents the "base layer" of config defaults It can be overridden on a per-chain basis and may be used if the chain is unknown

Jump to

Keyboard shortcuts

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