Skip to content

Conversation

@jadijadi
Copy link
Contributor

  • Try using deployment ABI first, but fall back to source-based extraction if there's a mismatch
  • stable-testnet added to networks.ts

…traction

If encoding fails due to argument mismatch, try extracting constructor from source
This handles cases where the ABI is incomplete but source code has the full signature
@github-actions
Copy link
Contributor

🚨 E2E Tests Failed

The E2E tests failed during CI. These tests validate real blockchain interactions and may fail due to:

This is non-blocking and does not prevent merging. Check the action logs above for detailed failure information.

@jadijadi jadijadi requested a review from Copilot December 12, 2025 23:27
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

This PR enhances the contract verification process by implementing a fallback mechanism when there's a constructor ABI mismatch, and adds support for new blockchain networks (stable-testnet and codex).

Key Changes:

  • Implements try-catch fallback logic to extract constructor ABI from source code when deployment ABI encoding fails
  • Adds stable-testnet and codex network configurations

Reviewed changes

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

File Description
packages/verify-contract/src/hardhat-deploy/verify.ts Adds fallback mechanism to extract constructor ABI from source when deployment ABI fails
packages/verify-contract/src/common/networks.ts Adds stable-testnet (chainId 2201) and codex (chainId 81224) network definitions
.changeset/purple-items-argue.md Documents the minor version change for the verify-contract package

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jadijadi jadijadi requested a review from Copilot December 16, 2025 19:29
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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +272 to +275
logger.warn(
`Skipping contract ${contractName} in ${fileName} on network ${networkName} due to constructor encoding error: ${error}. ` +
`Tried fallback to source-based extraction but that also failed: ${sourceError}`
)
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

The error message concatenates error objects directly into the string, which may produce unhelpful output like '[object Object]'. Consider using error.message or a similar property to display meaningful error information.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

🚨 E2E Tests Failed

The E2E tests failed during CI. These tests validate real blockchain interactions and may fail due to:

This is non-blocking and does not prevent merging. Check the action logs above for detailed failure information.

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