celo

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Units = map[string]float64{
	"wei":  1,
	"gwei": 1e9,
	"celo": 1e18,
}

Units defines denominations of the CELO token.

Functions

This section is empty.

Types

type Config

type Config struct {
	ethlike.Config

	// MaxGasPrice specifies the maximum gas price the client is
	// willing to pay for the transaction to be mined. The offered transaction
	// gas price can not be higher than the max gas price value. If the maximum
	// allowed gas price is reached, no further resubmission attempts are
	// performed.
	MaxGasPrice *Wei

	// BalanceAlertThreshold defines a minimum value of the operator's
	// account balance below which an alert will be triggered.
	BalanceAlertThreshold *Wei
}

Config is a struct that contains the configuration needed to connect to an Celo node. This information will give access to a Celo network.

func (*Config) ContractAddress

func (c *Config) ContractAddress(contractName string) (common.Address, error)

ContractAddress finds a given contract's address configuration and returns it as Celo address.

type Wei

type Wei struct {
	ethlike.Token
}

Wei is a custom type to handle CELO value parsing in configuration files using BurntSushi/toml package. It supports wei, Gwei and CELO units. The CELO value is kept as `wei` and `wei` is the default unit. The value can be provided in the text file as e.g.: `1 wei`, `200 Gwei` or `0.5 CELO`.

func WrapWei

func WrapWei(value *big.Int) *Wei

WrapWei wraps the given integer value in order to represent it as Wei value.

func (*Wei) UnmarshalText

func (w *Wei) UnmarshalText(text []byte) error

UnmarshalText is a function used to parse a value of CELO.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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