Created
February 28, 2023 23:10
-
-
Save joewagner/5d0266d94363f0e07a282c24703a51f7 to your computer and use it in GitHub Desktop.
List of commands to manually setup, deploy, upgrade a tableland registry. This enables testing the affects of existing policy contracts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# you will want to run the hardhat node in a separate terminal | |
# putting this here as a reminder | |
cd evm-tableland | |
npx hardhat node | |
# Add the following to the `networks` prop in hardhat.config.ts | |
# "local-tableland": { | |
# url: "http://127.0.0.1:8545", | |
# accounts: [ | |
# "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", | |
# "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d", | |
# "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a", | |
# "0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6", | |
# "0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a" | |
# ] | |
# }, | |
# this is the contract version that is currently deployed on all the public chains | |
git checkout 096f8d0 | |
# need to remove entry in network.ts, build, deploy, the put entry back in | |
npm run build | |
npx hardhat run --network local-tableland scripts/deploy.ts | |
# you will want to run the validator in a separate terminal | |
# you might need to replace `darwin-amd64` with the arch you're using | |
# and replace the `--dir` path with the fully specified location of local-tableland | |
cd ../js-validator | |
rm <root path to>/local-tableland/validator/database.db | |
rm <root path to>/local-tableland/validator/metrics.db | |
./bin/darwin-amd64 --dir <root path to>/local-tableland/validator | |
cd ../example-chess-nft/evm | |
npx hardhat run --network localhost scripts/deploy.js | |
npx hardhat run --network localhost scripts/mint-game.js | |
# collect the game tablename and game id and add them to the do move script | |
node scripts/do-move.js | |
cd ../../evm-tableland | |
git checkout getPolicy-add-tableID | |
# git checkout sander/new-controller | |
# git checkout sander/new-controller2 | |
# make sure you put deployed contract address back in network.ts, then build | |
npm run build | |
npx hardhat run --network local-tableland scripts/upgrade.ts | |
cd ../example-chess-nft/evm | |
# make any adjustments to the do move script, e.g. player, move | |
node scripts/do-move.js | |
# if the move worked then you can have some confidence the upgrade worked ~03> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment