🚀 APIv2 is now available! Make the most of the information-rich responses Learn more →

Source Code Verification
for Ethereum Smart Contracts

Open-source, open-data, open-standards

0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063a9059cbb11610066578063a9059cbb146102b3578063dd62ed3e146102e3578063ea8210b614610313578063f2fde38b1461032f57610100565b80638da5cb5b1461022957806395d89b41146102475780639dc29fac14610265578063a6af2dfe1461029557610100565b8063313ce567116100d3578063313ce567146101a157806340c10f19146101bf57806370a08231146101ef578063715018a61461021f57610100565b806306fdde0314610105578063095ea7b31461012357806318160ddd1461015357806323b872dd14610171575b600080fd5b61010d61034b565b60405161011a9190611016565b60405180910390f35b61013d600480360381019061013891906110d1565b6103dd565b60405161014a919061112c565b60405180910390f35b61015b610400565b6040516101689190611156565b60405180910390f35b61018b60048036038101906101869190611171565b61040a565b604051610198919061112c565b60405180910390f35b6101a9610439565b6040516101b691906111e0565b60405180910390f35b6101d960048036038101906101d491906110d1565b610442565b6040516101e6919061112c565b60405180910390f35b610209600480360381019061020491906111fb565b610458565b6040516102169190611156565b60405180910390f35b6102276104a0565b005b6102316104b4565b60405161023e9190611237565b60405180910390f35b61024f6104de565b60405161025c9190611016565b60405180910390f35b61027f600480360381019061027a91906110d1565b610570565b60405161028c919061112c565b60405180910390f35b61029d610586565b6040516102aa9190611237565b60405180910390f35b6102cd60048036038101906102c891906110d1565b6105ac565b6040516102da919061112c565b60405180910390f35b6102fd60048036038101906102f89190611252565b6105cf565b60405161030a9190611156565b60405180910390f35b61032d600480360381019061032891906111fb565b610656565b005b610349600480360381019061034491906111fb565b610711565b005b60606003805461035a906112c1565b80601f0160208091040260200160405190810160405280929190818152602001828054610386906112c1565b80156103d35780601f106103a8576101008083540402835291602001916103d3565b820191906000526020600020905b8154815290600101906020018083116103b657829003601f168201915b5050505050905090565b6000806103e8610797565b90506103f581858561079f565b600191505092915050565b6000600254905090565b600080610415610797565b90506104228582856107b1565b61042d858585610845565b60019150509392505050565b60006012905090565b600061044e8383610939565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6104a86109bb565b6104b26000610a42565b565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600480546104ed906112c1565b80601f0160208091040260200160405190810160405280929190818152602001828054610519906112c1565b80156105665780601f1061053b57610100808354040283529160200191610566565b820191906000526020600020905b81548152906001019060200180831161054957829003601f168201915b5050505050905090565b600061057c8383610b08565b6001905092915050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806105b7610797565b90506105c4818585610845565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61065e6109bb565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036106cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c49061133e565b60405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6107196109bb565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361078b5760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016107829190611237565b60405180910390fd5b61079481610a42565b50565b600033905090565b6107ac8383836001610b8a565b505050565b60006107bd84846105cf565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461083f578181101561082f578281836040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526004016108269392919061135e565b60405180910390fd5b61083e84848484036000610b8a565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036108b75760006040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526004016108ae9190611237565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036109295760006040517fec442f050000000000000000000000000000000000000000000000000000000081526004016109209190611237565b60405180910390fd5b610934838383610d61565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036109ab5760006040517fec442f050000000000000000000000000000000000000000000000000000000081526004016109a29190611237565b60405180910390fd5b6109b760008383610d61565b5050565b6109c3610797565b73ffffffffffffffffffffffffffffffffffffffff166109e16104b4565b73ffffffffffffffffffffffffffffffffffffffff1614610a4057610a04610797565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610a379190611237565b60405180910390fd5b565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b7a5760006040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610b719190611237565b60405180910390fd5b610b8682600083610d61565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610bfc5760006040517fe602df05000000000000000000000000000000000000000000000000000000008152600401610bf39190611237565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610c6e5760006040517f94280d62000000000000000000000000000000000000000000000000000000008152600401610c659190611237565b60405180910390fd5b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508015610d5b578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610d529190611156565b60405180910390a35b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610db3578060026000828254610da791906113c4565b92505081905550610e86565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610e3f578381836040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401610e369392919061135e565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610ecf5780600260008282540392505081905550610f1c565b806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610f799190611156565b60405180910390a3505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610fc0578082015181840152602081019050610fa5565b60008484015250505050565b6000601f19601f8301169050919050565b6000610fe882610f86565b610ff28185610f91565b9350611002818560208601610fa2565b61100b81610fcc565b840191505092915050565b600060208201905081810360008301526110308184610fdd565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006110688261103d565b9050919050565b6110788161105d565b811461108357600080fd5b50565b6000813590506110958161106f565b92915050565b6000819050919050565b6110ae8161109b565b81146110b957600080fd5b50565b6000813590506110cb816110a5565b92915050565b600080604083850312156110e8576110e7611038565b5b60006110f685828601611086565b9250506020611107858286016110bc565b9150509250929050565b60008115159050919050565b61112681611111565b82525050565b6000602082019050611141600083018461111d565b92915050565b6111508161109b565b82525050565b600060208201905061116b6000830184611147565b92915050565b60008060006060848603121561118a57611189611038565b5b600061119886828701611086565b93505060206111a986828701611086565b92505060406111ba868287016110bc565b9150509250925092565b600060ff82169050919050565b6111da816111c4565b82525050565b60006020820190506111f560008301846111d1565b92915050565b60006020828403121561121157611210611038565b5b600061121f84828501611086565b91505092915050565b6112318161105d565b82525050565b600060208201905061124c6000830184611228565b92915050565b6000806040838503121561126957611268611038565b5b600061127785828601611086565b925050602061128885828601611086565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806112d957607f821691505b6020821081036112ec576112eb611292565b5b50919050565b7f416464726573732063616e74206265207a65726f206164647265737300000000600082015250565b6000611328601c83610f91565b9150611333826112f2565b602082019050919050565b600060208201905081810360008301526113578161131b565b9050919050565b60006060820190506113736000830186611228565b6113806020830185611147565b61138d6040830184611147565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006113cf8261109b565b91506113da8361109b565b92508282019050808211156113f2576113f1611395565b5b9291505056fea2646970667358221220c7a38bd19eea53eb5a07e809e50ea317b79ee0083cea667b7a5565b6436a6ca664736f6c63430008140033
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract ERC20Token is ERC20, Ownable {
    address public bridgeAdmin;

    constructor(
        string memory name,
        string memory symbol,
        uint256 initialSupply,
        address _bridgeAdmin
    ) ERC20(name, symbol) Ownable(msg.sender) {
        bridgeAdmin = _bridgeAdmin;
        // Mint the initial supply of tokens to the deployer of the contract
        _mint(msg.sender, initialSupply);
    }

    function mint(address to, uint256 amount) public returns (bool) {
        // require(msg.sender == bridgeAdmin, 'only bridge admin');
        _mint(to, amount);
        return true;
    }

    function burn(address from, uint256 amount) public returns (bool) {
        // require(msg.sender == bridgeAdmin, 'only bridge admin');
        _burn(from, amount);
        return true;
    }

    function updateBridgeAdmin(address newAdmin) external onlyOwner {
        require(newAdmin != address(0), "Address cant be zero address");
        bridgeAdmin = newAdmin;
    }
}

