Closed akashgreninja closed 1 year ago
Show the code where you verify the code so as to push to etherscan ie: const { run } = require("hardhat");
const verify = async (contractAddress, args) => { console.log("Verifying..."); try { await run("verify:verify", { address: contractAddress, constructorArguments: args, }); } catch (e) { console.log(e); } };
module.exports = { verify, };
Then where you deploy: if ( !mockOnThisNetworks.includes(network.name) && process.env.ETHERSCAN_API_KEY ) { await verify(raffle.address, args); log("\n------------------------"); } else { log("No deployment needed. LocalNetwork detected."); }
@21fahm Thanks a lot it actually worked !!!!
NomicLabsHardhatPluginError: Failed to send contract verification request. Endpoint URL: https://api-sepolia.etherscan.io/api Reason: The Etherscan API responded that the address 0xA7f1ACE8E6e0055ed85209846bc9267675eFFD75 does not have bytecode.
This comes when I run the
yarn hardhat deploy --network sepolia
any ideas as to why ?
this is my hardhat config file