Fork RPC Supported JSON RPC Calls in a Fork
Phalcon Fork RPC is compatible with most of the commonly used EVM methods. More EVM methods are added. Please feel free to contact us if you found any methods are missing.
The RPC endpoint of a Fork is shown in the Fork Panel .
See the appendix for a complete list of the supported RPC methods.
Testing/debugging Methods
eth_sendTransactions
Simulate a bundle of transactions as it would execute on the same block and returns results for each transaction.
Copy curl --location '${FORK_RPC}' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_sendTransactions",
"params": [
[
{
"from": "0x9ECfdB84858f170a4F029B096A9e170534b495D4",
"to": "0x8ECfdB84858f170a4F029B096A9e170534b495D4",
"gasPrice": "0xf",
"gas": "0x186a0",
"value": "0x174876e800",
"data": "0x"
},
{
"from": "0x9ECfdB84858f170a4F029B096A9e170534b495D4",
"to": "0x8ECfdB84858f170a4F029B096A9e170534b495D4",
"gasPrice": "0xf",
"gas": "0x186a0",
"value": "0x174876e800",
"data": "0x"
}
]
]
}'
eth_sendRawTransactions
Simulate a bundle of raw transactions as it would execute on the same block and returns results for each transaction
Copy curl --location '${FORK_RPC}' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_sendRawTransactions",
"params": [
["0xf908100383989680830f42408080b907bf608060405234801561001057600080fd5b5061005a6040518060400160405280601b81526020017f4f776e657220636f6e7472616374206465706c6f7965642062793a00000000008152503361011a60201b6101e91760201c565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73560405160405180910390a36102e6565b6101b882826040516024016101309291906102b6565b6040516020818303038152906040527f319af333000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506101bc60201b60201c565b5050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561021f578082015181840152602081019050610204565b60008484015250505050565b6000601f19601f8301169050919050565b6000610247826101e5565b61025181856101f0565b9350610261818560208601610201565b61026a8161022b565b840191505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006102a082610275565b9050919050565b6102b081610295565b82525050565b600060408201905081810360008301526102d0818561023c565b90506102df60208301846102a7565b9392505050565b6104ca806102f56000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063893d20e81461003b578063a6f9dae114610059575b600080fd5b610043610075565b60405161005091906102ef565b60405180910390f35b610073600480360381019061006e919061033b565b61009e565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461012c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610123906103c5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73560405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61028182826040516024016101ff929190610464565b6040516020818303038152906040527f319af333000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610285565b5050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006102d9826102ae565b9050919050565b6102e9816102ce565b82525050565b600060208201905061030460008301846102e0565b92915050565b600080fd5b610318816102ce565b811461032357600080fd5b50565b6000813590506103358161030f565b92915050565b6000602082840312156103515761035061030a565b5b600061035f84828501610326565b91505092915050565b600082825260208201905092915050565b7f43616c6c6572206973206e6f74206f776e657200000000000000000000000000600082015250565b60006103af601383610368565b91506103ba82610379565b602082019050919050565b600060208201905081810360008301526103de816103a2565b9050919050565b600081519050919050565b60005b8381101561040e5780820151818401526020810190506103f3565b60008484015250505050565b6000601f19601f8301169050919050565b6000610436826103e5565b6104408185610368565b93506104508185602086016103f0565b6104598161041a565b840191505092915050565b6000604082019050818103600083015261047e818561042b565b905061048d60208301846102e0565b939250505056fea26469706673582212204f80464a4bf62b77328cc811907a1f47baa6d1096ba1025ef80889af3c77a59064736f6c6343000811003326a0e71cfd5710a94ce906c971445779a09392f4b0f66097a182fa87fd9565045a6ca06f77d3668be8965fe0592e8fcb69035e9ed8ba78abc929132f08b03db86eec23"]
]
}'
evm_increaseTime
Jump forward in time. It takes one parameter: the amount of time to increase in seconds. This parameter can be in an HEX string or an integer.
The return value is the total time adjustment, in seconds.
Copy curl --location '${FORK_RPC}' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "evm_increaseTime",
"params": [
"0x642ab8e0"
],
"id": 1
}'
evm_snapshot
Snapshot the state of the blockchain at the current block. Takes no parameters.
It returns the integer id of the snapshot created.
Copy curl --location '${FORK_RPC}' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "evm_snapshot",
"params": [],
"id": 1
}'
evm_revert
Revert the state of the blockchain to a previous snapshot. It takes a single parameter, which is the snapshot id to revert to. If no snapshot id is passed, it will revert to the latest snapshot.
Copy curl --location '${FORK_RPC}' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "evm_revert",
"params": [
"snapshotId"
],
"id": 1
}'
Appendix: Supported Methods
net
eth
getLogs *Only return logs that were emitted on the Fork