TenderlyCheatcodes contract.

- evm_increaseTime
- evm_setNextBlockTimestamp
- tenderly_setNextBlockTimestamp
- evm_increaseBlocks
- evm_mine
- tenderly_setBalance
- tenderly_addBalance
- tenderly_setErc20Balance
- tenderly_addErc20Balance
- tenderly_setMaxErc20Balance
evm_increaseTime
Advances the blockchain time by a specified amount and creates an empty block with the new timestamp.
Subsequent calls to eth_call and eth_sendRawTransaction will get different block.timestamp values based on the blockNumber they target:
- For
pendingblock: Returnscurrent_time + time_increaseThis represents the expected timestamp of the next block to be mined. - For
latestblock: Returnstime_of_evm_increaseTimestamp_call + time_increase. This is the timestamp of the empty block created whenevm_increaseTimestampwas called.
QUANTITY- hex-encodedtime_increaseof seconds to jump forward by
DATA- 32-byte block hash of the newly generated block
example.json
example.json
evm_setNextBlockTimestamp
Offsets current time to the specified timestamp, and creates an empty block with given timestamp.
Subsequent calls to eth_call and eth_sendRawTransaction will return different block.timestamp values based on the blockNumber they target:
- For
pendingblock: Returnsspecified_timestamp + time_since_evmSetNextBlockTimestamp_call. This represents the set timestamp plus any time elapsed since the method was called. - For
latestblock: Returnsspecified_timestamp. This is the timestamp of the empty block created whenevm_setNextBlockTimestampwas called.
QUANTITY- hex-encodedspecified_timestampthat represents epoch timestamp (in seconds)
QUANTITY- integer (epoch timestamp) that is set for the next block
example.json
example.json
tenderly_setNextBlockTimestamp
Offsets current time to given timestamp without creating an empty block.
Subsequent calls to eth_call and eth_sendRawTransaction will return different block.timestamp values based on the blockNumber they target:
- For
pendingblock: Returnsspecified_timestamp + time_since_tenderly_setNextBlockTimestamp. This represents the set timestamp plus any time elapsed since the method was called. - For
latestblock: Returns the timestamp of the latest created block.
QUANTITY- hex-encodedspecified_timestampthat represents epoch timestamp (in seconds)
QUANTITY- integer (epoch timestamp) that is set for the next block
example.json
example.json
evm_increaseBlocks
Skips a number of blocks and generates a new block with the new block number.
Parameters
QUANTITY- hex-encoded number of blocks to skip
DATA- 32-byte block hash of the newly generated block
example.json
example.json
eth_sendTransaction
Submits an unsigned transaction.
Parameters
- Transaction - The transaction object
from:DATA, 20 Bytes - The address the transaction is sent from.to:DATA, 20 Bytes - (optional, omitted when creating new contract) The address the transaction is directed to.gas:QUANTITY- (optional) Integer of the gas provided for the transaction execution. It will return unused gas.gasPrice:QUANTITY- (optional) Integer of thegasPriceused for each paid gas.value:QUANTITY- (optional) Integer of the value sent with this transaction.data:DATA- (optional) The compiled code of a contract OR the hash of the invoked method signature and encoded parameters.
example.json
STRING 32 byte hex value
eth_createAccessList
Returns the access tuples that would be touched by the transaction.
Parameters
SendTransactionObject- transaction object (same as the one provided to eth_sendTransaction)BlockNumber- block number parameter
AccessList- an array of access tuples touched by the transaction
example.json
example.json
evm_getLatest
Fetches the latest transaction ID on a network Virtual Environment.
Parameters
Returns
DATA- UUID of the latest Virtual Environment transaction
example.json
example.json
tenderly_setBalance
Modifies the balance of an account or accounts.
Parameters
ADDRESS/ADDRESSES- a string or an array of account addressesAMOUNT- hex-encoded number of an amount in wei
DATA- 32-byte block hash of the newly created transaction
example.json
example.json
example.json
tenderly_addBalance
Adds the balance to the provided account or accounts.
Parameters
ADDRESS/ADDRESSES- a string or an array of account addressesAMOUNT- hex-encoded number of an amount in wei
DATA- 32-byte block hash of the newly created transaction
example.json
example.json
example.json
tenderly_setErc20Balance
Sets the token balance for the wallet on the provided erc20 contract.
tenderly_setErc20Balance writes the new balance directly to the token contract’s storage and does not emit an ERC-20 Transfer event. If your downstream tooling (indexers, subgraphs, accounting) relies on Transfer events to track balances, use tenderly_addErc20Balance instead, it emits a synthetic Transfer log for each funded account.TOKEN_ADDRESS- address of the ERC20 contractWALLET- address of the wallet that will get topped upVALUE- 32-byte hash representing the wei value of the tokens
DATA - 32-byte hash of the newly created transaction (storage override is committed via transaction)
Example request
example.json
example.json
tenderly_addErc20Balance
Adds the specified amount of tokens to one or more wallets on the provided ERC-20 contract. Unlike tenderly_setErc20Balance, this method emits a synthetic Transfer event for every funded account, so indexers, subgraphs, and any tooling that reconciles balances from logs stay in sync with the resulting state.
The emitted log has the standard ERC-20 Transfer(address,address,uint256) topic, uses the transaction sender as the from address and the funded wallet as the to address, and carries the added amount in the data field.
Parameters
TOKEN_ADDRESS- address of the ERC-20 contractWALLETS- array of wallet addresses that will receive the tokensVALUE- 32-byte hash representing the wei amount of tokens to add to each wallet
DATA - 32-byte hash of the newly created transaction (storage override is committed via transaction)
Example request
example.json
example.json
tenderly_setMaxErc20Balance
Tops up the wallet address with maximum possible token balance (primarily intended for tokens that don’t have a simple balance mapping) on the provided erc20 contract.
Like
tenderly_setErc20Balance, this method writes directly to storage and does not emit an ERC-20 Transfer event. Use tenderly_addErc20Balance when you need indexers or log-based tooling to pick up the balance change.YIELD_TOKEN_ADDRESS- address of the ERC20 contractWALLET- address of the wallet that would get topped up
DATA - 32-byte hash of the newly created transaction (storage override is committed via transaction)
Example request
example.json
example.json
tenderly_setStorageAt
Sets the storage of the provided address at the provided slot.
Parameters
ADDRESS- the address where the storage will be overriddenSLOT- 32-byte hash representing the storage slot keyVALUE- 32-byte hash representing the value at the keyslot
DATA- 32-byte hash of the newly created transaction (storage override is committed via transaction)
example.json
example.json
evm_snapshot
Returns a snapshot ID that allows you to revert a Virtual Environment to a previous point (same as block hash from evm_getLatest).
Parameters
Returns
DATA- hash of the latest block produced by the Virtual Environment (Snapshot ID)
example.json
example.json
evm_revert
Reverts the state of the Virtual Environment to a previous snapshot.
Parameters
DATA- ID of the snapshot
BOOLEAN- operation success flag
example.json
example.json
tenderly_setCode
Sets the code at a particular location.
Example
Parameters
ADDRESS- Contract addressDATA- Bytecode
NUMBER- transaction hash
example.json
Network Mirror Mode sync control
The following methods control Network Mirror Mode, they start, stop, step, rewind, and inspect the continuous sync between a Virtual Environment and its parent network.While Network Mirror Mode sync is active, other Admin RPC cheatcodes (for example
tenderly_setBalance, tenderly_setStorageAt, tenderly_sendBlock) are disabled. Pause sync with tenderly_stopSync first if you need them to take effect immediately.tenderly_startSync
Starts continuous sync between the Virtual Environment and its parent network. New parent-network blocks are absorbed as they’re produced, and any transactions in the Virtual Environment’s mempool are prepended (in FIFO order) to the next synced block.
Parameters
None.
Returns
BOOLEAN-trueif sync was started
example.json
example.json
tenderly_stopSync
Stops any in-progress sync. The Virtual Environment stays at its current block; you can resume with tenderly_startSync or advance manually with tenderly_syncNext. Use this before calling other Admin RPC cheatcodes when Mirror Mode is active.
Parameters
None.
Returns
BOOLEAN-trueif sync was stopped (or already stopped)
example.json
example.json
tenderly_syncNext
Syncs the next single parent-network block onto the Virtual Environment. Any pending Virtual Environment transactions are prepended to that block in FIFO order. Useful for stepping through sync one block at a time.
Parameters
None.
Returns
DATA- 32-byte block hash of the newly synced block
example.json
example.json
tenderly_revertSync
Rewinds the Virtual Environment by N synced blocks, undoing their effect on Virtual Environment state. The default is 10 blocks. Use this to step the Mirror-Mode Virtual Environment back to an earlier point in the parent network’s history.
Parameters
QUANTITY(optional) - hex-encoded number of blocks to rewind. Defaults to0xa(10).
DATA- 32-byte block hash of the block the Virtual Environment is now positioned at
example.json
example.json
tenderly_getSyncStatus
Returns the current sync state of the Virtual Environment, including whether sync is active, how far behind the parent network it is, and the latest synced block.
Parameters
None.
Returns
OBJECT- sync status with the following fields:active-BOOLEAN,trueif sync is currently runninglag-QUANTITY, number of blocks the Virtual Environment is behind the parent networklatestSyncedBlock-QUANTITY, block number of the latest block synced onto the Virtual EnvironmentparentLatestBlock-QUANTITY, block number of the latest block on the parent network
example.json
example.json