Skip to content

Commit 2a7811b

Browse files
authored
RPC Taken from ethereum-lists directly (#873)
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`](diffhunk://#diff-18813c86948efc57e661623d7ba48ff94325c9b5421ec9177f724922dd553a35L3-L12): 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`).
1 parent 477a2ed commit 2a7811b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
## Add new chain
22

3-
> Template to provide information about the new chain. Only add extra information in the bottom section. Ensure that the contracts are deployed on the chain, if not deploy with [safe-contracts](https://github.com/safe-global/safe-contracts). Only **one** chain ID, **one** Safe version and **one** deployment type per PR. This entire paragraph should be deleted.
3+
> Template to provide information about the new chain. Only add extra information in the bottom section. Ensure that the contracts are deployed on the chain, if not deploy with [safe-contracts](https://github.com/safe-global/safe-contracts). Only **one** chain ID, **one** Safe version and **one** deployment type per PR. The RPC will be taken from [ethereum-lists/chains](https://github.com/ethereum-lists/chains). This entire paragraph should be deleted.
44
55
Please fill the following form:
66

77
Provide the Chain ID (Only 1 chain id per PR).
88
- Chain_ID:
99

10-
Provide RPC URL for the chain (should be able to query atleast 3+ requests per second for automatic PR check).
11-
- RPC_URL:
12-
1310
Relevant information:
1411
Add any other relevant information like blockexplorer, any annotation...

bin/github-review.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ if [[ -z $chainid ]]; then
4545
echo "ERROR: Chain ID not specified as per the PR Template" 1>&2
4646
exit 1
4747
fi
48-
rpc="$(gh pr view $pr | sed -nE 's|^- RPC_URL: (https?://[^ ]+).*$|\1|p')"
48+
chainInfo="https://raw.githubusercontent.com/ethereum-lists/chains/refs/heads/master/_data/chains/eip155-$chainid.json"
49+
rpc="$(curl -sfL "$chainInfo" | jq -r '.rpc[0]')"
4950
if [[ -z $rpc ]]; then
50-
echo "ERROR: RPC not specified as per the PR Template" 1>&2
51+
echo "ERROR: RPC not fetched correctly from the ethereum-lists" 1>&2
5152
exit 1
5253
fi
5354
version="$(gh pr diff $pr --name-only | sed -nE 's|^src/assets/v([0-9\.]*)/.*$|\1|p' | sort -u)"

0 commit comments

Comments
 (0)