Open-Source

Sourcify is and always will be 100% open source. Github →

Open-Data

Verified contract datasets should be open and easily accessible.
Sourcify's whole database is available for free and open access. Download all verified contracts

Open-Standards

As aVerifier Alliance member, Sourcify fosters open standards, data sharing, interoperability, and collaboration between all source code verifiers.

0
Chains

Ethereum logoArbitrum logoOptimism logoPolygon logoGnosis logoBNB Chain logoAvalanche logoBase logoScroll logoLinea logoHedera logo

Sourcify works on all EVM based chains.

0

contracts verified

1,206,413 contracts on
OP Mainnet (10)Base (8453)Ethereum Mainnet (1)Ethereum Testnet Sepolia (11155111)Arbitrum One (42161)BNB Smart Chain Mainnet (56)Zora (7777777)Polygon Mainnet (137)Mumbai (80001)Base Sepolia Testnet (84532)0750,0001,500,0002,250,0003,000,000
  • Exact Matches
  • Matches

Tooling

# Deploy and verify
$ forge create --rpc-url <rpc-url> --private-key <private-key> src/MyContract.sol:MyContract --verify --verifier sourcify

# Verify an already deployed contract
$ forge verify-contract --verifier sourcify --chain <chain-id> 0xB4239c86440d6C39d518D6457038cB404451529b MyContract 

# Check if a contract is verified
$ forge verify-check 0x1F98431c8aD98523631AE4a59f267346ea31F984 --verifier sourcify
  

Self-hosting

Sourcify is open-source and for self-hosting. Here are some public instances we are aware of:

Are you running a self-hosted instance?

Get in touch

F.A.Q.

Smart contracts on Ethereum and other EVM blockchains are written in human-readable programming languages like Solidity, compiled into bytecode, and stored in bytes on the chain. Humans can't read bytes so this needs to be brought back to human-readable form.

However, if you see a Solidity/Vyper code on Github etc., and someone claims this to be the code of the contract at 0xabc..def, you wouldn't know. Verification makes sure that, that Solidity code is actually the one deployed on-chain.

In simplified terms, we take the Solidity/Vyper code provided by the developer or anyone, compile it, and compare the compiled bytecode with the onchain bytecode at that address 0xabc..def. If they match, the contract is verified.

Source code verification is crucial for transparency and security in blockchains. You should not interact with contracts that are not source-code verified.

Verification does not mean it's safe to interact with a contract. Verifiers do not check the contents of the contracts. These should be cheked by auditors and the community to be deemed safe.

  • Sourcify is fully open-source, self-hostable, and non-profit.
  • We share our whole contract dataset publicly in modern data formats for community use.
  • We also store all verified contracts on IPFS, which makes them available directly through the IPFS hash in the bytecode. See the playground for more.
  • Sourcify supports "exact match"es, which means the verified source-code is cryptographically guaranteed to be the same as the original one, even whitespaces, comments etc. See docs for more.
Sourcify is a public good and non-profit project. It started under the Ethereum Foundation and now is part of the Argot Collective. It currently does not generate any revenue.
The Verifier Alliance is an ecosystem collective aiming for easy, unified, and open access to the source-code of EVM smart contracts. Sourcify and other verifiers collaborate to create a public shared database of verified EVM contracts, open up the siloed contract data, and create standards around the verifiation process. To learn more, visit verifieralliance.org.