Module generators

Source
Expand description

Generators for different data structures like block headers, block bodies and ranges of those.

Structs§

BlockParams
Used to pass arguments for random block generation function in tests
BlockRangeParams
Used to pass arguments for random block generation function in tests

Traits§

Rng
An automatically-implemented extension trait on RngCore providing high-level generic methods for sampling values and other convenience methods.

Functions§

generate_keys
Generates a set of [Keypair]s based on the desired count.
random_account_change
Generate a random account change.
random_block
Generate a random block filled with signed transactions (generated using random_signed_tx). If no transaction count is provided, the number of transactions will be random, otherwise the provided count will be used.
random_block_range
Generate a range of random blocks.
random_block_with_parent
Generate a random [BlockWithParent].
random_changeset_range
Generate a range of changesets for given blocks and accounts.
random_contract_account_range
Generate random Contract Accounts
random_eoa_account
Generate random Externally Owned Account (EOA account without contract).
random_eoa_accounts
Generate random Externally Owned Accounts
random_header
Generate a random [SealedHeader].
random_header_range
Generates a range of random [SealedHeader]s.
random_log
Generate random log
random_receipt
Generate random receipt for transaction
random_signed_tx
Generates a random legacy [Transaction] that is signed.
random_storage_entry
Generate a random storage change.
random_tx
Generates a random legacy [Transaction].
rng
Returns a random number generator that can be seeded using the SEED environment variable.
sign_tx_with_key_pair
Signs the [Transaction] with the given key pair.
sign_tx_with_random_key_pair
Signs the [Transaction] with a random key pair.

Type Aliases§

ChangeSet
Collection of account and storage entry changes