Contract Repository
Verified contracts are stored in the Sourcify repository and are available via Web or IPFS.
IPFS
The contract repository is periodically updated and pinned to the IPFS. Shout out to web3.storage, estuary.tech for providing pinning for our public repository and also @wmitsuda for the troubleshooting and pinning of our repo!
The repo is accessible under the following IPNS DNSLink names:
You can also access the contract repository with the /ipns/:ipns/contracts/:match/:chainId/:contractAddress
format on IPFS. Example:
Pin the IPFS repository
Pin and help us decentralize the Sourcify repository!
Refer to the guide by @wmitsuda
Web
The repository interface is at https://repo.sourcify.dev and https://repo.staging.sourcify.dev (unstable).
However for performance reasons, it is not possible to navigate the folders above the contract level. You need to know ahead the contract you are looking for.
Finding contracts
You can paste the contract address in the UI sourcify.dev without choosing the chain and it will check the contract on all chains in the contract repository
The contracts are accessible under the following path format:
https://repo.sourcify.dev/contracts/:match/:chainId/:contractAddress
:match
: eitherfull_match
orpartial_match
:chainId
: EVM chain id1
for Ethereum Mainnet,5
Ethereum testnet GΓΆrli etc. See chainlist.org:contractAddress
: e.g.0x5ed4a410A612F2fe625a8F3cB4d70f197fF8C8be
Examples
Here are some example contracts:
- https://repo.sourcify.dev/contracts/full_match/1/0x5ed4a410A612F2fe625a8F3cB4d70f197fF8C8be
- https://repo.sourcify.dev/contracts/full_match/1/0xca2ad74003502af6B727e846Fab40D6cb8Da0035
- https://repo.sourcify.dev/contracts/full_match/100/0x4f15a6e74CFC2F80D5967a8aB75F3c83D8043cF4
- https://repo.sourcify.dev/contracts/partial_match/1/0xb857F1f4014A0C45C287667148417b6799Fe594E/
- (staging) https://repo.staging.sourcify.dev/contracts/partial_match/69/0xb50cBeeFBCE78cDe83F184B275b5E80c4f01006A/sources/
View Source Code in Remix IDE
It is possible to view the contract folder in the Remix IDE by clicking "View in Remix".
Allow the Sourcify plugin on the next screen in Remix IDE (might take a while to load). The contract folder will be available under verified-sources/<contract-address>
in the Remix file explorer.
Download folders
You can download the whole folder by clicking on top left download icon.
Alternatively you can select which files/folders to download by clicking the checkmarks, and click the download icon.
API
You directly download individual files with their full path. See Repository API.
Download
IPFS
You can download the whole repository over IPFS by
ipfs get "/ipns/repo.sourcify.dev" -o <output-directory>