Simulate a Transaction
How to simulate a transaction
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
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.
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
- Receiver: The target of this transaction (the
- 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
- 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.
We can simulate a transaction to send 200 Ether to an address, e.g., from to
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).
Receiveris 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
USDCcontract, and the method
transferis invoked to send USDC from the sender to the
tovalue 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 modified 1mo ago