🏎️Runtime

The Runtime module determines the type of transaction being sent to the blockchain network. Depending on the selected stress test mode, it can be a simple value transfer, an ERC20 token transfer, or an ERC721 token mint.

Base Runtime

The base runtime interface defines required runtime methods for any additional runtime expansion. In order to function, the runtime needs some basic information, such as:

  • The gas estimation for the base transaction (the stress-test transaction)

  • The current network gas price

  • The value of the stress test transaction (in wei)

  • A callback for constructing the actual transactions

Initialized Runtime

When starting a stress test that requires a predeployed contract, such as an ERC20 or ERC721 token, the contract must be present before pandoras-box can run.

pandoras-box does not assume or require that the contracts used in the stress test are already deployed on the blockchain network. Instead, it provides an Initialize method in the runtime implementation, which contains contract deployment logic, to deploy these contracts as needed.

Token Runtime

Token contracts like ERC20 have custom logic for querying the account's token balance and initializing token transfers. As a result, the Token runtime must implement ERC20-specific methods.

NFT Runtime

The NFT runtime has no special requirements, apart from needing to be predeployed before the stress test pipeline can continue.

Last updated