Skip to content

Conversation

hsy822
Copy link
Collaborator

@hsy822 hsy822 commented Sep 22, 2025

Changes

  • Added a "Verify Contract on Explorers" checkbox to the Deploy & Run Transactions tab.
  • Removed the "Publish to IPFS" option from the UI; it is now integrated into the "Verify" feature and runs automatically.
  • Automatically selects only the supported verifiers (e.g., Sourcify, Etherscan) for the current network, based on its entry in https://chainid.network/chains.json.
  • Note: For Etherscan verification, an API key must be pre-configured in the global Remix Settings tab.
  • The results of verification attempts (success, failure, pending) are saved as receipts to localStorage. This allows the feature to share state with the Contract Verification plugin and display the results in its Receipts tab.

How to Test

  1. (Optional) Navigate to the Settings tab and add an Etherscan API key.
  2. Navigate to the Deploy & Run Transactions tab.
  3. Connect to an official test network, such as Sepolia.
  4. Select a compiled contract and check the new "Verify Contract on Explorers" checkbox.
  5. Click the Deploy button.
  6. In the terminal, confirm that after the successful deployment log, verification logs for each supported explorer are printed sequentially.
  7. Navigate to the Contract Verification plugin and click on the Receipts tab. Confirm that the new auto-verification record appears at the top of the list.

Related Issues

Copy link

netlify bot commented Sep 22, 2025

Deploy Preview for reliable-cocada-166884 ready!

Name Link
🔨 Latest commit 5c1a764
🔍 Latest deploy log https://app.netlify.com/projects/reliable-cocada-166884/deploys/68e852cc5bf1e300083e816f
😎 Deploy Preview https://deploy-preview-6394--reliable-cocada-166884.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

contractName: contractName,
abiEncodedConstructorArgs: constructorArgs,
date: new Date().toISOString(),
receipts: []
Copy link
Contributor

@manuelwedler manuelwedler Sep 23, 2025

Choose a reason for hiding this comment

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

It would be nice to have receipts for submittedContract and store it in local storage, such that it also shows up in the plugin's UI. See the VerifyView for reference.

I also thought of refactoring the VerifyView once, since a lot of the logic from there could actually be reused for this feature.

Anyway, very nice that you tackled this feature!

@hsy822 hsy822 added the ready-to-review PR ready to review label Sep 25, 2025
@yann300
Copy link
Contributor

yann300 commented Sep 25, 2025

If the network isn't supported we shouldn't log anything and best to disable the checkbox or maybe that's best to just display the checkbox only if the network is actually supported.

await this.call('terminal', 'log', { type: 'log', value: `Verifying with ${providerName}...` })

if (providerName === 'Etherscan' || providerName === 'Routescan' || providerName === 'Blockscout') {
await new Promise(resolve => setTimeout(resolve, 10000))
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you need to wait here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is a delay between the contract deployment and the time when the block explorer recognizes the deployed information. If the verification script runs too soon, the explorer may not yet have indexed the deployed contract, resulting in an “Unable to locate ContractCode” error.

@hsy822 hsy822 requested a review from yann300 October 10, 2025 05:12
@yann300 yann300 merged commit 147c77c into master Oct 10, 2025
33 checks passed
@yann300 yann300 deleted the add-contract-verification-checkbox branch October 10, 2025 20:31
@hsy822 hsy822 removed the ready-to-review PR ready to review label Oct 16, 2025
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.

Put verification button in Deploy & Run

6 participants