celo

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 4 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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