Simulator
Last updated
Last updated
Phalcon 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 inside a detailed transaction.
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.
Gas Limit: The gas limit.
Gas Price: The gas price.
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.
When launching inside the transaction page, the transaction data is automatically fed into the simulator (and can be changed) for a quick simulation. This is useful when you just want to slightly change the data of an existing transaction, e.g., changing the position inside the block.
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 vitalik.eth
0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
to0xdeadbeef40e59eb8582ff949afb313e09c5815c9.
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).
When the Receiver
is a contract, our system 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.