- first-time setup:
make setup
- build:
make build
- run:
./build/neptune-<version>-<architecture/os>
Get a list of all forks.
{
"forks": {
"<fork_id>": {
"id": "<fork_id>",
"name": "<fork_name>",
"config": {
...
}
}
}
}
Create a new fork
{
"name": "the-fork-name",
"config": {} // see ForkConfig object
}
{
"fork_id": "<string>"
}
Neptune allows creating blank forks and forks of mainnet - base forks, and forks of forks - child forks. These are configured using the following variants of the ForkConfig object:
{
"eth_rpc_url": "string, optional", // optionally specify a mainnet RPC provider
"fork_block_number": number, optional, // defaults to the current block number
"prefund_anvil_accounts": bool // generate a list of pre-funded accounts using anvil's default seed phrase
}
{
"parent_fork_id": "string" // the ID of the parent fork (must be a valid uuid string)
"fork_block_number": number?, // defaults to the current block number
"prefund_anvil_accounts": bool // generate a list of pre-funded accounts using anvil's default seed phrase
}
Send an eth or anvil rpc request
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [...]
}
{
"id": 1,
"result": "0xasedfasdf"
}
Delete a fork - fails if a fork is referenced by another fork.
Returns a serialized version of the fork if it exists.
clears all forks from memory