DataHighway-DHX / node

DataHighway Node. A blockchain being built with Substrate to become a parachain on the Polkadot network. Planned features include a decentralized LPWAN roaming hub for LoRaWAN IoT devices and network operator roaming agreements, participative mining, an inter-chain data market, and DAO governance. http://www.datahighway.com
http://www.datahighway.com
GNU General Public License v3.0
52 stars 11 forks source link

feat: import hardspoon account balances from bricked standalone chain into genesis block of new standalone chain #251

Closed ltfschoen closed 2 years ago

ltfschoen commented 2 years ago

changes in this PR work with the following steps:

git fetch origin luke/hardspoon-accounts-substrate-3:luke/hardspoon-accounts-substrate-3
git checkout luke/hardspoon-accounts-substrate-3
./scripts/init.sh
cargo build --release

rm -rf /tmp/polkadot-chains

./target/release/datahighway \
  --base-path /tmp/polkadot-chains/alice \
  --name "Data Highway Development Chain" \
  --dev \
  --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
  -lruntime=debug

go to https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1:9944#/settings/developer and copy/paste https://github.com/DataHighway-DHX/node/blob/master/custom_types.json and replace the custom types input field, then click "Save"

update the metadata too if necessary

then go to view in-built accounts at https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1:9944#/accounts

then check if imported accounts from old standalone chain have been imported by going to https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1:9944#/addresses

and add the treasury address 4LTFqiD6H6g8a7ur9WH4RxhWx2givWfK7o5EDed3ai1nYTvk and it should have 30 million DEV tokens

and check that the accounts in the genesis.json file were imported, for example the account here https://github.com/DataHighway-DHX/node/pull/250/files#diff-03ba6e560e063bae9ad8da38df998bafd6ac9c236bc8fed1ac6d610f01d1778dR3, 4MeuAmq5nbcub7q4UfjcQcd9kgDtYxnvbGmtEssowhGQUM3g when imported should have ~18.4 DEV