I get a different response after deploying the contract and verifying than that shown in video.. #5515
Unanswered
adityapadekar
asked this question in
Q&A
Replies: 1 comment
-
|
Hello @adityapadekar There is nothing wrong with your response. Console printed everything that you wanted, so I'm not sure where do you see any problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I know that as time passes things might change but I just want to know it what I am doing is correct or not..
The code snippet of the
deploy.jsis as followsconst { ethers, run, network } = require("hardhat") const main = async () => { const SimpleStorageFactory = await ethers.getContractFactory( "SimpleStorage" ) console.log("Deploying ...") const simpleStorage = await SimpleStorageFactory.deploy() await simpleStorage.deployed() console.log(`Deployed to ${simpleStorage.address}`) if (network.config.chainID === 11155111 && process.env.ETHERSCAN_API_KEY) { console.log("verify") await simpleStorage.deployTransaction.wait(6) await verify(simpleStorage.address, []) } const currentValue = await simpleStorage.retrieve() console.log(`Current value is ${currentValue}`) const transactionResponse = await simpleStorage.store(7) await transactionResponse.wait(1) const updatedValue = await simpleStorage.retrieve() console.log(`Updated value is ${updatedValue}`) } const verify = async (contractAddress, args) => { console.log("Verifying contract...") try { await run("verify:verify", { address: contractAddress, constructorArguments: args, }) } catch (err) { console.log(err) } } main() .then(() => process.exit(0)) .catch((err) => { console.log(err) process. Exit(1) })the corresponding response I get is as follows
Beta Was this translation helpful? Give feedback.
All reactions