Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC Taken from ethereum-lists directly #873

Merged
merged 3 commits into from
Nov 21, 2024
Merged

RPC Taken from ethereum-lists directly #873

merged 3 commits into from
Nov 21, 2024

Conversation

remedcu
Copy link
Member

@remedcu remedcu commented Nov 20, 2024

Solved #688

This pull request includes a small but significant change to the .github/PULL_REQUEST_TEMPLATE.md file. The change updates the instructions for adding a new chain by specifying that the RPC URL will be taken from the ethereum-lists/chains repository.

  • .github/PULL_REQUEST_TEMPLATE.md: Updated the instructions to clarify that the RPC URL will be sourced from the ethereum-lists/chains repository.
  • bin/github-review.sh: Updated how RPC is fetched (Before: from PR description. After: from ethereum-lists).

@remedcu remedcu self-assigned this Nov 20, 2024
@remedcu remedcu requested review from gjeanmart and a team as code owners November 20, 2024 11:03
@@ -45,9 +45,9 @@ if [[ -z $chainid ]]; then
echo "ERROR: Chain ID not specified as per the PR Template" 1>&2
exit 1
fi
rpc="$(gh pr view $pr | sed -nE 's|^- RPC_URL: (https?://[^ ]+).*$|\1|p')"
rpc="$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/ethereum-lists/chains/contents/_data/chains/eip155-$chainid.json | jq -r .content | base64 --decode | jq -r '.rpc[0]')"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this shouldn't use GitHub API IMO - we can just curl the file directly:

chainlisturl="https://raw.githubusercontent.com/ethereum-lists/chains/refs/heads/master/_data/chains/eip155-$chainid.json"
rpc="$(curl -sfL "$chainlisturl" | jq -r '.rpc[0]')"

Copy link
Collaborator

@nlordell nlordell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome change! One small suggestion.

@remedcu remedcu merged commit 2a7811b into main Nov 21, 2024
1 check passed
@remedcu remedcu deleted the rpc-from-chainid branch November 21, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants