Skip to content

Conversation

@gfournierPro
Copy link
Contributor

  • added verification to upgrade script too

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a reusable verification utility and integrates contract verification into both initial deployment and facet upgrade flows, plus introduces a GitHub Actions workflow for automated facet upgrades.

  • Refactors verify script into reusable functions with optional targeted verification.
  • Integrates verification into deploy and upgrade scripts.
  • Adds CI workflow to run dry-run or live facet upgrades and persist artifacts.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

File Description
scripts/verify.ts Refactors and generalizes contract verification logic.
scripts/upgrades/deploy-and-update-some-facet.ts Invokes new verify utility after facet upgrade.
deploy/0_deploy.ts Replaces inline verification logic with centralized verify() call.
.github/workflows/upgrade-facets.yml Adds workflow to automate facet upgrade (dry run or live) and artifact persistence.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.85%. Comparing base (d4b8b13) to head (d4968ac).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #289   +/-   ##
=======================================
  Coverage   84.85%   84.85%           
=======================================
  Files          37       37           
  Lines        1241     1241           
  Branches      235      235           
=======================================
  Hits         1053     1053           
  Misses        188      188           

☔ 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.

Comment on lines +61 to +62
const contractsToVerify =
contracts && contracts.length > 0 ? contracts : await getContractsFromDeployments();
Copy link
Contributor

Choose a reason for hiding this comment

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

good idea

Comment on lines 80 to 82
error.message.includes('has') &&
error.message.includes('parameters but') &&
error.message.includes('arguments were provided')
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure we’ve covered all possible scenarios? If the logs change, those lines will break. Maybe it’s not a good idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

goona dig on that
But that's the from previous work, I did not change anything here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But here it only concerns constructor arguments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since in line 77 we already log the error
I can say that those 3 checks and the other console.error are redondant

Copy link
Member

Choose a reason for hiding this comment

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

Yes we can keep only the above error message

Comment on lines 80 to 82
error.message.includes('has') &&
error.message.includes('parameters but') &&
error.message.includes('arguments were provided')
Copy link
Member

Choose a reason for hiding this comment

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

Yes we can keep only the above error message

run: npm run build

- name: Run fork test (dry run)
if: inputs.dry_run == true
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

@zguesmi zguesmi 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 👏

* @param contracts - Optional array of specific contracts to verify. If not provided,
* will verify all contracts from the deployments/{network} directory.
*/
async function verify(contracts?: ContractToVerify[]): Promise<void> {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
async function verify(contracts?: ContractToVerify[]): Promise<void> {
export default async function verify(contracts?: ContractToVerify[]): Promise<void> {

*
* @param contracts - Optional array of specific contracts to verify.
*/
async function tryVerify(contracts?: ContractToVerify[]): Promise<void> {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
async function tryVerify(contracts?: ContractToVerify[]): Promise<void> {
export async function tryVerify(contracts?: ContractToVerify[]): Promise<void> {

Comment on lines 116 to 117
export default verify;
export { tryVerify };
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
export default verify;
export { tryVerify };

@gfournierPro gfournierPro merged commit dc112b1 into main Oct 16, 2025
4 checks passed
@gfournierPro gfournierPro deleted the feat/add-gha-upgrade-facet branch October 16, 2025 14:40
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.

4 participants