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-frontiers
node inside thesrc/data
folder and rename it tobinary
. -
Copy the runtime WASM blob of the
New-frontiers
runtime to thesrc/data
folder and rename it toruntime.wasm
. To get the WASM blob, compileNew-frontiers
and look for./target/release/wbuild/runtime/runtime.compact.wasm
. -
Copy the additional
Hyperspace
types to thesrc/data
folder and rename it toschema.json
. -
Either run a full
Hyperspace
node locally(Recommended) or have an external endpoint handy. -
Run the script
-
If using a local node, simply run the script using (
BLOCK_NR
is 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_ENDPOINT
environment 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
data
folder. It will be calledfork.json
. -
You can now run a
New-frontiers
chain using this genesis file./binary --chain fork.json --alice