-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to verify contracts on Polygon Amoy #7733
Comments
The first link is incorrect here https://github.com/alloy-rs/chains/blob/14af647606c6945f433252ed96cd47397771e6ba/src/named.rs#L783 I don't know what the API endpoint should be for OKLink, and also I don't think it will work until #7586 |
Closing in favor of #7724 |
currently, the amoy testnet is hosted by OKLINK, so the API url is different. |
you may refer to the doc: https://www.oklink.com/docs/zh/#explorer-rpc-api-contract-verifysourcecode |
emm, the API url should be https://www.oklink.com/api/v5/explorer/AMOY_TESTNET/api/contract/verifysourcecode |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (844caa8 2024-04-20T00:16:40.844544000Z)
What command(s) is the bug in?
forge verify-contract --chain polygon-amoy 0xbc4fa1a123ab3afcc803a87e7321f200db7e4ca8 src/MyContract.sol:MyContract
Operating System
macOS (Apple Silicon)
Describe the bug
I am struggling to verify my contracts with etherscan (polygonscan) for amoy contracts I've deployed.
As I execute the verify-contract command, I get a HTML output like this:
2024-04-20T01:16:29.863704Z ERROR etherscan: Failed to deserialize response: expected value at line 1 column 1 res="
<!DOCTYPE html><html lang=\"en-US\"><head><title>Just a moment...</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\"><meta name=\"robots\" content=\"noindex,nofollow\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><style>*{box-. ... A LOT MORE ... ogU);}}document.getElementsByTagName('head')[0].appendChild(cpo);}());</script></body></html>
Searching for similar issues here from last year, I found something saying we should add a question mark to the end of API URL. I tried this, but no luck.
My foundry.toml has:
polygon-amoy = {key = "XXXX73KYHBHRN6WTWQ844P97TM9MJKSZ6B" }
Thoughts?
The text was updated successfully, but these errors were encountered: