-
Notifications
You must be signed in to change notification settings - Fork 11
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
Deploy Polygon Amoy, drop Mumbai #492
Conversation
03e5382
to
e3e66a3
Compare
filecoin: "0x59EF8Bf2d6c102B4c42AEf9189e1a9F0ABfD652d", | ||
// testnets | ||
sepolia: "0xc50C62498448ACc8dBdE43DA77f8D5D2E2c7597D", | ||
"optimism-sepolia": "0x68A2f4423ad3bf5139Db563CF3bC80aA09ed7079", | ||
"arbitrum-sepolia": "0x223A74B8323914afDC3ff1e5005564dC17231d6e", | ||
maticmum: "0x4b48841d4b32C4650E4ABc117A03FE8B51f38F68", | ||
"polygon-amoy": "0x170fb206132b693e38adFc8727dCfa303546Cec1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @avichalp
hardhat.config.ts
Outdated
chainId: 80002, | ||
urls: { | ||
apiURL: | ||
"https://www.oklink.com/api/explorer/v1/polygonamoy/contract/verify/async", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i found this on some SO issue... might not be right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, yeah should be https://www.oklink.com/api/v5/explorer/contract/verify-source-code-plugin/AMOY_TESTNET
. still can't get it to work tho:
Verifying on 'polygon-amoy'...
Verifying implementation: 0x3BDC3E46d8de7A2e67A07Ac917382dB6D94577dc
Successfully submitted source code for contract
contracts/TablelandTables.sol:TablelandTables at 0x3BDC3E46d8de7A2e67A07Ac917382dB6D94577dc
for verification on the block explorer. Waiting for verification result...
We tried verifying your contract TablelandTables without including any unrelated one, but it failed.
Trying again with the full solc input used to compile and deploy it.
This means that unrelated contracts may be displayed on Etherscan...
Successfully submitted source code for contract
contracts/TablelandTables.sol:TablelandTables at 0x3BDC3E46d8de7A2e67A07Ac917382dB6D94577dc
for verification on the block explorer. Waiting for verification result...
Failed to verify implementation contract at 0x3BDC3E46d8de7A2e67A07Ac917382dB6D94577dc: The contract verification failed.
Reason: Fail - Unable to verify
Verifying proxy: 0x170fb206132b693e38adFc8727dCfa303546Cec1
Error: Etherscan API call failed with status 500, response: {"code":"50026","msg":"System error, please try again later.","data":[]}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, 500 error should mean it's an error on oklink's side, but who knows. is the browserUrl
correct?
did you by change compile some changes after deploying? NomicFoundation/hardhat#1349 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be worth doing a fresh build, deploy, and verify to make sure something weird didn't happen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, i didn't change the hardhat compiler version or any of the build settings, so i don't think it's that. but, if i change the compiler version to 0.8.20 and try to verify, it confirms that 0.8.19 is the correct version for the contract i deployed:
The contract you want to verify was compiled with solidity 0.8.19, but your configured compiler version is: 0.8.20.
based on the polygon discord, others are having the same issue with oklink. however, the polygon team noted polygonscan will be supporting amoy within the next 2-3 weeks, so it's probably a moot point.
edit: i tried rebuilding/deploying/verifying a new contract w/ my personal wallet. same result, couldn't verify
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool. sg!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iPaulPro ahh nice, thanks. much better, will add
Summary
Adds a new utility function to get live gas prices for Amoy and deploys new registry contracts there. Also, drops Mumbai.
Details
For some reason, ethers' built-in method
getFeeData
(which makes a call to get gas prices from a node) returns absurdly wrong data for Amoy. E.g.,maxFeePerGas
of1000000030n
andmaxPriorityFeePerGas
of1000000000n
—but in reality, these are 30x larger at35185714305n
and35185714290n
, respectively. Thus, an API call to the gas station is required. Note: there is a built-in custom gas fee class in ethers, but I couldn't figure out how to use it.How it was tested
Deploying on live net.
Checklist: