This script allows bootstrapping a New-frontiers chain with the snapshot state of Hyperspace chain. Basically it's a state storage migration from Hyperspace.
State storage:
- EVM account balance
- EVM contract storage
-
Clone this repository and install dependencies
git clone https://github.com/mvs-org/metaverse-vm-scraper.git cd metaverse-vm-scraper npm i -
Copy the executable/binary of the
New-frontiersnode inside thesrc/datafolder and rename it tobinary. -
Copy the runtime WASM blob of the
New-frontiersruntime to thesrc/datafolder and rename it toruntime.wasm. To get the WASM blob, compileNew-frontiersand look for./target/release/wbuild/runtime/runtime.compact.wasm. -
Copy the additional
Hyperspacetypes to thesrc/datafolder and rename it toschema.json. -
Either run a full
Hyperspacenode locally(Recommended) or have an external endpoint handy. -
Run the script
-
If using a local node, simply run the script using (
BLOCK_NRis for block height, default is "latest")BLOCK_NR=500000 node src/fork.js
-
If you are using an external/non-default endpoint, you need to provide it to the script via the
HTTP_RPC_ENDPOINTenvironment variableBLOCK_NR=500000 RPC_URL=http://example.com WS_URL=ws://example.com node src/fork.js
-
-
You should have the genesis file for the forked chain inside the
datafolder. It will be calledfork.json. -
You can now run a
New-frontierschain using this genesis file./binary --chain fork.json --alice