From 5573520ed452d6193d179a5589725c1059dbd303 Mon Sep 17 00:00:00 2001 From: Akshay Dahiya Date: Tue, 28 Nov 2023 10:05:47 +0530 Subject: [PATCH] chore: made Prost Chain Id dynamic --- settings.example.json | 2 +- snapshotter_autofill.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/settings.example.json b/settings.example.json index 8fe4d2c..491642b 100644 --- a/settings.example.json +++ b/settings.example.json @@ -86,7 +86,7 @@ "domain": { "name": "PowerloomProtocolContract", "version": "0.1", - "chainId": "102", + "chainId": "prost-chain-id", "verifyingContract": "protocol-state-contract" }, "accountAddress": "signer-account-address", diff --git a/snapshotter_autofill.sh b/snapshotter_autofill.sh index 554516f..6bbedeb 100755 --- a/snapshotter_autofill.sh +++ b/snapshotter_autofill.sh @@ -49,11 +49,17 @@ if [ "$NAMESPACE" ]; then echo "Found NAMESPACE ${NAMESPACE}"; fi +if [ "$PROST_CHAIN_ID" ]; then + echo "Found PROST_CHAIN_ID ${PROST_CHAIN_ID}"; +fi + cp settings.example.json settings.json export namespace="${NAMESPACE:-UNISWAPV2}" export prost_rpc_url="${PROST_RPC_URL:-https://rpc-prost1b.powerloom.io}" +export prost_chain_id="${PROST_CHAIN_ID:-103}" + export ipfs_url="${IPFS_URL:-/dns/ipfs/tcp/5001}" export ipfs_api_key="${IPFS_API_KEY:-}" export ipfs_api_secret="${IPFS_API_SECRET:-}" @@ -74,6 +80,7 @@ fi echo "Using Namespace: ${namespace}" echo "Using Prost RPC URL: ${prost_rpc_url}" +echo "Using Prost Chain ID: ${prost_chain_id}" echo "Using IPFS URL: ${ipfs_url}" echo "Using IPFS API KEY: ${ipfs_api_key}" echo "Using protocol state contract: ${protocol_state_contract}" @@ -85,6 +92,7 @@ echo "Using web3 storage token: ${web3_storage_token}" sed -i'.backup' "s#relevant-namespace#$namespace#" settings.json sed -i'.backup' "s#https://prost-rpc-url#$prost_rpc_url#" settings.json +sed -i'.backup' "s#prost-chain-id#$prost_chain_id#" settings.json sed -i'.backup' "s#ipfs-writer-url#$ipfs_url#" settings.json sed -i'.backup' "s#ipfs-writer-key#$ipfs_api_key#" settings.json