chains

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 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)
	RSKTestnet       = new(Chain)
	AvalancheFuji    = new(Chain)
	AvalancheMainnet = 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

func (*Chain) IsL2

func (c *Chain) IsL2() bool

IsL2 returns true if this chain is an L2 chain. Notably 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

type ChainSpecificConfig

type ChainSpecificConfig struct {
	BalanceMonitorEnabled                      bool
	BalanceMonitorBlockDelay                   uint16
	BlockEmissionIdleWarningThreshold          time.Duration
	BlockHistoryEstimatorBatchSize             uint32
	BlockHistoryEstimatorBlockDelay            uint16
	BlockHistoryEstimatorBlockHistorySize      uint16
	BlockHistoryEstimatorTransactionPercentile uint16
	EthTxReaperInterval                        time.Duration
	EthTxReaperThreshold                       time.Duration
	EthTxResendAfterThreshold                  time.Duration
	FinalityDepth                              uint
	FlagsContractAddress                       string
	GasBumpPercent                             uint16
	GasBumpThreshold                           uint64
	GasBumpTxDepth                             uint16
	GasBumpWei                                 big.Int
	GasEstimatorMode                           string
	GasLimitDefault                            uint64
	GasLimitMultiplier                         float32
	GasLimitTransfer                           uint64
	GasPriceDefault                            big.Int
	HeadTrackerHistoryDepth                    uint
	HeadTrackerMaxBufferSize                   uint
	HeadTrackerSamplingInterval                time.Duration
	Layer2Type                                 string
	LinkContractAddress                        string
	LogBackfillBatchSize                       uint32
	MaxGasPriceWei                             big.Int
	MaxInFlightTransactions                    uint32
	MaxQueuedTransactions                      uint64
	MinGasPriceWei                             big.Int
	MinIncomingConfirmations                   uint32
	MinRequiredOutgoingConfirmations           uint64
	MinimumContractPayment                     *assets.Link
	NonceAutoSync                              bool
	OCRContractConfirmations                   uint16
	RPCDefaultBatchSize                        uint32
	// 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

Directories

Path Synopsis
evm

Jump to

Keyboard shortcuts

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