-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expose etherscan instance #7925
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
Conversation
🦋 Changeset detectedLatest commit: 7ad8412 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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 exposes the Etherscan verification instance to users through the network connection object, allowing direct access to Etherscan API methods and verification functionality.
Changes:
- Added a
verifierproperty toNetworkConnectioncontaining anetherscaninstance with getter methods and verification operations - Implemented
customApiCallmethod for making arbitrary Etherscan API requests - Created lazy initialization wrapper to defer Etherscan instance creation until needed
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| v-next/hardhat-verify/src/types.ts | Defines public types for the verifier helpers interface and exports Etherscan-related types |
| v-next/hardhat-verify/src/type-extensions.ts | Extends NetworkConnection type to include the verifier property |
| v-next/hardhat-verify/src/internal/verifier.ts | Implements the Verifier class that creates and holds the lazy Etherscan instance |
| v-next/hardhat-verify/src/internal/hook-handlers/network.ts | Adds network hook handler to attach verifier to new connections |
| v-next/hardhat-verify/src/internal/etherscan.types.ts | Defines types for Etherscan API interactions including LazyEtherscan interface |
| v-next/hardhat-verify/src/internal/etherscan.ts | Implements customApiCall method and LazyEtherscanImpl wrapper class |
| v-next/hardhat-verify/src/internal/verification.ts | Exports createVerificationProviderInstance for use by LazyEtherscanImpl |
| v-next/hardhat-verify/src/index.ts | Registers the network hook handler |
| v-next/hardhat-verify/package.json | Adds export for types module |
| v-next/hardhat-verify/test/etherscan.ts | Tests for the customApiCall method |
| v-next/hardhat-verify/test/hook-handlers/network.ts | Tests verifying the verifier property is correctly attached to connections |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8a4a321 to
577e516
Compare
ChristopherDedominici
left a comment
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.
I left a very minor comment, other than that, LGTM
Closes: #7644
Documentation: (readme) was updated with the new API.
Usage examples
Contract deployment and verification
Using
customApiCallto fetch event logs