Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/rainix-manual-sol-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,23 @@ jobs:
exit 1
fi

# Blanked for the Sourcify retry below: forge goes to Etherscan
# whenever the chain's key holds a value. Blank, not unset — unset it
# errors resolving the table.
mapfile -t blanked < <(compgen -e | grep -E '^CI_DEPLOY_[A-Z_]+_ETHERSCAN_API_KEY$' | sed 's/$/=/')

failed=''
for network in $VERIFY_NETWORKS
do
echo "::group::$VERIFY_CONTRACT on $network"
nix develop github:rainlanguage/rainix/${{ env.RAINIX_SHA }}#sol-shell -c \
forge verify-contract --chain "$network" "$VERIFY_ADDRESS" "$VERIFY_CONTRACT" --watch --retries 40 --delay 15 \
|| failed="$failed $network"
|| {
echo "$network's explorer rejected the submission; retrying through Sourcify"
env "${blanked[@]}" nix develop github:rainlanguage/rainix/${{ env.RAINIX_SHA }}#sol-shell -c \
forge verify-contract --verifier sourcify --chain "$network" "$VERIFY_ADDRESS" "$VERIFY_CONTRACT" --watch --retries 40 --delay 15 \
|| failed="$failed $network"
}
echo '::endgroup::'
sleep 15
done
Expand Down
Loading