Skip to content

Add storage layout assertion for proxies #2593

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

shahthepro
Copy link
Collaborator

Code changes

  • Runs etherscan-verify whenever a contract is deployed with deployWithConfirmation (no more manual verification)
  • Adds new hardhat tasks to store and assert implementation storage layouts for proxies (filenames have -impl suffix)
  • Adds fork tests for each of the networks to make sure that they are all safe to upgrade
  • We have certain contracts where we used duplicate artifact names, a new mapping object helps resolve that

Generating/Updating the storage layout for a proxy contract

$ npx hardhat storeStorageLayoutForProxy --network mainnet --proxy OUSDProxy

Generating/Updating the storage layout for all proxy contracts on a network

$ npx hardhat storeStorageLayoutForAllProxies --network mainnet

Asserting that there's no conflict for a single proxy

$ npx hardhat assertStorageLayoutForProxy --network mainnet --proxy OUSDProxy

Asserting that there's no conflict for all proxy contracts

$ npx hardhat assertStorageLayoutForAllProxies --network mainnet

Code Change Checklist

To be completed before internal review begins:

  • The contract code is complete
  • Executable deployment file
  • Fork tests that test after the deployment file runs
  • Unit tests *if needed
  • The owner has done a full checklist review of the code + tests

Internal review:

  • Two approvals by internal reviewers

Copy link

codecov bot commented Jul 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 35.13%. Comparing base (5e89744) to head (76a4290).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2593   +/-   ##
=======================================
  Coverage   35.13%   35.13%           
=======================================
  Files         111      111           
  Lines        5303     5303           
  Branches     1405     1405           
=======================================
  Hits         1863     1863           
  Misses       3438     3438           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@sparrowDom sparrowDom left a comment

Choose a reason for hiding this comment

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

well done 👍

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