params

package
v3.0.0-...-e8b7a4c Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package params provides common version info and config items.

Index

Constants

View Source
const (
	VersionMajor = 3  // Major version component of the current release
	VersionMinor = 6  // Minor version component of the current release
	VersionPatch = 2  // Patch version component of the current release
	VersionMeta  = "" // Version metadata to append to the version string
)

version parts

View Source
const (
	RouterSwapPrefixID = "routerswap"
)

router swap constants

Variables

View Source
var (
	GetBalanceBlockNumberOpt = "latest" // latest or pending

	GatewayConfigFile string
)

exported variables

View Source
var CustomizeConfigFunc func(*RouterConfig)

CustomizeConfigFunc customize config items

View Source
var IsReload bool

IsReload is reloading config

View Source
var (

	// IsSwapServer is swap server
	IsSwapServer bool
)
View Source
var IsTestMode bool

IsTestMode used for testing

View Source
var Version = func() string {
	return fmt.Sprintf("%d.%d.%d", VersionMajor, VersionMinor, VersionPatch)
}()

Version holds the textual version string.

View Source
var VersionWithMeta = func() string {
	v := Version
	if VersionMeta != "" {
		v += "-" + VersionMeta
	}
	return v
}()

VersionWithMeta holds the textual version string including the metadata.

Functions

func AddOrRemoveAccountBlackList

func AddOrRemoveAccountBlackList(accounts []string, isAdd bool)

AddOrRemoveAccountBlackList add or remove account blacklist

func AddOrRemoveBigValueWhitelist

func AddOrRemoveBigValueWhitelist(tokenID string, callers []string, isAdd bool)

AddOrRemoveBigValueWhitelist add or remove big value whitelist

func AddOrRemoveCallByContractCodeHashWhitelist

func AddOrRemoveCallByContractCodeHashWhitelist(chainID string, codehashes []string, isAdd bool)

AddOrRemoveCallByContractCodeHashWhitelist add or remove call by contract code hash whitelist

func AddOrRemoveCallByContractWhitelist

func AddOrRemoveCallByContractWhitelist(chainID string, callers []string, isAdd bool)

AddOrRemoveCallByContractWhitelist add or remove call by contract whitelist

func AddOrRemoveChainIDBlackList

func AddOrRemoveChainIDBlackList(chainIDs []string, isAdd bool)

AddOrRemoveChainIDBlackList add or remove chainID blacklist

func AddOrRemoveTokenIDBlackList

func AddOrRemoveTokenIDBlackList(tokenIDs []string, isAdd bool)

AddOrRemoveTokenIDBlackList add or remove tokenID blacklist

func AllowCallByConstructor

func AllowCallByConstructor() bool

AllowCallByConstructor allow call by constructor

func AllowCallByContract

func AllowCallByContract() bool

AllowCallByContract allow call into router from contract

func CallContractWithGateway

func CallContractWithGateway(gateway, contract string, data hexutil.Bytes, blockNumber string) (result string, err error)

CallContractWithGateway call eth_call

func ChargeFeeOnDestChain

func ChargeFeeOnDestChain(tokenID, fromChainID, toChainID string) bool

ChargeFeeOnDestChain charge fee on dest chain

func CheckEIP1167Master

func CheckEIP1167Master() bool

CheckEIP1167Master whether check eip1167 master call by contract

func DontCheckInInitRouter

func DontCheckInInitRouter() bool

DontCheckInInitRouter do not check in init router

func DontCheckTokenBalance

func DontCheckTokenBalance(tokenID string) bool

DontCheckTokenBalance do not check token balance (a security enhance checking)

func DontCheckTokenReceived

func DontCheckTokenReceived(tokenID string) bool

DontCheckTokenReceived do not check token received (a security enhance checking)

func DontCheckTokenTotalSupply

func DontCheckTokenTotalSupply(tokenID string) bool

DontCheckTokenTotalSupply do not check token total supply (a security enhance checking)

func FeeReceiverOnDestChain

func FeeReceiverOnDestChain(toChainID string) string

FeeReceiverOnDestChain fee receiver on dest chain

func GetAttestationServer

func GetAttestationServer() string

GetAttestationServer get attestation server

func GetBaseFeePercent

func GetBaseFeePercent(chainID string) int64

GetBaseFeePercent get base fee percent

func GetCalcGasPriceMethod

func GetCalcGasPriceMethod(chainID string) string

GetCalcGasPriceMethod get calc gas price method eg. median (default), first, max, etc.

