diff --git a/scripts/cluster b/scripts/cluster index 700e7ac224..3e37b031fc 100755 --- a/scripts/cluster +++ b/scripts/cluster @@ -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 } @@ -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 \ @@ -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