Skip to content

Verify contracts with sourcify #574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 26, 2022
Merged

Verify contracts with sourcify #574

merged 5 commits into from
May 26, 2022

Conversation

tmigone
Copy link
Member

@tmigone tmigone commented May 19, 2022

Motivation

We currently verify our contracts on Etherscan. Sourcify provides a verification service that includes contract metadata verification and a more decentralized approac. See https://blog.soliditylang.org/2020/06/25/sourcify-faq/ for details.

Changes

  • Add a sourcify hardhat task to verify a contract on https://sourcify.dev/
  • Modify solidity settings to generate metadata file on compilation

Usage:

npx hardhat sourcify <CONTRACT_ADDRESS> --contract <CONTRACT_FQN> --network mainnet

# Example
npx hardhat sourcify 0x147A7758EA71d91D545407927b34DD77A5f7C21A --contract contracts/curation/Curation.sol:Curation --network mainnet

Unlike Etherscan, Sourcify requires uploading metadata file generated when contract is compiled. We use the contract's fully qualified name to grab this file.

Verified contracts

  • GraphProxyAdmin
  • BancorFormula
  • Controller
  • EpochManager
    • proxy
    • implementation
  • GraphToken
  • ServiceRegistry
    • proxy
    • implementation
  • Curation
    • proxy
    • implementation
  • GNS
    • proxy
    • implementation
  • Staking
    • proxy
    • implementation
  • RewardsManager
    • proxy
    • implementation
  • DisputeManager
    • proxy
    • implementation
  • AllocationExchange
  • SubgraphNFTDescriptor
  • SubgraphNFT

@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

Merging #574 (9dc2cd0) into dev (6e9b7f1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev     #574   +/-   ##
=======================================
  Coverage   90.49%   90.49%           
=======================================
  Files          35       35           
  Lines        1747     1747           
  Branches      290      290           
=======================================
  Hits         1581     1581           
  Misses        166      166           
Flag Coverage Δ
unittests 90.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e9b7f1...9dc2cd0. Read the comment docs.

@tmigone tmigone requested a review from abarmat May 20, 2022 18:26
@tmigone tmigone force-pushed the tmigone/sourcify-verification branch from b7afe9e to 9dc2cd0 Compare May 23, 2022 15:14
Copy link
Contributor

@abarmat abarmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@tmigone tmigone merged commit 7515916 into dev May 26, 2022
abarmat added a commit that referenced this pull request Jul 13, 2022
- Add a threshold above which rewards start accruing for a subgraph (#528)
- Verify contracts with sourcify (#574)
- Add GraphCurationToken to addressbook (#575)
- Rework graph config files (#572)
abarmat added a commit that referenced this pull request Jul 13, 2022
- Add a threshold above which rewards start accruing for a subgraph (#528)
- Verify contracts with sourcify (#574)
- Add GraphCurationToken to addressbook (#575)
- Rework graph config files (#572)
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.

2 participants