func GetCustom

func GetCustom(chainID, key string) string

GetCustom get custom

func GetDataDir

func GetDataDir() string

GetDataDir get data dir

func GetFixedGasPrice

func GetFixedGasPrice(chainID string) *big.Int

GetFixedGasPrice get fixed gas price of specified chain

func GetIdentifier

func GetIdentifier() string

GetIdentifier get identifier (to distiguish in mpc accept)

func GetMaxGasLimit

func GetMaxGasLimit(chainID string) uint64

GetMaxGasLimit get max gas limit of specified chain

func GetMaxGasPrice

func GetMaxGasPrice(chainID string) *big.Int

GetMaxGasPrice get max gas price of specified chain

func GetMaxTokenGasLimit

func GetMaxTokenGasLimit(tokenID, chainID string) uint64

GetMaxTokenGasLimit get max token gas limit of specified tokenID and chainID

func GetMinReserveBudget

func GetMinReserveBudget(chainID string) *big.Int

GetMinReserveBudget get min reserve budget

func GetMinReserveFee

func GetMinReserveFee(chainID string) *big.Int

GetMinReserveFee get min reserve fee

func GetNoncePassedConfirmInterval

func GetNoncePassedConfirmInterval(chainID string) int64

GetNoncePassedConfirmInterval get nonce passed confirm interval

func GetOnchainContract

func GetOnchainContract() string

GetOnchainContract get onchain config contract address

func GetRPCClientTimeout

func GetRPCClientTimeout(chainID string) int

GetRPCClientTimeout get rpc client timeout

func GetSpecialFlag

func GetSpecialFlag(key string) string

GetSpecialFlag get special flag

func GetSwapSubType

func GetSwapSubType() string

GetSwapSubType get router swap sub type

func GetSwapType

func GetSwapType() string

GetSwapType get router swap type

func HasCallByContractCodeHashWhitelist

func HasCallByContractCodeHashWhitelist(chainID string) bool

HasCallByContractCodeHashWhitelist has call by contract code hash whitelist

func HasMinReserveBudgetConfig

func HasMinReserveBudgetConfig() bool

HasMinReserveBudgetConfig has min reserve budget config

func HasRouterAdmin

func HasRouterAdmin() bool

HasRouterAdmin has admin

func IncreaseNonceWhenSendTx

func IncreaseNonceWhenSendTx(chainID string) bool

IncreaseNonceWhenSendTx increase nonce before send tx

func IsAccountInBlackList

func IsAccountInBlackList(account string) bool

IsAccountInBlackList is account in black list

func IsAnycallFallbackIgnored

func IsAnycallFallbackIgnored(appid string) bool

IsAnycallFallbackIgnored is anycall fallback ignored

func IsAutoSwapNonceEnabled

func IsAutoSwapNonceEnabled(chainID string) bool

IsAutoSwapNonceEnabled is auto swap nonce enabled

func IsChainIDInBlackList

func IsChainIDInBlackList(chainID string) bool

IsChainIDInBlackList is chain id in black list

func IsCheckTokenBalanceEnabled

func IsCheckTokenBalanceEnabled(chainID string) bool

IsCheckTokenBalanceEnabled is check token balance enabled

func IsCheckTxBlockHashEnabled

func IsCheckTxBlockHashEnabled(chainID string) bool

IsCheckTxBlockHashEnabled check tx block hash

func IsCheckTxBlockIndexEnabled

func IsCheckTxBlockIndexEnabled(chainID string) bool

IsCheckTxBlockIndexEnabled check tx block and index

func IsDebugMode

func IsDebugMode() bool

IsDebugMode is debug mode, add more debugging log infos

func IsDynamicFeeTxEnabled

func IsDynamicFeeTxEnabled(chainID string) bool

IsDynamicFeeTxEnabled is dynamic fee tx enabled (EIP-1559)

func IsFixedGasPrice

func IsFixedGasPrice(chainID string) bool

IsFixedGasPrice is fixed gas price of specified chain

func IsForceAnySwapInAuto

func IsForceAnySwapInAuto() bool

IsForceAnySwapInAuto is forcely call anySwapinAuto

func IsInBigValueWhitelist

func IsInBigValueWhitelist(tokenID, caller string) bool

IsInBigValueWhitelist is in call by contract whitelist

func IsInCallByContractCodeHashWhitelist

func IsInCallByContractCodeHashWhitelist(chainID, codehash string) bool

