generator

package
v0.0.0-...-291da58 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertLegacyTxToCallMsg

func ConvertLegacyTxToCallMsg(tx *types.Transaction, from common.Address) ethereum.CallMsg

func GenerateContractCallingTx

func GenerateContractCallingTx(privateKey *ecdsa.PrivateKey, contractAddress string, nonce uint64, chainID, gasPrice *big.Int, gasLimit uint64, contractABI, method string, args ...interface{}) (*types.Transaction, error)

func GenerateContractCreationTx

func GenerateContractCreationTx(privateKey *ecdsa.PrivateKey, nonce uint64, chainID, gasPrice *big.Int, gasLimit uint64, contractBin, contractABI string, args ...interface{}) (*types.Transaction, error)

func GenerateSimpleTransferTx

func GenerateSimpleTransferTx(privateKey *ecdsa.PrivateKey, recipient string, nonce uint64, chainID, gasPrice, value *big.Int, eip1559 bool) (*types.Transaction, error)

Types

type Generator

type Generator struct {
	FaucetAccount *account.Account
	Senders       []*account.Account
	Recipients    []string
	RpcUrl        string
	ChainID       *big.Int
	GasPrice      *big.Int
	ShouldPersist bool
	Store         *store.Store
	EIP1559       bool
}

func NewGenerator

func NewGenerator(rpcUrl, faucetPrivateKey string, senderCount, txCount int, shouldPersist bool, txStoreDir string) (*Generator, error)

func (*Generator) GenerateERC20

func (g *Generator) GenerateERC20() (map[int]types.Transactions, error)

func (*Generator) GenerateSimple

func (g *Generator) GenerateSimple() (map[int]types.Transactions, error)

func (*Generator) GenerateUniswap

func (g *Generator) GenerateUniswap() (map[int]types.Transactions, error)

Jump to

Keyboard shortcuts

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