See Virtual TestNets in action! ⚡ Replace slow public testnets in dapp development. Join our Office Hours


Block Header Overrides

Aug 9, 2023 (10 months ago)

Block Header Overrides

Tenderly now allows you to set custom values for special Solidity variables. These overrides enable wallets and dapps to modify certain properties of the block header when executing a transaction simulation.

Block header overrides are available on the following RPC endpoints:

Custom endpoints that are part of the tenderly_ namespace accept a Block Overrides object. This object, which is optional, allows you to override the following header fields in a block:

  • number: Set a custom block number.
  • difficulty: Modify the block's difficulty level.
  • time: Adjust the block timestamp.
  • gasLimit: Set a custom gas limit for the block.
  • coinbase: Specify the miner address for the block.
  • random: Provide custom extra data for the block, influencing the RANDOM opcode.
  • baseFee: Override the base fee for the block.

Use Tenderly Node Extensions to build custom RPC endpoints that fit your dapp without changing its existing logic. Optimize dapp performance, improve user experience, and get greater control and flexibility both on-chain and during development.

Try Tenderly Node Extensions