IsInCallByContractCodeHashWhitelist is in call by contract code hash whitelist

func IsInCallByContractWhitelist

func IsInCallByContractWhitelist(chainID, caller string) bool

IsInCallByContractWhitelist is in call by contract whitelist

func IsNFTSwapWithData

func IsNFTSwapWithData() bool

IsNFTSwapWithData is nft swap with data, add data in swapout log and swapin argument

func IsParallelSwapEnabled

func IsParallelSwapEnabled() bool

IsParallelSwapEnabled is parallel swap enabled

func IsRouterAdmin

func IsRouterAdmin(account string) bool

IsRouterAdmin is admin

func IsRouterAssistant

func IsRouterAssistant(account string) bool

IsRouterAssistant is router assistants

func IsSwapWithPermitEnabled

func IsSwapWithPermitEnabled() bool

IsSwapWithPermitEnabled is swap with permit enabled

func IsSwapoutForbidden

func IsSwapoutForbidden(chainID, tokenID string) bool

IsSwapoutForbidden forbid swapout judge

func IsTokenIDInBlackList

func IsTokenIDInBlackList(tokenID string) bool

IsTokenIDInBlackList is token id in black list

func IsTokenIDInBlackListOnChain

func IsTokenIDInBlackListOnChain(chainID, tokenID string) bool

IsTokenIDInBlackListOnChain is token id in black list on chain

func IsUseFastMPC

func IsUseFastMPC(chainID string) bool

IsUseFastMPC is use fast mpc

func IsUseFromChainIDInReceiptDisabled

func IsUseFromChainIDInReceiptDisabled(chainID string) bool

IsUseFromChainIDInReceiptDisabled if use fromChainID from receipt log

func ReloadRouterConfig

func ReloadRouterConfig()

ReloadRouterConfig reload config

func SetAllowCallByContract

func SetAllowCallByContract(allow bool)

SetAllowCallByContract set allow call by contract flag (used in testing)

func SetDataDir

func SetDataDir(dir string, isServer bool)

SetDataDir set data dir

func SetDebugMode

func SetDebugMode(flag bool)

SetDebugMode set debug mode

func SetExtraConfig

func SetExtraConfig(extra *ExtraConfig) error

SetExtraConfig set extra config (used by testing)

func VersionWithCommit

func VersionWithCommit(gitCommit, gitDate string) string

VersionWithCommit add git commit and data to version.

Types

type APIServerConfig

type APIServerConfig struct {
	Port             int
	AllowedOrigins   []string
	MaxRequestsLimit int
}

APIServerConfig api service config

type Blacklists

type Blacklists struct {
	ChainIDBlackList        []string            `toml:",omitempty" json:",omitempty"`
	TokenIDBlackList        []string            `toml:",omitempty" json:",omitempty"`
	TokenIDBlackListOnChain map[string][]string `toml:",omitempty" json:",omitempty"`
	AccountBlackList        []string            `toml:",omitempty" json:",omitempty"`
}

Blacklists black lists

type DynamicFeeTxConfig

type DynamicFeeTxConfig struct {
	PlusGasTipCapPercent uint64
	PlusGasFeeCapPercent uint64
	BlockCountFeeHistory int
	MaxGasTipCap         string
	MaxGasFeeCap         string
	// contains filtered or unexported fields
}

DynamicFeeTxConfig dynamic fee tx config

func GetDynamicFeeTxConfig

func GetDynamicFeeTxConfig(chainID string) *DynamicFeeTxConfig

GetDynamicFeeTxConfig get dynamic fee tx config (EIP-1559)

func (*DynamicFeeTxConfig) GetMaxGasFeeCap

func (c *DynamicFeeTxConfig) GetMaxGasFeeCap() *big.Int

GetMaxGasFeeCap get max fee gas cap

func (*DynamicFeeTxConfig) GetMaxGasTipCap

func (c *DynamicFeeTxConfig) GetMaxGasTipCap() *big.Int

GetMaxGasTipCap get max gas tip cap

type ExtraConfig

