config

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 6 Imported by: 0

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"`
}

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 NetworksConfig added in v0.0.25

type NetworksConfig struct {
	SelectedNetworks   []string                          `mapstructure:"selected_networks" yaml:"selected_networks"`
	NetworkSettings    map[string]map[string]interface{} `mapstructure:"networks" yaml:"networks"`
	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

type PrivateKeyStore interface {
	Fetch() ([]string, error)
}

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

Jump to

Keyboard shortcuts

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