Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultBlockConfirmations = 10
View Source
const DefaultGasLimit = 7000000
View Source
const DefaultGasMultiplier = 1.1
View Source
const DefaultGasPrice = 20000000000
Variables ¶
View Source
var ( DefaultConfigDir = "./chainbridge/config/chain_bridge.json" KeystoreFlagName = "./data/keystore/" BlockstoreFlagName = "./chainbridge/blockstore" FreshStartFlagName = "fresh" LatestBlockFlagName = "latest" )
Functions ¶
This section is empty.
Types ¶
type BridgeConfig ¶
type BridgeConfig struct {
Chains []GeneralChainConfig `json:"chains"`
}
func GetConfig ¶
func GetConfig(path string) (*BridgeConfig, error)
func NewConfig ¶
func NewConfig() *BridgeConfig
type GeneralChainConfig ¶
type GeneralChainConfig struct { Name string `json:"name"` // Human-readable chain name Id uint64 `json:"id"` //ChainID Endpoint string `json:"endpoint"` // url for rpc endpoint From string `json:"from"` // address of key to use KeystorePath string // Location of key files Insecure bool // Indicated whether the test keyring should be used BlockstorePath string // Location of blockstore FreshStart bool // If true, blockstore is ignored at start. LatestBlock bool // If true, overrides blockstore or latest block in config and starts from current block Opts OpsConfig Kp *secp256k1.Keypair }
func (*GeneralChainConfig) Validate ¶
func (c *GeneralChainConfig) Validate() error
type OpsConfig ¶
type OpsConfig struct { Bridge string `mapstructure:"bridge"` MaxGasPrice uint64 `mapstructure:"maxGasPrice"` GasMultiplier float64 `mapstructure:"gasMultiplier"` GasLimit uint64 `mapstructure:"gasLimit"` StartBlock uint64 `mapstructure:"startBlock"` BlockConfirmations int64 `mapstructure:"blockConfirmations"` }
func (*OpsConfig) ParseConfig ¶
Click to show internal directories.
Click to hide internal directories.