eth1

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAINNET = "mainnet"
	GOERLI  = "goerli"
	PRATER  = "prater"
	SEPOLIA = "sepolia"
)
View Source
const ZERO_HASH_STR = "0x0000000000000000000000000000000000000000000000000000000000000000"

Variables

View Source
var ZERO_HASH = [32]byte{}

Functions

func AddressFromPrivateKey added in v0.0.6

func AddressFromPrivateKey(pri string) (common.Address, error)

AddressFromPrivateKey Push out the address from the private key

func ETH added in v0.1.0

func ETH(eth int64) *big.Int

func ETH32

func ETH32() decimal.Decimal

func GWEIToWEI

func GWEIToWEI(value *big.Int) *big.Int

func GweiToWei added in v0.1.0

func GweiToWei(gwei phase0.Gwei) *big.Int

func IsSameNetwork added in v0.0.8

func IsSameNetwork(network string, chainID int) bool

func KeyTransactOpts

func KeyTransactOpts(chainID *big.Int) (*bind.TransactOpts, error)

func NewSimulatedClient added in v0.0.5

func NewSimulatedClient(walletBalance *big.Int, gasLimit uint64) (*backends.SimulatedBackend, error)

NewSimulatedClient ETH client of constructing simulation transactions

Types

type EthClient

type EthClient struct {
	Client *ethclient.Client
}
var ElClient *EthClient

func NewEthClient

func NewEthClient(ctx context.Context, rpcHost string) (*EthClient, error)

func (*EthClient) BalanceAt

func (e *EthClient) BalanceAt(ctx context.Context, address string, blockNumber *big.Int) (*big.Int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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