[Application Development] Help with Sepolia and Verification and Hardhat #369
Unanswered
randyarrowood
asked this question in
Application Development
Replies: 1 comment
-
It's not https://sepolia.optimism.io/api It is https://api-sepolia-optimistic.etherscan.io/api
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Did you check the documentation?
Did you check for duplicate questions?
Issue Description
Be gentle... new-ish to deploying smart contracts to ERC-20 networks. I'm trying my first Optimism contract and it deployed just fine (https://sepolia-optimistic.etherscan.io/token/0xa7FC278d909d527358ce9A2872872558E139Af40). I'm trying to verify the contract and running into trouble. I'm using hardhat to develop and launch and in the config, I have the following for the custom chain in etherscan:
I can't seem to hit that apiURL directly either... is there a better URL to use for OP sepolia?
Without that working, I tried to manually verify on https://sepolia-optimism.etherscan.io/ using the flattened Solidity code and when I do, I get the following error:
Error! Unable to generate Contract Bytecode and ABI
Found the following ContractName(s) in source code : BLACKOPS, Context, ERC20, IERC1155Errors, IERC20, IERC20Errors, IERC20Metadata, IERC721Errors, Ownable
But we were unable to locate a matching bytecode (err_code_2)
If you look at the next part, they seem identical except for the first line...
Compiler Version: v0.8.24+commit.e11b9ed9
Optimization Enabled: False
Runs: 200
Bytecode (what we are looking for):
60806040526a52b7d2dcc80cd2e...
We tried looking for a match from the list of compiled contract bytecode outputs (as listed below), but was unable to find an exact match.
60806040526a52b7d2dcc80cd2e...
Any ideas why my hardhat-built contract has the "1) BLACKOPS" as the first line? The big string of bytecode is identical.
Additional Information
NooB here... be gentle
Feedback
Possibly clarify if the public RPC here should work for contract verification: https://docs.optimism.io/chain/networks
Beta Was this translation helpful? Give feedback.
All reactions