diff --git a/subgraph/scripts/update.sh b/subgraph/scripts/update.sh index 857e147..a0afc56 100755 --- a/subgraph/scripts/update.sh +++ b/subgraph/scripts/update.sh @@ -23,9 +23,9 @@ function update() #hardhatNetwork #graphNetwork #dataSourceIndex #contract # Set the ABIs path for this Hardhat network abiIndex=0 - for f in $(yq e .dataSources[$dataSourceIndex].mapping.abis[].file subgraph.yaml -o json -I 0 | jq -sr '.[]') + for f in "$(yq e .dataSources[$dataSourceIndex].mapping.abis[].file subgraph.yaml -o json -I 0 | jq -sr '.[]')" do - f2=$(echo $f | sed "s|\(.*\/deployments\/\).*\/|\1$hardhatNetwork\/|") + f2=$(echo "$f" | sed "s|\(.*\/deployments\/\).*\/|\1$hardhatNetwork\/|") yq -i ".dataSources[$dataSourceIndex].mapping.abis[$abiIndex].file=\"$f2\"" "$SCRIPT_DIR"/../subgraph.yaml (( ++abiIndex )) done @@ -40,10 +40,9 @@ function updateTemplates() #hardhatNetwork #templateIndex #contract # Set the ABIs path for this Hardhat network abiIndex=0 - for f in $(yq e .templates[$templateIndex].mapping.abis[].file subgraph.yaml -o json -I 0 | jq -sr '.[]') + for f in "$(yq e .templates[$templateIndex].mapping.abis[].file subgraph.yaml -o json -I 0 | jq -sr '.[]')" do - f2=$(echo $f | sed "s|\(.*\/deployments\/\).*\/|\1$hardhatNetwork\/|") - echo "$f2" + f2=$(echo "$f" | sed "s|\(.*\/deployments\/\).*\/|\1$hardhatNetwork\/|") yq -i ".templates[$templateIndex].mapping.abis[$abiIndex].file=\"$f2\"" "$SCRIPT_DIR"/../subgraph.yaml (( ++abiIndex )) done @@ -61,7 +60,6 @@ cp "$SCRIPT_DIR"/../subgraph.yaml "$SCRIPT_DIR"/../subgraph.yaml.bak.$(date +%s) for contract in $(yq .dataSources[].name "$SCRIPT_DIR"/../subgraph.yaml) do - echo "$i" update $hardhatNetwork $graphNetwork $i $contract (( ++i )) done diff --git a/web/scripts/generateBuildInfo.sh b/web/scripts/generateBuildInfo.sh index 772a94d..9c58614 100755 --- a/web/scripts/generateBuildInfo.sh +++ b/web/scripts/generateBuildInfo.sh @@ -16,11 +16,10 @@ QUERY='{"query":"{\n mainCurate(id:\"0\"){\n address\n }\n}","varia OUTPUT_FILE="src/generatedMainCurateAddress.json" TEMP_FILE=$(mktemp) -curl "$REACT_APP_ARBSEPOLIA_SUBGRAPH" -s -X POST -H "Content-Type: application/json" --data "$QUERY" -o $TEMP_FILE -if [ $? -eq 0 ]; then - ADDRESS=$(jq -r '.data.mainCurate.address' $TEMP_FILE) - echo "{\"mainCurateAddress\": \"$ADDRESS\"}" > $OUTPUT_FILE +if curl "$REACT_APP_ARBSEPOLIA_SUBGRAPH" -s -X POST -H "Content-Type: application/json" --data "$QUERY" -o "$TEMP_FILE"; then + ADDRESS=$(jq -r '.data.mainCurate.address' "$TEMP_FILE") + echo "{\"mainCurateAddress\": \"$ADDRESS\"}" > "$OUTPUT_FILE" echo -e "✔ Main Curate address fetched and saved to $OUTPUT_FILE" else @@ -28,6 +27,6 @@ else exit 1 fi -rm $TEMP_FILE +rm "$TEMP_FILE" node "$SCRIPT_DIR/gitInfo.js" \ No newline at end of file diff --git a/web/src/components/ActionButton/index.tsx b/web/src/components/ActionButton/index.tsx index 15be044..eeb38eb 100644 --- a/web/src/components/ActionButton/index.tsx +++ b/web/src/components/ActionButton/index.tsx @@ -59,7 +59,7 @@ const ActionButton: React.FC = ({ status, registryAddress, itemId return ; return