wallet

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: GPL-3.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(clientPool *execution.Pool, logger logrus.FieldLogger) *Manager

func (*Manager) GetWalletByAddress

func (manager *Manager) GetWalletByAddress(address common.Address) *Wallet

func (*Manager) GetWalletByPrivkey

func (manager *Manager) GetWalletByPrivkey(privkey *ecdsa.PrivateKey) (*Wallet, error)

func (*Manager) GetWalletPoolByPrivkey

func (manager *Manager) GetWalletPoolByPrivkey(privkey *ecdsa.PrivateKey, walletCount uint64, childSeed string) (*WalletPool, error)

type Wallet

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

func (*Wallet) AwaitReady

func (wallet *Wallet) AwaitReady(ctx context.Context) error

func (*Wallet) AwaitTransaction

func (wallet *Wallet) AwaitTransaction(ctx context.Context, tx *types.Transaction) (*types.Receipt, error)

func (*Wallet) BuildTransaction

func (wallet *Wallet) BuildTransaction(ctx context.Context, buildFn func(ctx context.Context, nonce uint64, signer bind.SignerFn) (*types.Transaction, error)) (*types.Transaction, error)

func (*Wallet) GetAddress

func (wallet *Wallet) GetAddress() common.Address

func (*Wallet) GetBalance

func (wallet *Wallet) GetBalance() *big.Int

func (*Wallet) GetNonce

func (wallet *Wallet) GetNonce() uint64

func (*Wallet) GetPendingBalance

func (wallet *Wallet) GetPendingBalance() *big.Int

func (*Wallet) GetPrivateKey

func (wallet *Wallet) GetPrivateKey() *ecdsa.PrivateKey

func (*Wallet) GetReadableBalance

func (wallet *Wallet) GetReadableBalance(unitDigits, maxPreCommaDigitsBeforeTrim, digits int, addPositiveSign, trimAmount bool) string

func (*Wallet) ResyncState

func (wallet *Wallet) ResyncState()

type WalletPool

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

func (*WalletPool) EnsureFunding

func (pool *WalletPool) EnsureFunding(ctx context.Context, minBalance, refillAmount, gasFeeCap, gasTipCap *big.Int, pendingLimit uint64) error

func (*WalletPool) GetChildWallet

func (pool *WalletPool) GetChildWallet(index uint64) *Wallet

func (*WalletPool) GetChildWallets

func (pool *WalletPool) GetChildWallets() []*Wallet

func (*WalletPool) GetNextChildWallet

func (pool *WalletPool) GetNextChildWallet() *Wallet

func (*WalletPool) GetRootWallet

func (pool *WalletPool) GetRootWallet() *Wallet

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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