internal

package
v0.0.0-...-dc9146d Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertRawTransaction

func ConvertRawTransaction(rawTx types.RawTransaction) types.Transaction

func FormatEther

func FormatEther(wei *big.Int) string

func FormatGwei

func FormatGwei(wei *big.Int) string

func GeneratePrivateKey

func GeneratePrivateKey() (string, error)

func GeneratePrivateKeyEcdsa

func GeneratePrivateKeyEcdsa() (*ecdsa.PrivateKey, error)

func HexToBigInt

func HexToBigInt(hexStr string) *big.Int

func HexToUint64

func HexToUint64(hexStr string) uint64

func ParseEther

func ParseEther(etherStr string) (*big.Int, error)

func ParseGwei

func ParseGwei(gweiStr string) (*big.Int, error)

func PrivateKeyToAccount

func PrivateKeyToAccount(privateKeyHex string) (*types.Account, error)

Types

type RpcClient

type RpcClient struct {
	// contains filtered or unexported fields
}

func NewRpcClient

func NewRpcClient(params types.NewRpcClientParams) *RpcClient

func (*RpcClient) Call

func (c *RpcClient) Call(method string, params interface{}) (json.RawMessage, error)

func (*RpcClient) EstimateGas

func (c *RpcClient) EstimateGas(params types.CallParams) (*big.Int, error)

func (*RpcClient) GetBalance

func (c *RpcClient) GetBalance(address string) (*big.Int, error)

func (*RpcClient) GetBlock

func (c *RpcClient) GetBlock(params types.GetBlockParams) (*types.Block, error)

func (*RpcClient) GetBlockNumber

func (c *RpcClient) GetBlockNumber() (uint64, error)

func (*RpcClient) GetBlockTransactionCount

func (c *RpcClient) GetBlockTransactionCount(params types.GetBlockTransactionCountParams) (uint64, error)

func (*RpcClient) GetGasPrice

func (c *RpcClient) GetGasPrice() (*big.Int, error)

func (*RpcClient) GetMaxPriorityFeePerGas

func (c *RpcClient) GetMaxPriorityFeePerGas() (*big.Int, error)

func (*RpcClient) GetTransactionCount

func (c *RpcClient) GetTransactionCount(address string) (uint64, error)

func (*RpcClient) PrepareTxRequest

func (c *RpcClient) PrepareTxRequest(params types.TxInteractionParams) (*ethTypes.Transaction, error)

func (*RpcClient) ReadContract

func (c *RpcClient) ReadContract(params types.ReadContractParams) ([]byte, error)

func (*RpcClient) SendTx

func (c *RpcClient) SendTx(params types.TxInteractionParams) (string, error)

func (*RpcClient) SimulateContract

func (c *RpcClient) SimulateContract(params types.ContractInteractionParams) (*types.SimulateTxResult, error)

func (*RpcClient) SimulateTx

func (c *RpcClient) SimulateTx(params types.TxInteractionParams) (*types.SimulateTxResult, error)

func (*RpcClient) WriteContract

func (c *RpcClient) WriteContract(params types.ContractInteractionParams) (string, error)

Jump to

Keyboard shortcuts

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