Summary
When deploying Solidity contracts to Arc Testnet (and presumably Mainnet), Arcscan displays:
"Contract not verified automatically. Please verify manually."
There is no official documentation in this repo, in the Arc docs, or anywhere on arc.io that explains:
- Which
hardhat-verify plugin to use
- What the Blockscout API URL is for Arc Testnet / Mainnet
- That a dummy API key is required (Blockscout ignores API keys but
hardhat-verify rejects an empty string)
- That
sourcify: { enabled: false } must be set to prevent conflicting verification attempts
Discovered while building ArcPay on Arc Testnet
After deploying three Solidity contracts (InvoiceRegistry, PaymentEscrow, InvoiceNFT) to Arc Testnet and seeing the "not verified" banner on Arcscan, I had to reverse-engineer the following working configuration by trial and error:
// hardhat.config.ts
import "@nomicfoundation/hardhat-verify";
const config: HardhatUserConfig = {
// ... solidity, networks ...
etherscan: {
apiKey: {
arc: "empty", // Blockscout ignores the key but rejects an empty string
arcMainnet: "empty",
},
customChains: [
{
network: "arc",
chainId: 5042002, // Arc Testnet
urls: {
apiURL: "https://testnet.arcscan.app/api",
browserURL: "https://testnet.arcscan.app",
},
},
{
network: "arcMainnet",
chainId: 4564, // Arc Mainnet
urls: {
apiURL: "https://arcscan.app/api",
browserURL: "https://arcscan.app",
},
},
],
},
sourcify: {
enabled: false, // Prevents duplicate/conflicting verification via Sourcify
},
};
Then verify with:
npx hardhat verify --network arc <CONTRACT_ADDRESS> <CONSTRUCTOR_ARG1> <CONSTRUCTOR_ARG2>
Impact
Every developer deploying a dApp on Arc Network hits this friction point. The arc-node repo already contains hardhat.config.ts but has no etherscan or sourcify block. The "verify manually" banner on Arcscan gives no hint of where to start.
Suggested fix
- Add the
etherscan.customChains block above to the repo's hardhat.config.ts as a reference
- Add a
docs/contract-verification.md section walking through the hardhat-verify flow for Arc Testnet and Mainnet
- Optionally: update Arcscan's "verify manually" page to link to this documentation
Environment: Arc Testnet (chainId 5042002), @nomicfoundation/hardhat-verify v3, Hardhat 2.28, Solidity 0.8.20
Summary
When deploying Solidity contracts to Arc Testnet (and presumably Mainnet), Arcscan displays:
There is no official documentation in this repo, in the Arc docs, or anywhere on arc.io that explains:
hardhat-verifyplugin to usehardhat-verifyrejects an empty string)sourcify: { enabled: false }must be set to prevent conflicting verification attemptsDiscovered while building ArcPay on Arc Testnet
After deploying three Solidity contracts (InvoiceRegistry, PaymentEscrow, InvoiceNFT) to Arc Testnet and seeing the "not verified" banner on Arcscan, I had to reverse-engineer the following working configuration by trial and error:
Then verify with:
Impact
Every developer deploying a dApp on Arc Network hits this friction point. The arc-node repo already contains
hardhat.config.tsbut has noetherscanorsourcifyblock. The "verify manually" banner on Arcscan gives no hint of where to start.Suggested fix
etherscan.customChainsblock above to the repo'shardhat.config.tsas a referencedocs/contract-verification.mdsection walking through thehardhat-verifyflow for Arc Testnet and MainnetEnvironment: Arc Testnet (chainId 5042002),
@nomicfoundation/hardhat-verifyv3, Hardhat 2.28, Solidity 0.8.20