Documentation
¶
Index ¶
- func InitRootWallet(ctx context.Context, privkey string, client *txbuilder.Client, ...) (*txbuilder.Wallet, error)
- type ClientPool
- type ClientSelectionMode
- type WalletPool
- func (pool *WalletPool) AddWellKnownWallet(config *WellKnownWalletConfig)
- func (pool *WalletPool) CheckChildWalletBalance(childWallet *txbuilder.Wallet) (*types.Transaction, error)
- func (pool *WalletPool) GetAllWallets() []*txbuilder.Wallet
- func (pool *WalletPool) GetClient(mode ClientSelectionMode, input int, group string) *txbuilder.Client
- func (pool *WalletPool) GetClientPool() *ClientPool
- func (pool *WalletPool) GetContext() context.Context
- func (pool *WalletPool) GetRootWallet() *txbuilder.Wallet
- func (pool *WalletPool) GetTxPool() *txbuilder.TxPool
- func (pool *WalletPool) GetWallet(mode WalletSelectionMode, input int) *txbuilder.Wallet
- func (pool *WalletPool) GetWalletCount() uint64
- func (pool *WalletPool) GetWalletName(address common.Address) string
- func (pool *WalletPool) GetWellKnownWallet(name string) *txbuilder.Wallet
- func (pool *WalletPool) LoadConfig(configYaml string) error
- func (pool *WalletPool) MarshalConfig() (string, error)
- func (pool *WalletPool) PrepareWallets(runFundings bool) error
- func (pool *WalletPool) SendTxRange(txList []*types.Transaction, client *txbuilder.Client, ...) error
- func (pool *WalletPool) SetRefillAmount(amount *uint256.Int)
- func (pool *WalletPool) SetRefillBalance(balance *uint256.Int)
- func (pool *WalletPool) SetRefillInterval(interval uint64)
- func (pool *WalletPool) SetWalletCount(count uint64)
- func (pool *WalletPool) SetWalletSeed(seed string)
- type WalletPoolConfig
- type WalletSelectionMode
- type WellKnownWalletConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientPool ¶
type ClientPool struct {
// contains filtered or unexported fields
}
func NewClientPool ¶
func NewClientPool(ctx context.Context, rpcHosts []string, logger logrus.FieldLogger) *ClientPool
func (*ClientPool) GetAllClients ¶
func (pool *ClientPool) GetAllClients() []*txbuilder.Client
func (*ClientPool) GetAllGoodClients ¶
func (pool *ClientPool) GetAllGoodClients() []*txbuilder.Client
func (*ClientPool) GetClient ¶
func (pool *ClientPool) GetClient(mode ClientSelectionMode, input int, group string) *txbuilder.Client
func (*ClientPool) PrepareClients ¶
func (pool *ClientPool) PrepareClients() error
type ClientSelectionMode ¶
type ClientSelectionMode uint8
var ( SelectClientByIndex ClientSelectionMode = 0 SelectClientRandom ClientSelectionMode = 1 SelectClientRoundRobin ClientSelectionMode = 2 )
type WalletPool ¶
type WalletPool struct {
// contains filtered or unexported fields
}
func NewWalletPool ¶
func NewWalletPool(ctx context.Context, logger logrus.FieldLogger, rootWallet *txbuilder.Wallet, clientPool *ClientPool, txpool *txbuilder.TxPool) *WalletPool
func (*WalletPool) AddWellKnownWallet ¶ added in v1.1.1
func (pool *WalletPool) AddWellKnownWallet(config *WellKnownWalletConfig)
func (*WalletPool) CheckChildWalletBalance ¶
func (pool *WalletPool) CheckChildWalletBalance(childWallet *txbuilder.Wallet) (*types.Transaction, error)
func (*WalletPool) GetAllWallets ¶
func (pool *WalletPool) GetAllWallets() []*txbuilder.Wallet
func (*WalletPool) GetClient ¶
func (pool *WalletPool) GetClient(mode ClientSelectionMode, input int, group string) *txbuilder.Client
func (*WalletPool) GetClientPool ¶
func (pool *WalletPool) GetClientPool() *ClientPool
func (*WalletPool) GetContext ¶
func (pool *WalletPool) GetContext() context.Context
func (*WalletPool) GetRootWallet ¶
func (pool *WalletPool) GetRootWallet() *txbuilder.Wallet
func (*WalletPool) GetTxPool ¶
func (pool *WalletPool) GetTxPool() *txbuilder.TxPool
func (*WalletPool) GetWallet ¶
func (pool *WalletPool) GetWallet(mode WalletSelectionMode, input int) *txbuilder.Wallet
func (*WalletPool) GetWalletCount ¶
func (pool *WalletPool) GetWalletCount() uint64
func (*WalletPool) GetWalletName ¶ added in v1.1.1
func (pool *WalletPool) GetWalletName(address common.Address) string
func (*WalletPool) GetWellKnownWallet ¶ added in v1.1.1
func (pool *WalletPool) GetWellKnownWallet(name string) *txbuilder.Wallet
func (*WalletPool) LoadConfig ¶
func (pool *WalletPool) LoadConfig(configYaml string) error
func (*WalletPool) MarshalConfig ¶
func (pool *WalletPool) MarshalConfig() (string, error)
func (*WalletPool) PrepareWallets ¶
func (pool *WalletPool) PrepareWallets(runFundings bool) error
func (*WalletPool) SendTxRange ¶ added in v1.1.1
func (pool *WalletPool) SendTxRange(txList []*types.Transaction, client *txbuilder.Client, wallet *txbuilder.Wallet, confirmCb func(tx *types.Transaction, receipt *types.Receipt, err error)) error
func (*WalletPool) SetRefillAmount ¶
func (pool *WalletPool) SetRefillAmount(amount *uint256.Int)
func (*WalletPool) SetRefillBalance ¶
func (pool *WalletPool) SetRefillBalance(balance *uint256.Int)
func (*WalletPool) SetRefillInterval ¶
func (pool *WalletPool) SetRefillInterval(interval uint64)
func (*WalletPool) SetWalletCount ¶
func (pool *WalletPool) SetWalletCount(count uint64)
func (*WalletPool) SetWalletSeed ¶
func (pool *WalletPool) SetWalletSeed(seed string)
type WalletPoolConfig ¶
type WalletPoolConfig struct {
WalletCount uint64 `yaml:"wallet_count,omitempty"`
RefillAmount *uint256.Int `yaml:"refill_amount"`
RefillBalance *uint256.Int `yaml:"refill_balance"`
RefillInterval uint64 `yaml:"refill_interval"`
WalletSeed string `yaml:"seed"`
}
func GetDefaultWalletConfig ¶ added in v1.1.1
func GetDefaultWalletConfig(scenarioName string) *WalletPoolConfig
type WalletSelectionMode ¶
type WalletSelectionMode uint8
var ( SelectWalletByIndex WalletSelectionMode = 0 SelectWalletRandom WalletSelectionMode = 1 SelectWalletRoundRobin WalletSelectionMode = 2 )
Click to show internal directories.
Click to hide internal directories.