I am trying to Verify and Publish my source code on Etherscan for my token but I am having issues with the ABI Encode and I can’t solve it. I get the error:
Error! Unable to generate Contract ByteCode and ABI Found the following ContractName(s) in source code : Context, ERC20, IERC20, IERC20Metadata, ShahToken But we were unable to locate a matching bytecode (err_code_2)
Compiler Version: v0.8.5+commit.a4f2e591 Optimization Enabled: True Runs: 200
Etherscan does have an article on how to solve this issue ( https://info.etherscan.com/determine-correct-constructor-argument-during-source-code-verification-on-etherscan/ ) but I’m still having trouble resolving my issue. I also tried sites like https://abi.hashex.org/ to help me but unfortunately, it did not work out for me in the end. Here is a Github of the files I am using it includes the JSON version of the ABI https://github.com/catchingwaleed/JSON-ABI-For-smart-contract/tree/main . The source code I am using to Verify and Publish is “ShahToken_flat.sol”. I will also include the transaction of the token so that the input data can be seen https://goerli.etherscan.io/tx/0x84b67ab31d1aacd2b7dd6a7b0192145b7d6108477f25c3f78628c1ca5eaefa14 . It would be highly appreciated if I was given the ABI Encoded rather than a link to a solution of how to do it.
Used Remix IDE (Already checked with compiler everything works there)
Token is ERC20 based