chain

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: LGPL-3.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EVMConfig

type EVMConfig struct {
	GeneralChainConfig     GeneralChainConfig
	Bridge                 string
	Erc20Handler           string
	Erc721Handler          string
	GenericHandler         string
	MaxGasPrice            *big.Int
	GasMultiplier          *big.Float
	GasPriceIncreaseFactor *big.Int
	GasLimit               *big.Int
	StartBlock             *big.Int
	BlockConfirmations     *big.Int
	BlockInterval          *big.Int
	BlockRetryInterval     time.Duration
}

func NewEVMConfig

func NewEVMConfig(chainConfig map[string]interface{}) (*EVMConfig, error)

NewEVMConfig decodes and validates an instance of an EVMConfig from raw chain config

type GeneralChainConfig

type GeneralChainConfig struct {
	Name           string `mapstructure:"name"`
	Id             *uint8 `mapstructure:"id"`
	Endpoint       string `mapstructure:"endpoint"`
	Type           string `mapstructure:"type"`
	BlockstorePath string `mapstructure:"blockstorePath"`
	FreshStart     bool   `mapstructure:"fresh"`
	LatestBlock    bool   `mapstructure:"latest"`
	Key            string
	Insecure       bool
}

func (*GeneralChainConfig) ParseFlags

func (c *GeneralChainConfig) ParseFlags()

func (*GeneralChainConfig) Validate

func (c *GeneralChainConfig) Validate() error

type RawEVMConfig

type RawEVMConfig struct {
	GeneralChainConfig     `mapstructure:",squash"`
	Bridge                 string  `mapstructure:"bridge"`
	Erc20Handler           string  `mapstructure:"erc20Handler"`
	Erc721Handler          string  `mapstructure:"erc721Handler"`
	GenericHandler         string  `mapstructure:"genericHandler"`
	MaxGasPrice            int64   `mapstructure:"maxGasPrice" default:"20000000000"`
	GasPriceIncreaseFactor int64   `mapstructure:"gasPriceIncreaseFactor" default:"15"`
	GasMultiplier          float64 `mapstructure:"gasMultiplier" default:"1"`
	GasLimit               int64   `mapstructure:"gasLimit" default:"2000000"`
	StartBlock             int64   `mapstructure:"startBlock"`
	BlockConfirmations     int64   `mapstructure:"blockConfirmations" default:"10"`
	BlockInterval          int64   `mapstructure:"blockInterval" default:"5"`
	BlockRetryInterval     uint64  `mapstructure:"blockRetryInterval" default:"5"`
}

func (*RawEVMConfig) Validate

func (c *RawEVMConfig) Validate() error

Jump to

Keyboard shortcuts

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