Documentation ¶
Index ¶
Constants ¶
View Source
const ( // env variables ETH_TX_LIST = "ETH_TX_LIST" ETH_ADDR_LOG = "ETH_ADDR_LOG" )
Variables ¶
This section is empty.
Functions ¶
func NewTxSpammer ¶
Types ¶
type TxGenerator ¶
type TxGenerator struct {
// contains filtered or unexported fields
}
TxGenerator generates and signs txs
func NewTxGenerator ¶
func NewTxGenerator(params []TxParams) *TxGenerator
NewTxGenerator creates a new tx generator
func (TxGenerator) GenerateTx ¶
func (gen TxGenerator) GenerateTx(params TxParams) ([]byte, error)
GenerateTx generates tx from the provided params
type TxParams ¶
type TxParams struct { // Name of this tx in the .toml file Name string // HTTP Client for this tx type Client *rpc.Client // DynamicFeeTx properties - Start ChainID *big.Int Nonce uint64 GasTipCap *big.Int // a.k.a. maxPriorityFeePerGas GasFeeCap *big.Int // a.k.a. maxFeePerGas Gas uint64 To *common.Address // nil means contract creation Value *big.Int Data []byte // Sender key, if left the senderKeyPath is empty we generate a new key SenderKey *ecdsa.PrivateKey StartingNonce uint64 ContractAddrWritePath string // Sending params Sender common.Address // How often we send a tx of this type Frequency time.Duration // Total number of txs of this type to send TotalNumber uint64 // Delay before beginning to send Delay time.Duration }
TxParams holds the parameters for a given transaction
func NewTxParams ¶
NewTxParams NewConfig returns a new tx spammer config
Click to show internal directories.
Click to hide internal directories.