Cyfrin / foundry-smart-contract-lottery-cu

47 stars 38 forks source link

Verification for Raffle contract failed #12

Closed iafhurtado closed 1 year ago

iafhurtado commented 1 year ago

I made it all the way to deploy everything in Sepolia but the Raffle.sol contract failed to be verified giving me the following error:

`ONCHAIN EXECUTION COMPLETE & SUCCESSFUL. Total Paid: 0.004706793012551448 ETH (1568931 gas * avg 3.000000008 gwei)

Start verification for (2) contracts Start verifying contract 0xfaeff20e995872ec1fb48924a5cf9ab5cf2ef6b9 deployed on sepolia

Submitting verification for [lib/foundry-devops/src/DevOpsTools.sol:DevOpsTools] "0xfAEff20e995872eC1Fb48924A5cf9aB5cf2Ef6B9".

Submitting verification for [lib/foundry-devops/src/DevOpsTools.sol:DevOpsTools] "0xfAEff20e995872eC1Fb48924A5cf9aB5cf2Ef6B9".

Submitting verification for [lib/foundry-devops/src/DevOpsTools.sol:DevOpsTools] "0xfAEff20e995872eC1Fb48924A5cf9aB5cf2Ef6B9". Submitted contract for verification: Response: OK GUID: hew5lfyskvkq9942twz6swcmtwpkfwp6ztcpuytzwppfqleae1 URL: https://sepolia.etherscan.io/address/0xfaeff20e995872ec1fb48924a5cf9ab5cf2ef6b9 Contract verification status: Response: NOTOK Details: Pending in queue Contract verification status: Response: NOTOK Details: Other Exception - Please contact us for more information. Contract failed to verify. make: *** [Makefile:43: deploy] Error 1`

How can I verify the contract easiest, either directly from Foundry or in Etherscan directly?

PatrickAlphaC commented 1 year ago

Yep! If the foundry auto-verify doesn't work, you'lll have to use the manual verify.

https://book.getfoundry.sh/forge/deploying?highlight=verifi#verifying-a-pre-existing-contract

It's waayyyy harder to do it on the etherscan website.

ungureanuu commented 1 year ago

hi afhurtado, did u managed to manually verify the contract? I m stuck at passing the contructor args for the extended VRFConsumerBaseV2

ungureanuu commented 1 year ago

upaded the solidity to 0.8.21 - verification is done now. Saw that Patrick used 0.8.18 in the tutorial and there also the verification was made. Maybe there is a bug in 0.8.19 ?