Documentation ¶
Overview ¶
Package config enables loading and utilizing configuration options for different blockchain networks
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ProjectConfigDirectory string
Functions ¶
func LoadFromEnv ¶ added in v1.1.23
func LoadFromEnv() error
LoadFromEnv loads all config files and environment variables
func LoadRemoteEnv ¶ added in v1.2.3
func LoadRemoteEnv() error
LoadRemoteEnv loads environment variables when running on remote test runner
Types ¶
type Config ¶ added in v1.1.23
type Config struct {
RemoteRunnerConfig *RemoteRunnerConfig `envconfig:"REMOTE_RUNNER_CONFIG_FILE" required:"false" default:"../remote_runner_config.yaml"`
}
Config general framework config
var ProjectConfig Config
type ConfigurationType ¶
type ConfigurationType string
ConfigurationType refers to the different ways that configurations can be set
const (
LocalConfig ConfigurationType = "local"
)
type ETHNetwork ¶
type ETHNetwork struct { ContractsDeployed bool `envconfig:"contracts_deployed" yaml:"contracts_deployed"` Name string `envconfig:"name" yaml:"name"` ChainID int64 `envconfig:"chain_id" yaml:"chain_id"` URL string `envconfig:"url" yaml:"url"` URLs []string `envconfig:"urls" yaml:"urls"` Type string `envconfig:"type" yaml:"type"` PrivateKeys []string `envconfig:"private_keys" yaml:"private_keys"` ChainlinkTransactionLimit uint64 `envconfig:"chainlink_transaction_limit" yaml:"chainlink_transaction_limit"` Timeout time.Duration `envconfig:"transaction_timeout" yaml:"transaction_timeout"` MinimumConfirmations int `envconfig:"minimum_confirmations" yaml:"minimum_confirmations"` GasEstimationBuffer uint64 `envconfig:"gas_estimation_buffer" yaml:"gas_estimation_buffer"` BlockGasLimit uint64 `envconfig:"block_gas_limit" yaml:"block_gas_limit"` }
ETHNetwork data to configure fully ETH compatible network
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 PrivateKeyStore ¶
PrivateKeyStore enables access, through a variety of methods, to private keys for use in blockchain networks
type RemoteRunnerConfig ¶
type RemoteRunnerConfig struct { TestRegex string `envconfig:"TEST_REGEX" yaml:"test_regex"` TestDirectory string `envconfig:"TEST_DIRECTORY" yaml:"test_directory"` SlackAPIKey string `envconfig:"SLACK_API_KEY" yaml:"slack_api_key"` SlackChannel string `envconfig:"SLACK_CHANNEL" yaml:"slack_channel"` SlackUserID string `envconfig:"SLACK_USER_ID" yaml:"slack_user_id"` CustomEnvVars []string `envconfig:"CUSTOM_ENV_VARS" yaml:"custom_env_vars"` }
RemoteRunnerConfig reads the config file for remote test runs
func (*RemoteRunnerConfig) Decode ¶ added in v1.1.23
func (m *RemoteRunnerConfig) Decode(path string) error