types

package
v1.10.17 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain struct {
	ID        utils.Big `gorm:"primary_key"`
	Nodes     []Node    `gorm:"->;foreignKey:EVMChainID;references:ID"`
	Cfg       ChainCfg
	CreatedAt time.Time
	UpdatedAt time.Time
	Enabled   bool
}

func (Chain) TableName

func (Chain) TableName() string

type ChainCfg

type ChainCfg struct {
	BlockHistoryEstimatorBlockDelay       null.Int
	BlockHistoryEstimatorBlockHistorySize null.Int
	EthTxReaperThreshold                  *models.Duration
	EthTxResendAfterThreshold             *models.Duration
	EvmEIP1559DynamicFees                 null.Bool
	EvmFinalityDepth                      null.Int
	EvmGasBumpPercent                     null.Int
	EvmGasBumpTxDepth                     null.Int
	EvmGasBumpWei                         *utils.Big
	EvmGasLimitDefault                    null.Int
	EvmGasLimitMultiplier                 null.Float
	EvmGasPriceDefault                    *utils.Big
	EvmGasTipCapDefault                   *utils.Big
	EvmGasTipCapMinimum                   *utils.Big
	EvmHeadTrackerHistoryDepth            null.Int
	EvmHeadTrackerMaxBufferSize           null.Int
	EvmHeadTrackerSamplingInterval        *models.Duration
	EvmLogBackfillBatchSize               null.Int
	EvmMaxGasPriceWei                     *utils.Big
	EvmNonceAutoSync                      null.Bool
	EvmRPCDefaultBatchSize                null.Int
	FlagsContractAddress                  null.String
	GasEstimatorMode                      null.String
	ChainType                             null.String
	MinIncomingConfirmations              null.Int
	MinRequiredOutgoingConfirmations      null.Int
	MinimumContractPayment                *assets.Link
	OCRObservationTimeout                 *models.Duration
	KeySpecific                           map[string]ChainCfg
}

func (*ChainCfg) Scan

func (c *ChainCfg) Scan(value interface{}) error

func (ChainCfg) Value

func (c ChainCfg) Value() (driver.Value, error)

type ChainConfigORM

type ChainConfigORM interface {
	StoreString(chainID *big.Int, key, val string) error
	Clear(chainID *big.Int, key string) error
}

type NewNode

type NewNode struct {
	Name       string      `json:"name"`
	EVMChainID utils.Big   `json:"evmChainId"`
	WSURL      null.String `json:"wsURL" db:"ws_url"`
	HTTPURL    null.String `json:"httpURL" db:"http_url"`
	SendOnly   bool        `json:"sendOnly"`
}

type Node

type Node struct {
	ID         int32 `gorm:"primary_key"`
	Name       string
	EVMChain   Chain
	EVMChainID utils.Big   `gorm:"column:evm_chain_id"`
	WSURL      null.String `gorm:"column:ws_url" db:"ws_url"`
	HTTPURL    null.String `gorm:"column:http_url" db:"http_url"`
	SendOnly   bool
	CreatedAt  time.Time
	UpdatedAt  time.Time
}

type ORM

type ORM interface {
	EnabledChainsWithNodes() ([]Chain, error)
	Chain(id utils.Big) (chain Chain, err error)
	CreateChain(id utils.Big, config ChainCfg) (Chain, error)
	UpdateChain(id utils.Big, enabled bool, config ChainCfg) (Chain, error)
	DeleteChain(id utils.Big) error
	Chains(offset, limit int) ([]Chain, int, error)
	CreateNode(data NewNode) (Node, error)
	DeleteNode(id int64) error
	Nodes(offset, limit int) ([]Node, int, error)
	NodesForChain(chainID utils.Big, offset, limit int) ([]Node, int, error)
	ChainConfigORM
}

Jump to

Keyboard shortcuts

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