Documentation
¶
Index ¶
Constants ¶
View Source
const EnvPrefix = "SYG"
Variables ¶
View Source
var ( // Flags for running the app StagingFlagName = "staging" ConfigFlagName = "config" KeystoreFlagName = "keystore" BlockstoreFlagName = "blockstore" FreshStartFlagName = "fresh" LatestBlockFlagName = "latest" )
Functions ¶
Types ¶
type Config ¶
type Config struct {
RelayerConfig relayer.RelayerConfig
ChainConfigs []map[string]interface{}
}
func GetConfigFromENV ¶
GetConfigFromENV reads config from Env variables, validates it and parses it into config suitable for application
Properties of RelayerConfig are expected to be defined as separate Env variables where Env variable name reflects properties position in structure. Each Env variable needs to be prefixed with SYG.
For example, if you want to set Config.RelayerConfig.MpcConfig.Port this would translate to Env variable named SYG_RELAYER_MPCCONFIG_PORT.
type RawConfig ¶
type RawConfig struct {
RelayerConfig relayer.RawRelayerConfig `mapstructure:"relayer" json:"relayer"`
ChainConfigs []map[string]interface{} `mapstructure:"domains" json:"domains"`
}
type TokenConfig ¶ added in v0.2.0
type TokenStore ¶ added in v0.2.0
type TokenStore struct {
Tokens map[uint64]map[string]TokenConfig
}
func (*TokenStore) ConfigByAddress ¶ added in v0.2.0
func (s *TokenStore) ConfigByAddress(chainID uint64, address common.Address) (string, TokenConfig, error)
func (*TokenStore) ConfigBySymbol ¶ added in v0.2.0
func (s *TokenStore) ConfigBySymbol(chainID uint64, symbol string) (TokenConfig, error)
Click to show internal directories.
Click to hide internal directories.