web3_provider

package
v0.0.6-developer-preview Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wallet

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

func DefaultWalletProvider

func DefaultWalletProvider(pk string, nodeURL string, chainId uint64) (*Wallet, error)

func (Wallet) Address

func (w Wallet) Address() common.Address

func (Wallet) Balance

func (w Wallet) Balance(ctx context.Context) (*big.Int, error)

func (Wallet) BroadcastTransaction

func (w Wallet) BroadcastTransaction(ctx context.Context, tx *types.Transaction) error

func (Wallet) Call

func (w Wallet) Call(ctx context.Context, contractAddress gethCommon.Address, callData []byte) ([]byte, error)

func (Wallet) ChainId

func (w Wallet) ChainId() int64

func (Wallet) GetContractDetailsForPermit

func (w Wallet) GetContractDetailsForPermit(ctx context.Context, token gethCommon.Address, spender gethCommon.Address, amount *big.Int, deadline int64) (*common.ContractPermitData, error)

func (Wallet) GetContractDetailsForPermitDaiLike

func (w Wallet) GetContractDetailsForPermitDaiLike(ctx context.Context, token gethCommon.Address, spender gethCommon.Address, deadline int64) (*common.ContractPermitDataDaiLike, error)

func (Wallet) GetGasPrice

func (w Wallet) GetGasPrice(ctx context.Context) (*big.Int, error)

func (Wallet) GetGasTipCap

func (w Wallet) GetGasTipCap(ctx context.Context) (*big.Int, error)

func (Wallet) IsEIP1559Applicable

func (w Wallet) IsEIP1559Applicable() bool

func (Wallet) Nonce

func (w Wallet) Nonce(ctx context.Context) (uint64, error)

func (Wallet) Sign

func (w Wallet) Sign(tx *types.Transaction) (*types.Transaction, error)

func (Wallet) TokenPermit

func (w Wallet) TokenPermit(cd common.ContractPermitData) (string, error)

TokenPermit Will return an erc2612 string struct if possible

func (Wallet) TokenPermitDaiLike

func (w Wallet) TokenPermitDaiLike(cd common.ContractPermitDataDaiLike) (string, error)

TokenPermit Will return an erc2612 string struct if possible

func (Wallet) TransactionReceipt

func (w Wallet) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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