Skip to content

feat(client): fetch contract ABIs from Sourcify, fall back to Etherscan - #309

Open
manuelwedler wants to merge 1 commit into
LedgerHQ:mainfrom
manuelwedler:feat/sourcify-abi-fallback
Open

feat(client): fetch contract ABIs from Sourcify, fall back to Etherscan#309
manuelwedler wants to merge 1 commit into
LedgerHQ:mainfrom
manuelwedler:feat/sourcify-abi-fallback

Conversation

@manuelwedler

Copy link
Copy Markdown
  • ABIs are now fetched from Sourcify first, and from Etherscan only when Sourcify has nothing for the contract.
  • Sourcify needs no API key, so ABI validation and descriptor generation work out of the box, including on chains Etherscan does not cover.
  • This removes the need to manually trigger the registry CI job on pull requests, which would currently be required because ABI validation depends on an Etherscan API key secret.
  • Sourcify returning 404 (contract not verified) or 400 (chain not supported) falls through to Etherscan; when both fail, the raised error names both causes and linters keep skipping ABI validation with the usual Could not fetch ABI warning.

Sourcify is now tried first when fetching a reference ABI, and Etherscan
is only used when Sourcify has nothing for the contract. Sourcify needs
no API key, so ABI validation and descriptor generation now work out of
the box, including on chains Etherscan does not cover.

Sourcify returning 404 (contract not verified) or 400 (chain not
supported) falls through to Etherscan. If both sources fail, the raised
error names both causes, and linters keep skipping ABI validation with a
"Could not fetch ABI" warning as before.
@manuelwedler
manuelwedler requested a review from a team as a code owner July 28, 2026 11:14
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.

1 participant