Documentation ¶
Overview ¶
Package utils contains some common paths used in configuration and tests
Index ¶
- Variables
- func EtherToWei(eth *big.Float) *big.Int
- func GetEnv(key string) (string, error)
- func GetLogger(t *testing.T, envVarName string) zerolog.Logger
- func GetTestLogger(t *testing.T) zerolog.Logger
- func PrivateKeyToAddress(privateKey *ecdsa.PrivateKey) (common.Address, error)
- func SetupEnvVarsForRemoteRunner(envVars []string) error
- func WeiToEther(wei *big.Int) *big.Float
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ProjectRoot Root folder of this project ProjectRoot = filepath.Join(filepath.Dir(b), "/..") // SuiteRoot test suite root SuiteRoot = filepath.Join(ProjectRoot, "suite") // SoakRoot test suite soak root SoakRoot = filepath.Join(SuiteRoot, "soak") // PresetRoot root folder for environments preset PresetRoot = filepath.Join(ProjectRoot, "preset") // ContractsDir path to our contracts ContractsDir = filepath.Join(ProjectRoot, "contracts") // EthereumContractsDir path to our ethereum contracts EthereumContractsDir = filepath.Join(ContractsDir, "ethereum") // RemoteRunnerConfigLocation is the path to the remote runner config RemoteRunnerConfigLocation = filepath.Join(SuiteRoot, "remote_runner_config.yaml") )
Functions ¶
func EtherToWei ¶
EtherToWei converts an ETH float amount to wei
func GetEnv ¶ added in v1.10.9
GetEnv returns the value of the environment variable named by the key and sets the environment variable up to be used in the remote runner
func GetLogger ¶ added in v1.15.0
GetLogger instantiates a logger that takes into account the test context and the log level
func GetTestLogger ¶ added in v1.10.10
GetTestLogger instantiates a logger that takes into account the test context and the log level
func PrivateKeyToAddress ¶
func PrivateKeyToAddress(privateKey *ecdsa.PrivateKey) (common.Address, error)
PrivateKeyToAddress is a handy converter for an ecdsa private key to a usable eth address
func SetupEnvVarsForRemoteRunner ¶ added in v1.11.1
SetupEnvVarsForRemoteRunner sets up the environment variables in the list to propagate to the remote runner
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.