package
0.1.5
Repository: https://github.com/etherdev12/go-defi.git
Documentation: pkg.go.dev

# Functions

CalcGasCost calculate gas cost given gas limit (units) and gas price (wei).
ContextDone returns true if we can exit due to a cancelled context.
IsValidAddress validate hex address.
IsZeroAddress validate if it's a 0 address.
LogContextDone is like ContextDone but logs when the context is done.
NewAccount creates a new ethereum private key, and associated transactor.
NewAuthorizer returns an Authorizer object using a keyfile as the account source.
NewAuthorizerFromPK returns an authorizer from a private key.
NewKeyFile returns a new ethereum account as generated by `geth account new`.
PublicKeyBytesToAddress ...
SigRSV signatures R S V returned as arrays.
ToDecimal wei to decimals.
ToWei decimals to wei.

# Structs

Authorizer wraps an embedded bind.TransactOpts type with a mutex lock allowing for easier usage in concurrent programs.

# Interfaces

Blockchain is a generalized interface for interacting with the ethereum blockchain it satisfies all functions required by the ethclient, and simulated backend types.