Skip to content

Commit

Permalink
chore: made Prost Chain Id dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
xadahiya committed Nov 28, 2023
1 parent 7aac045 commit 5573520
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion settings.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"domain": {
"name": "PowerloomProtocolContract",
"version": "0.1",
"chainId": "102",
"chainId": "prost-chain-id",
"verifyingContract": "protocol-state-contract"
},
"accountAddress": "signer-account-address",
Expand Down
8 changes: 8 additions & 0 deletions snapshotter_autofill.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:-}"
Expand All @@ -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}"
Expand All @@ -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
Expand Down

0 comments on commit 5573520

Please sign in to comment.