Content pfp
Content
@
0 reply
0 recast
0 reaction

andrei pfp
andrei
@andreitr.eth
Solidity devs. I am having a hard time verifying a smart contract on BASE via forge verify-contract. I am getting "Etherscan could not detect the deployment" event though the contract is deployed: 0x7822465cD6F5A553F464F82ADA1b2ea33bCB2634 Ideas? https://github.com/andreitr/basedbits/blob/main/src/BBitsCheckIn.sol
4 replies
0 recast
2 reactions

Stephen Caudill pfp
Stephen Caudill
@mrmemes.eth
Your verification invocation should look something like: forge verify-contract 0x7822465cD6F5A553F464F82ADA1b2ea33bCB2634 BBitsCheckIn --watch --chain 8453 --compiler-version VERS --optimizer-runs RUNS --etherscan-api-key KEY --constructor-args $(cast abi-encode "constructor(address,address) ADDR_ONE ADDR_TWO)
1 reply
0 recast
0 reaction

Stephen Caudill pfp
Stephen Caudill
@mrmemes.eth
You may not need to specify compiler version or optimizer runs depending on your deploy settings and if you cached your broadcast (there would be a broadcast directory where you deployed from locally). Your error message makes it sound like the order of the arguments might be wrong, check that.
1 reply
0 recast
0 reaction

Stephen Caudill pfp
Stephen Caudill
@mrmemes.eth
Other than that make sure you have your constructor arguments in the right order. Feel free to HMU if that doesn't get it.
2 replies
0 recast
1 reaction

andrei pfp
andrei
@andreitr.eth
still no luck. I am even passing the "--verifier-url https://api.basescan.org/api" to make sure compiler is pointing to the right place. Also, tried deploying a different contract and getting the same result. I wonder if something is screwed up in my environment...
1 reply
0 recast
0 reaction

Stephen Caudill pfp
Stephen Caudill
@mrmemes.eth
Hmm, if you send me the addresses used in the constructor and your compiler version I can give it a whirl. Also: sometimes foundry just gets in a bad state and you should run foundryup to get the latest. There’s also a telegram support group for foundry that might be helpful.
1 reply
0 recast
0 reaction

andrei pfp
andrei
@andreitr.eth
here are the constructor agrs I am using - the based bits collection + dev wallet. I reloaded foundry but it still didn't work. Thanks for your help! 0x617978b8af11570c2dab7c39163a8bde1d282407 0x4FCfb1b0A8B44fE0A7c0DcfA4EF36d48d758C64D
1 reply
0 recast
0 reaction

Stephen Caudill pfp
Stephen Caudill
@mrmemes.eth
this worked for me: forge verify-contract 0x7822465cD6F5A553F464F82ADA1b2ea33bCB2634 src/BBitsCheckIn.sol:BBitsCheckIn --watch --chain 8453 --constructor-args $(cast abi-encode "constructor(address,address)" 0x617978b8af11570c2dab7c39163a8bde1d282407 0x4FCfb1b0A8B44fE0A7c0DcfA4EF36d48d758C64D) --compiler-version 0.8.25
2 replies
0 recast
1 reaction

Angel - Not A Bot pfp
Angel - Not A Bot
@sayangel
Forgot my allowance got nuked with my last cast lol 150 $degen!
0 reply
0 recast
1 reaction