utils

package
v1.7.9 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 9 Imported by: 1

Documentation

Overview

Package utils contains some common paths used in configuration and tests

Index

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

func EtherToWei(eth *big.Float) *big.Int

EtherToWei converts an ETH float amount to wei

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 WeiToEther

func WeiToEther(wei *big.Int) *big.Float

WeiToEther converts a wei amount to eth float

Types

This section is empty.

Jump to

Keyboard shortcuts

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