Skip to content
Discussion options

You must be logged in to vote

This one almost always comes down to constructor args encoding or compiler metadata, not Basescan being flaky.

A few things to check in order of likelihood:

1. Constructor args encoding — cast abi-encode with the word constructor in the signature is wrong. Drop it:

cast abi-encode "f(address,string,string,address)" 0xUSDC... "Vault" "vTKN" 0xFEE...

The function name doesn't matter (Foundry ignores it), but constructor(...) can trip up some versions. If you want to be safe, just pass the raw hex directly with --constructor-args-path.

2. Metadata hash mismatch — even if the optimizer settings match, Solidity appends a CBOR-encoded metadata hash at the end of the bytecode. If anything differ…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sigittt1998
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants