Block Confirmations doubt #487
-
Could someone provide a more in depth explanation about why we need to wait 6 blocks confirmations(minute 10:57:50)? Code on hardhat.config.js networks: { then on 01-deploy-fund-me.js we access blockConfirmations parameter with: const fundMe = await deploy("FundMe", { Patrick said that this confirmation exists in order “to give Etherscan a chance to index our transaction”, but I kinda don’t get this. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
@igrs08 When we send our contract for verification, it sends as a transaction, and same as when we were storing a favorite number we were waiting for 1 block so we can confirm that either our number is updated or not. Same as this, for confirming on our side that whether our contract verified successfully or not we wait for here. Now, why 6 blocks? because etherscan takes more time than our local blockchain that's why we are waiting a bit long time so we can get correct results. |
Beta Was this translation helpful? Give feedback.
-
@ali-thegilfoyle Thanks for replaying! What can actually go wrong if we don't wait for the confirmation? |
Beta Was this translation helpful? Give feedback.
-
An this brings me another question. Why do we need to verify a contract? |
Beta Was this translation helpful? Give feedback.
-
Thanks guys! Very helpful! |
Beta Was this translation helpful? Give feedback.
@igrs08 When we send our contract for verification, it sends as a transaction, and same as when we were storing a favorite number we were waiting for 1 block so we can confirm that either our number is updated or not. Same as this, for confirming on our side that whether our contract verified successfully or not we wait for here. Now, why 6 blocks? because etherscan takes more time than our local blockchain that's why we are waiting a bit long time so we can get correct results.