Documentation ¶
Index ¶
- Constants
- Variables
- func AddressFromPrivateKey(pri string) (common.Address, error)
- func CreateEth1Key() (string, string, error)
- func ETH32() *big.Int
- func GWEIToWEI(value *big.Int) *big.Int
- func IsSameNetwork(network string, chainID int) bool
- func KeyTransactOpts(chainID *big.Int, privateKeyStr string) (*bind.TransactOpts, error)
- func NewSimulatedClient(walletBalance *big.Int, gasLimit uint64, privateKeyStr string) (*backends.SimulatedBackend, error)
- func SignHexStr(str, priv string) (string, error)
- func TxReceiptSuccess(receipt *types.Receipt) bool
- type EthClient
- type Tx
Constants ¶
View Source
const ( MAINNET = "mainnet" GOERLI = "goerli" PRATER = "prater" SEPOLIA = "sepolia" )
View Source
const (
// CONTRACT_REVENT The contract revent reported an incorrect keyword
CONTRACT_REVENT = "execution reverted"
)
View Source
const ZERO_HASH_STR = "0x0000000000000000000000000000000000000000000000000000000000000000"
Variables ¶
View Source
var ZERO_HASH = [32]byte{}
Functions ¶
func AddressFromPrivateKey ¶
AddressFromPrivateKey Push out the address from the private key
func CreateEth1Key ¶
CreateEth1Key Create ETH1 private key and pubkey
func IsSameNetwork ¶
func KeyTransactOpts ¶
func NewSimulatedClient ¶
func NewSimulatedClient(walletBalance *big.Int, gasLimit uint64, privateKeyStr string) (*backends.SimulatedBackend, error)
NewSimulatedClient ETH client of constructing simulation transactions
func SignHexStr ¶
SignHexStr ETH private key signature
func TxReceiptSuccess ¶ added in v1.0.0
TxReceiptSuccess Determine whether the transaction was successful
Types ¶
Click to show internal directories.
Click to hide internal directories.