configs

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allow added in v0.2.2

type Allow struct {
	ContractAddr string   `mapstructure:"contract_addr"`
	Senders      []string `mapstructure:"senders"`
}

type App

type App struct {
	MetricAddr   string   `mapstructure:"metric_addr"`
	Env          string   `mapstructure:"env"`
	LogLevel     string   `mapstructure:"log_level"`
	ChannelTypes []string `mapstructure:"channel_types"`
}

type Cache

type Cache struct {
	Filename    string `mapstructure:"filename"`
	StartHeight uint64 `mapstructure:"start_height"`
}

type Chain

type Chain struct {
	Source ChainCfg `mapstructure:"source"`
	Dest   ChainCfg `mapstructure:"dest"`
}

type ChainCfg

type ChainCfg struct {
	Cache      Cache      `mapstructure:"cache"`
	Tendermint Tendermint `mapstructure:"tendermint"`
	Eth        Eth        `mapstructure:"eth"`
	Bsc        Eth        `mapstructure:"bsc"`
	Ethermint  Ethermint  `mapstructure:"ethermint"`
	ChainType  string     `mapstructure:"chain_type"`
	Enabled    bool       `mapstructure:"enabled"`
}

type ChainKey

type ChainKey struct {
	Name         string `mapstructure:"name"`
	Password     string `mapstructure:"password"`
	PrivKeyArmor string `mapstructure:"priv_key_armor"`
}

type Config

type Config struct {
	App   App   `mapstructure:"app"`
	Chain Chain `mapstructure:"chain"`
}

func NewConfig

func NewConfig() *Config

type Eth added in v0.2.0

type Eth struct {
	URI                   string       `mapstructure:"uri"`
	ChainID               uint64       `mapstructure:"chain_id"`
	ChainName             string       `mapstructure:"chain_name"`
	Contracts             EthContracts `mapstructure:"eth_contracts"`
	UpdateClientFrequency uint64       `mapstructure:"update_client_frequency"`
	GasLimit              uint64       `mapstructure:"gas_limit"`
	MaxGasPrice           uint64       `mapstructure:"max_gas_price"`
	CommentSlot           int64        `mapstructure:"comment_slot"`
	TipCoefficient        float64      `mapstructure:"tip_coefficient"`
}

Eth config============================================================

type EthContractCfg added in v0.2.0

type EthContractCfg struct {
	Addr       string `mapstructure:"addr"`
	Topic      string `mapstructure:"topic"`
	OptPrivKey string `mapstructure:"opt_priv_key"`
}

type EthContracts added in v0.2.0

type EthContracts struct {
	Packet      EthContractCfg `mapstructure:"packet"`
	AckPacket   EthContractCfg `mapstructure:"ack_packet"`
	CleanPacket EthContractCfg `mapstructure:"clean_packet"`
	Client      EthContractCfg `mapstructure:"client"`
}

type Ethermint added in v0.2.7

type Ethermint struct {
	// comment
	ChainName             string `mapstructure:"chain_name"`
	UpdateClientFrequency uint64 `mapstructure:"update_client_frequency"`

	// eth
	URI            string       `mapstructure:"uri"`
	EthChainID     uint64       `mapstructure:"eth_chain_id"`
	Contracts      EthContracts `mapstructure:"eth_contracts"`
	GasLimit       uint64       `mapstructure:"gas_limit"`
	MaxGasPrice    uint64       `mapstructure:"max_gas_price"`
	CommentSlot    int64        `mapstructure:"comment_slot"`
	TipCoefficient float64      `mapstructure:"tip_coefficient"`

	// tendermint
	TendermintChainID string `mapstructure:"tendermint_chain_id"`
	RPCAddr           string `mapstructure:"rpc_addr"`
	GrpcAddr          string `mapstructure:"grpc_addr"`
	Algo              string `mapstructure:"algo"`
	Gas               uint64 `mapstructure:"gas"`
	RequestTimeout    uint   `mapstructure:"request_timeout"`
}

type Fee

type Fee struct {
	Denom  string `mapstructure:"denom"`
	Amount int64  `mapstructure:"amount"`
}

type Tendermint

type Tendermint struct {
	ChainName string   `mapstructure:"chain_name"`
	ChainID   string   `mapstructure:"chain_id"`
	RPCAddr   string   `mapstructure:"rpc_addr"`
	GrpcAddr  string   `mapstructure:"grpc_addr"`
	Gas       uint64   `mapstructure:"gas"`
	Key       ChainKey `mapstructure:"key"`
	Fee       Fee      `mapstructure:"fee"`
	Algo      string   `mapstructure:"algo"`

	RequestTimeout        uint   `mapstructure:"request_timeout"`
	UpdateClientFrequency uint64 `mapstructure:"update_client_frequency"`

	Allows             []Allow `mapstructure:"allows"`
	CleanPacketEnabled bool    `mapstructure:"clean_packet_enabled"`
}

Tendermint =====================================================================

Jump to

Keyboard shortcuts

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