type ExtraConfig struct {
	IsDebugMode           bool `toml:",omitempty" json:",omitempty"`
	EnableSwapWithPermit  bool `toml:",omitempty" json:",omitempty"`
	ForceAnySwapInAuto    bool `toml:",omitempty" json:",omitempty"`
	IsNFTSwapWithData     bool `toml:",omitempty" json:",omitempty"`
	EnableParallelSwap    bool `toml:",omitempty" json:",omitempty"`
	UsePendingBalance     bool `toml:",omitempty" json:",omitempty"`
	DontPanicInInitRouter bool `toml:",omitempty" json:",omitempty"`
	DontCheckInInitRouter bool `toml:",omitempty" json:",omitempty"`

	MinReserveFee    map[string]uint64 `toml:",omitempty" json:",omitempty"`
	BaseFeePercent   map[string]int64  `toml:",omitempty" json:",omitempty"` // key is chain ID
	MinReserveBudget map[string]uint64 `toml:",omitempty" json:",omitempty"`

	AllowCallByConstructor          bool                `toml:",omitempty" json:",omitempty"`
	AllowCallByContract             bool                `toml:",omitempty" json:",omitempty"`
	CheckEIP1167Master              bool                `toml:",omitempty" json:",omitempty"`
	CallByContractWhitelist         map[string][]string `toml:",omitempty" json:",omitempty"` // chainID -> whitelist
	CallByContractCodeHashWhitelist map[string][]string `toml:",omitempty" json:",omitempty"` // chainID -> whitelist
	BigValueWhitelist               map[string][]string `toml:",omitempty" json:",omitempty"` // tokenID -> whitelist

	DynamicFeeTxEnabledChains            []string `toml:",omitempty" json:",omitempty"`
	EnableCheckTxBlockHashChains         []string `toml:",omitempty" json:",omitempty"`
	EnableCheckTxBlockIndexChains        []string `toml:",omitempty" json:",omitempty"`
	DisableUseFromChainIDInReceiptChains []string `toml:",omitempty" json:",omitempty"`
	UseFastMPCChains                     []string `toml:",omitempty" json:",omitempty"`
	IncreaseNonceWhenSendTxChains        []string `toml:",omitempty" json:",omitempty"`
	DontCheckReceivedTokenIDs            []string `toml:",omitempty" json:",omitempty"`
	DontCheckBalanceTokenIDs             []string `toml:",omitempty" json:",omitempty"`
	DontCheckTotalSupplyTokenIDs         []string `toml:",omitempty" json:",omitempty"`
	CheckTokenBalanceEnabledChains       []string `toml:",omitempty" json:",omitempty"`
	IgnoreAnycallFallbackAppIDs          []string `toml:",omitempty" json:",omitempty"`

	RPCClientTimeout map[string]int `toml:",omitempty" json:",omitempty"` // key is chainID
	// chainID,customKey => customValue
	Customs map[string]map[string]string `toml:",omitempty" json:",omitempty"`

	LocalChainConfig map[string]*LocalChainConfig `toml:",omitempty" json:",omitempty"` // key is chain ID

	SpecialFlags map[string]string `toml:",omitempty" json:",omitempty"`

	AttestationServer string `toml:",omitempty" json:",omitempty"`
}

ExtraConfig extra config

func GetExtraConfig

func GetExtraConfig() *ExtraConfig

GetExtraConfig get extra config

func (*ExtraConfig) CheckConfig

func (c *ExtraConfig) CheckConfig() (err error)

CheckConfig check extra config

type GatewayConfigs

type GatewayConfigs struct {
	Gateways         map[string][]string // key is chain ID
	GatewaysExt      map[string][]string `toml:",omitempty" json:",omitempty"` // key is chain ID
	EVMGatewaysExt   map[string][]string `toml:",omitempty" json:",omitempty"` // key is chain ID
	FinalizeGateways map[string][]string `toml:",omitempty" json:",omitempty"` // key is chain ID
	GRPCGateways     map[string][]string `toml:",omitempty" json:",omitempty"` // key is chain ID
}

GatewayConfigs gateway config

func LoadGatewayConfigs

func LoadGatewayConfigs() (*GatewayConfigs, error)

LoadGatewayConfigs load gateway configs

type LocalChainConfig

type LocalChainConfig struct {
	ForbidParallelLoading      bool `toml:",omitempty" json:",omitempty"`
	EstimatedGasMustBePositive bool `toml:",omitempty" json:",omitempty"`
	IsReswapSupported          bool `toml:",omitempty" json:",omitempty"`
	DontCheckAddressMixedCase  bool `toml:",omitempty" json:",omitempty"`

	SmallestGasPriceUnit  uint64   `toml:",omitempty" json:",omitempty"`
	ForbidSwapoutTokenIDs []string `toml:",omitempty" json:",omitempty"`
	BigValueDiscount      uint64   `toml:",omitempty" json:",omitempty"`

	// chainID -> tokenids
	ChargeFeeOnDestChain   map[string][]string `toml:",omitempty" json:",omitempty"`
	FeeReceiverOnDestChain string              `toml:",omitempty" json:",omitempty"`
	// contains filtered or unexported fields
}

