Learn the tricks of simulating transactions to ensure error-free executions in controlled environments.

Phalcon transaction simulator allows a user to simulate a transaction at an arbitrary position of an arbitrary block. The simulated transaction can be viewed in Phalcon Explorer and shared with others.

This feature can be used in multiple scenarios.

  • Users: Understand the transaction before signing it

  • Developers: Debug a transaction

  • Security researchers: Simulate and debug an attack transaction

Launch the Simulator

The simulator can be launched into two different places. One is on the top right of the Phalcon Explorer homepage, and the other is inside a detailed transaction. The difference is that, when launching inside the transaction page, the transaction data will be automatically fed inside the simulator (and can be changed) for a quick simulation.

Simulate a New Transaction

The GUI of the simulator contains the following parts.

  • Network: Select the network. Ethereum, BSC, Arbitrum, Optimism, Avalanche, and Polygon are currently supported.

  • Sender: The sender of the transaction (the from address)

  • Receiver: The target of this transaction (the to address)

  • Calldata: the detailed call data of this transaction. To facilitate the construction of the calldata, the call data can be specified using the contract ABI.

  • Value: the value of this transaction.

  • Use Pending Block: Whether the simulation occurs on the latest block or an old block specified in the Block Number. The default value is False.

  • Block Number: The block number where the transaction simulates.

  • Position in Block: The position inside the block.

  • Gas Limit: The gas limit.

  • Gas Price: The gas price.

In the following, we will use some examples to illustrate this feature.

Sending Ether

We can simulate a transaction to send 200 Ether to an address, e.g., from to vitalik.eth 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045to0xdeadbeef40e59eb8582ff949afb313e09c5815c9.

The simulated transaction can be viewed in Phalcon Explorer. The link to this simulated transaction can be shared with friends (the link is valid 48 hours after sharing).

Sending USDC

When the Receiver is a contract, Phalcon will get the ABI of the contract if it's verified and show the list of methods. Users can select a method to invoke in the transaction. For instance, the contract is USDC contract, and the method transfer is invoked to send USDC from the sender to the to value of the invocation.

If the contract is not verified, a Local ABI can be uploaded. Of course, a raw calldata can also be used.

Last updated