-
Notifications
You must be signed in to change notification settings - Fork 254
fix/verify-contract: - fall back to source-based extraction if there's a mismatch in ABI #1878
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
base: main
Are you sure you want to change the base?
Conversation
jadijadi
commented
Dec 12, 2025
- 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
🚨 E2E Tests FailedThe 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. |
There was a problem hiding this 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.
There was a problem hiding this 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.
| 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}` | ||
| ) |
Copilot
AI
Dec 16, 2025
There was a problem hiding this comment.
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.
🚨 E2E Tests FailedThe 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. |