config

package
v3.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TestConfig test config instance
	TestConfig = &Config{}

	// ChanIn channel to receive input arguments
	ChanIn = make(chan map[string]string)
	// ChanOut channel to send output result
	ChanOut = make(chan string)
)

Functions

func LoadTestConfig

func LoadTestConfig(configFile string)

LoadTestConfig load test router config

Types

type Config

type Config struct {
	// router swap identifier
	Identifier string

	// router swap type
	SwapType string

	// test module name
	Module string

	// rpc listen port
	Port int

	// sign with this private key instead of MPC
	SignWithPrivateKey string
	SignerAddress      string

	// allow call into router from contract
	AllowCallByContract bool

	// is debug mode (print more logs)
	IsDebugMode bool

	// gatesway config
	Gateway *tokens.GatewayConfig

	// chain config
	Chain *tokens.ChainConfig

	// token config
	Token *tokens.TokenConfig

	// swap config
	Swap *SwapConfig

	// all chain ids (pass 'miss token config' checking)
	AllChainIDs []string
	// contains filtered or unexported fields
}

Config test config struct

func (*Config) GetAllChainIDs

func (c *Config) GetAllChainIDs() []*big.Int

GetAllChainIDs get all chainIDs

func (*Config) GetFeeConfig added in v3.6.0

func (c *Config) GetFeeConfig() *tokens.FeeConfig

GetFeeConfig get fee config

func (*Config) GetSwapConfig

func (c *Config) GetSwapConfig() *tokens.SwapConfig

GetSwapConfig get swap config

type SwapConfig

type SwapConfig struct {
	SwapFeeRatePerMillion uint64
	MaximumSwapFee        string
	MinimumSwapFee        string
	MaximumSwap           string
	BigValueThreshold     string
	MinimumSwap           string
	// contains filtered or unexported fields
}

SwapConfig swap config

func (*SwapConfig) CheckConfig

func (c *SwapConfig) CheckConfig() error

CheckConfig check swap config

Jump to

Keyboard shortcuts

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