Smart Contract Verification
Plume's native block explorer is our own hosted deployment of Blockscout, an open-source block explorer that implements an Etherscan-compatible API. Unlike Etherscan, the Plume block explorer does not require any API key to verify contracts. Like Etherscan, we offer a variety of methods to verify your smart contracts. Verification is available for both Solidity and Vyper smart contracts.
Verify with Hardhat Plugin
You can verify your smart contract on the Plume block explorer using the hardhat-verify
plugin developed by the Nomic Foundation. Please see the "Deploy with Hardhat" section for a step-by-step guide of deploying and verifying a simple NFT contract. The steps are straightforward:
Install the
hardhat-verify
plugin.
Add the following changes to your
hardhat.config.js
file:Import the
hardhat-verify
plugin into the Hardhat Runtime Environment.Unlike Etherscan, Blockscout does not require an API key, but the
hardhat-verify
plugin requires that you put in any non-empty string, so we can just use"test"
as a placeholder.Add the Plume testnet block explorer URLs. Make sure to add the extra
\?
to the end of the API URL, otherwise the verification will fail.
Run the
npx hardhat verify
task on an existing contract. For example:
You can see the resulting verified smart contract code on the Plume block explorer.
Verify with Web Interface
You can manually verify your smart contract on the Plume block explorer's web interface. Simply enter the contract address into the search bar, click on the contract details, then navigate to the "Contract" tab and click on "Verify & publish":
The Plume block explorer supports three different contract verification methods for each smart contract programming language. You can submit the flattened source code, multi-part files, or standard JSON input.
Flattened Source Code
There are seven input fields to verify a smort contract using its flattened source code:
Field Name | Description |
---|---|
Is Yul contract | Check this if you wrote any part of your contract or whole contracts in Yul. |
Include nightly builds | Check this to show nightly builds. |
Compiler version | Select the compiler version specified in your contract's |
EVM version | Select the EVM version you compiled the contract against, or default if you did not choose a particular version. |
Optimization enabled | 200 is the default optimization level for the Solidity compiler. Edit this number if you compiled your contract with a different optimization level. |
Contract code | |
Add contract libraries | Add up to 10 contract libraries called in your smart contract. You have to specify the name of the library (e.g. |
Once you've finished entering your data, press "Verify & publish" on the bottom and your contract will be verified on the Plume block explorer!
Standard JSON Input
There are three input fields to verify a smart contract using standard JSON input:
Field Name | Description |
---|---|
Include nightly builds | Check this to show nightly builds. |
Compiler version | Select the compiler version specified in your contract's |
Contract code |
Once you've finished entering your data, press "Verify & publish" on the bottom and your contract will be verified on the Plume block explorer!
Multi-Part Files
There are four input fields to verify a smart contract using standard JSON input:
Field Name | Description |
---|---|
Include nightly builds | Check this to show nightly builds. |
Compiler version | Select the compiler version specified in your contract's |
EVM version | Select the EVM version you compiled the contract against, or default if you did not choose a particular version. |
Optimization enabled | 200 is the default optimization level for the Solidity compiler. Edit this number if you compiled your contract with a different optimization level. |
Sources | Upload all Solidity and Yul source files for your entire contract. |
Once you've finished entering your data, press "Verify & publish" on the bottom and your contract will be verified on the Plume block explorer!
Last updated