chain

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: LGPL-3.0 Imports: 7 Imported by: 0

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
	GasLimit           *big.Int
	StartBlock         *big.Int
	BlockConfirmations *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"`
	Key            string
	Insecure       bool
	BlockstorePath string
	FreshStart     bool
	LatestBlock    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"`
	GasMultiplier      float64 `mapstructure:"gasMultiplier" default:"1"`
	GasLimit           int64   `mapstructure:"gasLimit" default:"2000000"`
	StartBlock         int64   `mapstructure:"startBlock"`
	BlockConfirmations int64   `mapstructure:"blockConfirmations" default:"10"`
	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