Documentation ¶
Index ¶
- Constants
- type BlockManager
- type CaseEthWallet
- type EthWallet
- type RawTxReq
- type Step
- type TransferCase
- type TransferManager
- func (m *TransferManager) GenerateRandomTransferSteps(stepCount int, wallets []*CaseEthWallet) *TransferCase
- func (m *TransferManager) GenerateSameTargetTransferSteps(stepCount int, wallets []*CaseEthWallet, target *CaseEthWallet) *TransferCase
- func (m *TransferManager) GenerateTransferSteps(wallets []*CaseEthWallet) *TransferCase
- type WalletManager
- func (m *WalletManager) AssertWallet(w *EthWallet, count uint64)
- func (m *WalletManager) BatchGenerateRandomWallets(count int, initialEthCount uint64) ([]*EthWallet, error)
- func (m *WalletManager) CreateEthWalletByAddress(initialEthCount uint64, privateKey, address string) (*EthWallet, error)
- func (m *WalletManager) GenerateRandomWallets(count int, initialEthCount uint64) ([]*EthWallet, error)
- func (m *WalletManager) QueryEth(wallet *EthWallet) (uint64, error)
- func (m *WalletManager) TransferEth(from, to *EthWallet, amount, nonce uint64) error
Constants ¶
View Source
const (
GenesisPrivateKey = "32e3b56c9f2763d2332e6e4188e4755815ac96441e899de121969845e343c2ff"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockManager ¶
type BlockManager struct {
// contains filtered or unexported fields
}
func GetDefaultBlockManager ¶
func GetDefaultBlockManager() *BlockManager
func (*BlockManager) GetBlockByIndex ¶
func (bm *BlockManager) GetBlockByIndex(id uint64) (*types.Block, error)
func (*BlockManager) GetBlockTxnCountByIndex ¶
func (bm *BlockManager) GetBlockTxnCountByIndex(index int) (bool, int, error)
func (*BlockManager) GetCurrentBlock ¶
func (bm *BlockManager) GetCurrentBlock() (*types.Block, error)
func (*BlockManager) StopBlockChain ¶
func (bm *BlockManager) StopBlockChain()
type CaseEthWallet ¶
func GenerateCaseWallets ¶
func GenerateCaseWallets(initialEthCount uint64, wallets []*EthWallet) []*CaseEthWallet
func (*CaseEthWallet) Copy ¶
func (c *CaseEthWallet) Copy() *CaseEthWallet
type TransferCase ¶
type TransferCase struct { Steps []*Step `json:"steps"` // address to wallet Original map[string]*CaseEthWallet `json:"original"` Expect map[string]*CaseEthWallet `json:"expect"` }
func (*TransferCase) AssertExpect ¶
func (tc *TransferCase) AssertExpect(m *WalletManager, wallets []*EthWallet) (map[string]*CaseEthWallet, bool, error)
func (*TransferCase) Run ¶
func (tc *TransferCase) Run(m *WalletManager) error
type TransferManager ¶
type TransferManager struct{}
func NewTransferManager ¶
func NewTransferManager() *TransferManager
func (*TransferManager) GenerateRandomTransferSteps ¶
func (m *TransferManager) GenerateRandomTransferSteps(stepCount int, wallets []*CaseEthWallet) *TransferCase
func (*TransferManager) GenerateSameTargetTransferSteps ¶
func (m *TransferManager) GenerateSameTargetTransferSteps(stepCount int, wallets []*CaseEthWallet, target *CaseEthWallet) *TransferCase
func (*TransferManager) GenerateTransferSteps ¶
func (m *TransferManager) GenerateTransferSteps(wallets []*CaseEthWallet) *TransferCase
type WalletManager ¶
type WalletManager struct {
// contains filtered or unexported fields
}
func NewWalletManager ¶
func NewWalletManager(cfg *evm.GethConfig, hostAddress string) *WalletManager
func (*WalletManager) AssertWallet ¶
func (m *WalletManager) AssertWallet(w *EthWallet, count uint64)
func (*WalletManager) BatchGenerateRandomWallets ¶
func (m *WalletManager) BatchGenerateRandomWallets(count int, initialEthCount uint64) ([]*EthWallet, error)
func (*WalletManager) CreateEthWalletByAddress ¶
func (m *WalletManager) CreateEthWalletByAddress(initialEthCount uint64, privateKey, address string) (*EthWallet, error)
func (*WalletManager) GenerateRandomWallets ¶
func (m *WalletManager) GenerateRandomWallets(count int, initialEthCount uint64) ([]*EthWallet, error)
func (*WalletManager) QueryEth ¶
func (m *WalletManager) QueryEth(wallet *EthWallet) (uint64, error)
func (*WalletManager) TransferEth ¶
func (m *WalletManager) TransferEth(from, to *EthWallet, amount, nonce uint64) error
Click to show internal directories.
Click to hide internal directories.