Smart Contract Code Verifier

Jun 27, 2023
Open
Open
Ecosystem Project
  • Links

What is an Ecosystem Project Idea?

An Ecosystem Project Idea is an idea for a project that someone could build within the Optimism ecosystem. As opposed to an Ecosystem Concept or an Ecosystem Idea, an Ecosystem Project is generally more fleshed out and corresponds to a relatively clear product to be built.

Summary

OP Mainnet and other OP Stack based chains encompass a multitude of smart contracts. It's crucial to have a tool or script that efficiently maps the code deployed on these blockchains to the code found within the corresponding GitHub repositories. This tool should be able to take a smart contract address (or list of addresses) and a commit hash and verify that the deployed code corresponds to the code from the specific commit hash.

Possible Features

  • Implement a tool or UI that accepts user inputs for L1 network name, contract address, and commit hash.
  • Allow the tool to download the corresponding GitHub repository at the specified commit hash and initialize it.
  • Compile contracts and compare the bytecode of the deployed contract with the actual bytecode.
  • Design the tool to handle proxies if necessary.
  • Throw alerts if unable to match the deployed code to what's in GitHub.

Impact

  • Enhances the safety of smart contract deployments by validating the origin of deployed code.
  • Improves auditability by providing an explicit link between the codebase in the repository and the deployed smart contracts.
  • More Information
  • Tag 1
    OP Stack
  • Tag2
    Dev Tools
  • Tag3
    Contracts