Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Changed cluster script (temporary)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Oct 23, 2023
1 parent 5db1573 commit 7ca870b
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions scripts/cluster
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,11 @@ function initPolybftConsensus() {
function createGenesis() {
./polygon-edge genesis $genesis_params \
--block-gas-limit 10000000 \
--premine 0x85da99c8a7c2c95964c8efd687e95e632fc533d6:1000000000000000000000 \
--premine 0x0000000000000000000000000000000000000000 \
--epoch-size 10 \
--reward-wallet 0xDEADBEEF:1000000 \
--native-token-config "Polygon:MATIC:18:true:$address1" \
--burn-contract 0:0x0000000000000000000000000000000000000000 \
--native-token-config "Polygon:MATIC:18:false:$address1" \
--burn-contract 0:0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed \
--proxy-contracts-admin 0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed
}

Expand Down Expand Up @@ -117,6 +116,8 @@ function initRootchain() {
--test

customSupernetManagerAddr=$(cat genesis.json | jq -r '.params.engine.polybft.bridge.customSupernetManagerAddr')
rootERC20Predicate=$(cat genesis.json | jq -r '.params.engine.polybft.bridge.erc20PredicateAddress')
nativeRootToken=$(cat genesis.json | jq -r '.params.engine.polybft.bridge.nativeERC20Address')
supernetID=$(cat genesis.json | jq -r '.params.engine.polybft.supernetID')

./polygon-edge rootchain fund \
Expand Down Expand Up @@ -148,13 +149,28 @@ function initRootchain() {
--stake-token ${stakeToken} \
--jsonrpc http://127.0.0.1:8545

if [ $counter -eq 1 ]; then
cast send --rpc-url http://127.0.0.1:8545 \
--private-key aa75e9a7d427efc732f8e4f1a5b7646adcc61fd5bae40f80d13c8419c9f43d6d \
${nativeRootToken} "function mint(address,uint256) public" ${address1} 1000000000000000000000

echo "Supernet manager address" ${customSupernetManagerAddr}...

./polygon-edge rootchain premine \
--data-dir test-chain-${counter} \
--amount 1000000000000000000000 \
--supernet-manager ${customSupernetManagerAddr} \
--root-erc20-predicate ${rootERC20Predicate} \
--erc20-native-token ${nativeRootToken} \
--jsonrpc http://127.0.0.1:8545
fi

((counter++))
done

./polygon-edge polybft supernet \
--private-key aa75e9a7d427efc732f8e4f1a5b7646adcc61fd5bae40f80d13c8419c9f43d6d \
--supernet-manager ${customSupernetManagerAddr} \
--stake-manager ${stakeManagerAddr} \
--finalize-genesis-set \
--enable-staking \
--jsonrpc http://127.0.0.1:8545
Expand Down

0 comments on commit 7ca870b

Please sign in to comment.