Documentation
¶
Overview ¶
Package config enables loading and utilizing configuration options for different blockchain networks
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigurationType ¶
type ConfigurationType string
ConfigurationType refers to the different ways that configurations can be set
const ( LocalConfig ConfigurationType = "local" SecretConfig ConfigurationType = "secret" )
Configs
type ETHNetwork ¶ added in v0.0.25
type ETHNetwork struct {
External bool `mapstructure:"external" yaml:"external"`
Name string `mapstructure:"name" yaml:"name"`
ID string `mapstructure:"id" yaml:"id"`
ChainID int64 `mapstructure:"chain_id" yaml:"chain_id"`
URL string `mapstructure:"url" yaml:"url"`
URLs []string `mapstructure:"urls" yaml:"urls"`
Type string `mapstructure:"type" yaml:"type"`
PrivateKeys []string `mapstructure:"private_keys" yaml:"private_keys"`
ChainlinkTransactionLimit uint64 `mapstructure:"chainlink_transaction_limit" yaml:"chainlink_transaction_limit"`
Timeout time.Duration `mapstructure:"transaction_timeout" yaml:"transaction_timeout"`
MinimumConfirmations int `mapstructure:"minimum_confirmations" yaml:"minimum_confirmations"`
GasEstimationBuffer uint64 `mapstructure:"gas_estimation_buffer" yaml:"gas_estimation_buffer"`
BlockGasLimit uint64 `mapstructure:"block_gas_limit" yaml:"block_gas_limit"`
}
ETHNetwork data to configure fully ETH compatible network
type FrameworkConfig ¶ added in v0.0.25
type FrameworkConfig struct {
KeepEnvironments string `mapstructure:"keep_environments" yaml:"keep_environments"`
Logging *LoggingConfig `mapstructure:"logging" yaml:"logging"`
EnvironmentFile string `mapstructure:"environment_file" yaml:"environment_file"`
ChainlinkImage string `mapstructure:"chainlink_image" yaml:"chainlink_image"`
ChainlinkVersion string `mapstructure:"chainlink_version" yaml:"chainlink_version"`
GethImage string `mapstructure:"geth_image" yaml:"geth_image"`
GethVersion string `mapstructure:"geth_version" yaml:"geth_version"`
}
FrameworkConfig common framework config
func LoadFrameworkConfig ¶ added in v0.0.25
func LoadFrameworkConfig(cfgPath string) (*FrameworkConfig, error)
LoadFrameworkConfig loads framework config
type LocalStore ¶
type LocalStore struct {
RawKeys []string
}
LocalStore retrieves keys defined in a networks.yaml file, or from environment variables
func (*LocalStore) Fetch ¶
func (l *LocalStore) Fetch() ([]string, error)
Fetch private keys from local environment variables or a config file
type LoggingConfig ¶
type LoggingConfig struct {
Level int8 `mapstructure:"level" yaml:"logging"`
}
LoggingConfig for logging
type NetworkSettings ¶ added in v0.0.27
NetworkSettings is a map that holds configuration for each individual network
func (NetworkSettings) Decode ¶ added in v0.0.27
func (n NetworkSettings) Decode(value string) error
Decode is used by envconfig to initialise the custom Charts type with populated values This function will take a JSON object representing charts, and unmarshal it into the existing object to "merge" the two
type NetworksConfig ¶ added in v0.0.25
type NetworksConfig struct {
SelectedNetworks []string `mapstructure:"selected_networks" yaml:"selected_networks" envconfig:"selected_networks"`
NetworkSettings NetworkSettings `mapstructure:"networks" yaml:"networks" envconfig:"network_settings"`
DefaultKeyStore string
ConfigFileLocation string
}
NetworksConfig is network configurations
func LoadNetworksConfig ¶ added in v0.0.25
func LoadNetworksConfig(cfgPath string) (*NetworksConfig, error)
LoadNetworksConfig loads networks config
type PrivateKeyStore ¶
PrivateKeyStore enables access, through a variety of methods, to private keys for use in blockchain networks
type TerraNetwork ¶ added in v0.0.25
type TerraNetwork struct {
Name string `mapstructure:"name" yaml:"name"`
ChainName string `mapstructure:"chain_name" yaml:"chain_name"`
Mnemonics []string `mapstructure:"mnemonic" yaml:"mnemonic"`
Currency string `mapstructure:"currency" yaml:"currency"`
Type string `mapstructure:"type" yaml:"type"`
ChainlinkTransactionLimit uint64 `mapstructure:"chainlink_transaction_limit" yaml:"chainlink_transaction_limit"`
Timeout time.Duration `mapstructure:"transaction_timeout" yaml:"transaction_timeout"`
MinimumConfirmations int `mapstructure:"minimum_confirmations" yaml:"minimum_confirmations"`
}
TerraNetwork data to configure Terra network