Comment on page
The detailed information of a Fork
Fork Panelis a place showing detailed information about a Fork. It shows the transactions simulated and the contracts deployed in the Fork. It also provides the functionality to manage snapshots and useful tools, such as Faucet and Scan.
The information card shows the basic information of a Fork, especially the Fork RPC URL, chain ID, and the recently used timestamp. The RPC URL is used to interact with this Fork.
is to add the Fork RPC into MetaMask. Then the user can interact with the Fork using MetaMask to simulate transactions.
The status card shows this Fork's current and next block and base fee. It also supports creating a snapshot, overwriting the block header, and editing the base fee.
The current block is the currently minted block in this Fork. Unlike the mainnet that the miner packs a block, which may contain a couple of transactions, a block in a Fork is minted after receiving a transaction (or a bundle of multiple transactions) through the Fork RPC. The next block shows the next block number, following the current one. Also, this number is affected by the height and position used to create a Fork.
This feature temporarily overwrites the header information in the next block. This is particularly useful when a user overwrites the block number, miner (and other) information. For instance, some contract has a time lock mechanism to execute a DAO proposal. If a user wants to simulate the execution of the proposal, he/she needs to change the block number in the next block to fulfill the requirement.
button to change the information in a block. For instance, in the screenshot, we overwrite the block number to
17136556. The block number in the next block will be changed to this one.
We then simulate a transaction using this Fork to transfer Ether from one address to another. From the detailed information shown in the Phalcon Explorer, we can find the overwritten Block number is
17136556and the original block number is
Note that the overwritten block number is only effective in one block. This means the overwritten block header is only once applied to the next block.
If you want to make the change of block number persistent, the
evm_minecan be used to mint a new empty block. Also, the
evm_increaseTimecan be used to change the current timestamp.
This list shows the simulated transactions inside this Fork.
- Txn Hash: The hash of the simulated transaction.
- Method: The invoked method signature if it is a smart contract invocation.
- Block: The block number.
- Sent (UTC): The time of sending the simulated transaction.
- From: The
fromaddress of the transaction.
- To: The
toaddress of the transactions.
- Value: The transferred Ether in the transaction.
- Txn Fee: The transaction fee.
A user can simulate a transaction (send a transaction to a Fork) in two ways, through a GUI or the Fork RPC. Click
on the top right of the transaction list, a GUi will be shown.
Fill in the transaction details in the pop-up panel and proceed to send.
The contracts show a list of created smart contracts deployed in this Fork. If the contract is verified, then the contract name, compiler, and the version will be shown.
A snapshot records the Fork's blockchain status, including simulated transactions, contracts being deployed, etc. Our system allows users to create multiple snapshots in the Fork and quickly switch between different snapshots.
The snapshot feature is particularly useful in the following two scenarios:
- When a user wants to run a testing script multiple times, he/she can revert to the original snapshot and rerun the script
- When a user wants to save some states and return to them later, he/she can create a snapshot and then revert to this snapshot later.
A user can create a snapshot from the Fork menu. There is a default snapshot for a Fork (with empty transactions from the forked blockchain states).
button to create a snapshot from the current block number. This snapshot includes all the simulated transactions and deployed contracts.
The snapshot can also be created in the
Snapshotsmenu, on the top right of the UI.
Snapshotsof the left side menu to see the list of snapshots.
The chart shows the relationship between snapshots. For instance, a snapshot could be a child of another one, if it's created based on the parent snapshot plus a couple of simulated transactions.
When a user wants to switch to a snapshot, click the
to revert to the snapshot. Note that before reverting to a snapshot, remember to create a new snapshot to save the states if the user wants to revert to the current state later. Otherwise, all the simulated transactions will be lost!
Phalcon Fork has a built-in faucet, allowing users to easily claim test native tokens (e.g., Ether) without struggling to obtain tokens from testnets. Click on
Toolsof the left side menu to use the faucet.
Phalcon Fork has a built-in blockchain Scan that helps developers explore and query blocks, addresses, transactions, and contracts on the Fork chain.