safe-global / safe-deployments

A collection of Safe singleton deployments
MIT License
131 stars 272 forks source link

RPC independence based on chainlist RPC list for review #688

Open remedcu opened 3 months ago

remedcu commented 3 months ago

Currently, the chain ID and the RPC link are provided by the person who creates the PR with the contracts being added.

As an added security, we could retrieve the RPC list from the ethereum-lists/chains repo and use that in the script.

Expected Outcome

Alternatives

mmv08 commented 3 months ago

Possible Issue: If we parse based on the website structure, then changes in the website might break the script.

Why do you need the website? They website uses the JSON files hosted on github: https://github.com/ethereum-lists/chains/tree/master/_data/chains

remedcu commented 3 months ago

Yes, we could use the official Chainlist repo as well, which is mentioned in the Alternatives section of the issue.

mmv08 commented 3 months ago

Yes, we could use the official Chainlist repo as well, which is mentioned in the Alternatives section of the issue.

The repo in the alternatives is the defillama chainlist, but we follow the one I linked

remedcu commented 3 months ago

But we did require that the chain should be listed on https://chainlist.org/ right? Or am I mistaken?

mmv08 commented 3 months ago

But we did require that the chain should be listed on https://chainlist.org/ right? Or am I mistaken?

It uses the chainlist from the ethereum-lists repo: https://github.com/DefiLlama/chainlist/blob/main/utils/fetch.js#L99

remedcu commented 3 months ago

TIL about it! Thanks! Updated the initial description.