LocalChainConfig local chain config

func GetLocalChainConfig

func GetLocalChainConfig(chainID string) *LocalChainConfig

GetLocalChainConfig get local chain config

func (*LocalChainConfig) CheckConfig

func (c *LocalChainConfig) CheckConfig() (err error)

CheckConfig check local chain config

type MPCConfig

type MPCConfig struct {
	SignTypeEC256K1 string `toml:",omitempty" json:",omitempty"`

	APIPrefix                 string
	RPCTimeout                uint64 `toml:",omitempty" json:",omitempty"`
	SignTimeout               uint64 `toml:",omitempty" json:",omitempty"`
	MaxSignGroupFailures      int    `toml:",omitempty" json:",omitempty"`
	MinIntervalToAddSignGroup int64  `toml:",omitempty" json:",omitempty"`

	VerifySignatureInAccept bool `toml:",omitempty" json:",omitempty"`

	GetAcceptListLoopInterval  uint64 `toml:",omitempty" json:",omitempty"`
	GetAcceptListRetryInterval uint64 `toml:",omitempty" json:",omitempty"`
	MaxAcceptSignTimeInterval  int64  `toml:",omitempty" json:",omitempty"`
	PendingInvalidAccept       bool   `toml:",omitempty" json:",omitempty"`

	GroupID       *string
	NeededOracles *uint32
	TotalOracles  *uint32
	Mode          uint32 // 0:managed 1:private (default 0)
	Initiators    []string
	DefaultNode   *MPCNodeConfig
	OtherNodes    []*MPCNodeConfig `toml:",omitempty" json:",omitempty"`

	SignWithPrivateKey bool              // use private key instead (use for testing)
	SignerPrivateKeys  map[string]string `json:"-"` // key is chain ID (use for testing)
}

MPCConfig mpc related config

func GetMPCConfig

func GetMPCConfig(isFastMPC bool) *MPCConfig

GetMPCConfig get mpc config

func (*MPCConfig) CheckConfig

func (c *MPCConfig) CheckConfig(isServer bool) (err error)

CheckConfig check mpc config

func (*MPCConfig) GetSignerPrivateKey

func (c *MPCConfig) GetSignerPrivateKey(chainID string) string

GetSignerPrivateKey get signer private key (use for testing)

func (*MPCConfig) SetSignerPrivateKey

func (c *MPCConfig) SetSignerPrivateKey(chainID, prikey string)

SetSignerPrivateKey set signer private key (use for testing)

type MPCNodeConfig

type MPCNodeConfig struct {
	RPCAddress   *string
	SignGroups   []string `toml:",omitempty" json:",omitempty"`
	KeystoreFile *string  `json:"-"`
	PasswordFile *string  `json:"-"`
}

MPCNodeConfig mpc node config

func (*MPCNodeConfig) CheckConfig

func (c *MPCNodeConfig) CheckConfig(isServer bool) (err error)

CheckConfig check mpc node config

type MongoDBConfig

type MongoDBConfig struct {
	DBURL    string   `toml:",omitempty" json:",omitempty"`
	DBURLs   []string `toml:",omitempty" json:",omitempty"`
	DBName   string
	UserName string `json:"-"`
	Password string `json:"-"`
}

MongoDBConfig mongodb config

func (*MongoDBConfig) CheckConfig

func (c *MongoDBConfig) CheckConfig() error

CheckConfig check mongodb config

type OnchainConfig

type OnchainConfig struct {
	Contract    string
	APIAddress  []string
	WSServers   []string
	ReloadCycle uint64 // seconds
	IgnoreCheck bool
}

OnchainConfig struct

func (*OnchainConfig) CheckConfig

func (c *OnchainConfig) CheckConfig() error

CheckConfig check onchain config storing chain and token configs

type RouterConfig

type RouterConfig struct {
	Server *RouterServerConfig `toml:",omitempty" json:",omitempty"`
	Oracle *RouterOracleConfig `toml:",omitempty" json:",omitempty"`

	Identifier  string
	SwapType    string
	SwapSubType string

	Onchain *OnchainConfig
	*GatewayConfigs

	MPC     *MPCConfig
	FastMPC *MPCConfig   `toml:",omitempty" json:",omitempty"`
	Extra   *ExtraConfig `toml:",omitempty" json:",omitempty"`

	*Blacklists
}

