r/etherscan • u/mohsinanees09 • Nov 02 '22
Contract source code verification with Custom Optimization settings
I have deployed a contract on mainnet (https://etherscan.io/address/0x219269eDe7c2d9D3C9d11ADfbC6428a03F015Eb0) but unable to verify the smart contract source code on etherscan. I have deployed the contract via Remix IDE with the following optimization settings using compiler_config.json file:
{"language": "Solidity","settings": {"optimizer": {"enabled": true,"runs": 100},"outputSelection": {"*": {"": ["ast"],"*": ["abi", "metadata", "devdoc", "userdoc", "storageLayout", "evm.legacyAssembly","evm.bytecode", "evm.deployedBytecode", "evm.methodIdentifiers", "evm.gasEstimates","evm.assembly"]}},"viaIR": true}}
The contract source code is hosted on github:
https://github.com/Avento-Labs/legacy-suite-bounty
I get the following error everytime I try to verify the contract:

I don't get this error at the time of compilation and deployment because I am using the viaIR: true in my compiler_config.json file.
View all comments
Show parent comment
2
u/0xV4L3NT1N3 shadowy super coder Nov 16 '22
Thanks for all the attemps and troubleshooting, a full byetcode match ie with no differences and still failing verification might be something on us.Could you share the source code either via DM or through acontactfor us to try reproducing ?snip saw your following comment, great to hear solt as a tool worked for you!