RouterConfig config

func GetRouterConfig

func GetRouterConfig() *RouterConfig

GetRouterConfig get router config

func LoadRouterConfig

func LoadRouterConfig(configFile string, isServer, check bool) *RouterConfig

LoadRouterConfig load router swap config

func NewRouterConfig

func NewRouterConfig() *RouterConfig

func (*RouterConfig) CheckBlacklistConfig

func (config *RouterConfig) CheckBlacklistConfig() (err error)

CheckBlacklistConfig check black list config

func (*RouterConfig) CheckConfig

func (config *RouterConfig) CheckConfig(isServer bool) (err error)

CheckConfig check router config

type RouterOracleConfig

type RouterOracleConfig struct {
	ServerAPIAddress        string
	NoCheckServerConnection bool `toml:",omitempty" json:",omitempty"`
	CheckGasTokenBalance    bool `toml:",omitempty" json:",omitempty"`
}

RouterOracleConfig only for oracle

func GetRouterOracleConfig

func GetRouterOracleConfig() *RouterOracleConfig

GetRouterOracleConfig get router oracle config

func (*RouterOracleConfig) CheckConfig

func (c *RouterOracleConfig) CheckConfig() (err error)

CheckConfig of router oracle

type RouterServerConfig

type RouterServerConfig struct {
	Admins     []string
	Assistants []string
	MongoDB    *MongoDBConfig
	APIServer  *APIServerConfig

	AutoSwapNonceEnabledChains []string `toml:",omitempty" json:",omitempty"`

	// extras
	EnableReplaceSwap          bool
	EnablePassBigValueSwap     bool
	ReplacePlusGasPricePercent uint64            `toml:",omitempty" json:",omitempty"`
	WaitTimeToReplace          int64             `toml:",omitempty" json:",omitempty"` // seconds
	MaxReplaceCount            int               `toml:",omitempty" json:",omitempty"`
	MaxReplaceDistance         uint64            `toml:",omitempty" json:",omitempty"`
	PlusGasPricePercentage     uint64            `toml:",omitempty" json:",omitempty"`
	MaxPlusGasPricePercentage  uint64            `toml:",omitempty" json:",omitempty"`
	MaxGasPriceFluctPercent    uint64            `toml:",omitempty" json:",omitempty"`
	FixedGasPrice              map[string]string `toml:",omitempty" json:",omitempty"` // key is chain ID
	MaxGasPrice                map[string]string `toml:",omitempty" json:",omitempty"` // key is chain ID
	NoncePassedConfirmInterval map[string]int64  `toml:",omitempty" json:",omitempty"` // key is chain ID
	CalcGasPriceMethod         map[string]string `toml:",omitempty" json:",omitempty"` // key is chain ID
	RetrySendTxLoopCount       map[string]int    `toml:",omitempty" json:",omitempty"` // key is chain ID
	SendTxLoopCount            map[string]int    `toml:",omitempty" json:",omitempty"` // key is chain ID
	SendTxLoopInterval         map[string]int    `toml:",omitempty" json:",omitempty"` // key is chain ID

	DefaultFee       map[string]string            `toml:",omitempty" json:",omitempty"` // key is chain ID
	DefaultGasLimit  map[string]uint64            `toml:",omitempty" json:",omitempty"` // key is chain ID
	MaxGasLimit      map[string]uint64            `toml:",omitempty" json:",omitempty"` // key is chain ID
	MaxTokenGasLimit map[string]map[string]uint64 `toml:",omitempty" json:",omitempty"` // key is tokenID,chainID

	DynamicFeeTx map[string]*DynamicFeeTxConfig `toml:",omitempty" json:",omitempty"` // key is chain ID
}

RouterServerConfig only for server

func GetRouterServerConfig

func GetRouterServerConfig() *RouterServerConfig

GetRouterServerConfig get router server config

func (*RouterServerConfig) CheckConfig

func (s *RouterServerConfig) CheckConfig() error

CheckConfig of router server

func (*RouterServerConfig) CheckDynamicFeeTxConfig

func (s *RouterServerConfig) CheckDynamicFeeTxConfig() error

CheckDynamicFeeTxConfig check dynamic fee tx config

func (*RouterServerConfig) CheckExtra

func (s *RouterServerConfig) CheckExtra() error

CheckExtra check extra server config

Jump to

Keyboard shortcuts

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