Skip to content
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

hardhat-etherscan fails contract verification on fantom testnet #2209

Closed
0xfornax opened this issue Jan 3, 2022 · 13 comments
Closed

hardhat-etherscan fails contract verification on fantom testnet #2209

0xfornax opened this issue Jan 3, 2022 · 13 comments
Assignees

Comments

@0xfornax
Copy link

0xfornax commented Jan 3, 2022

I'm running into the following issue when trying to verify any contract code on testnet.ftmscan.com using the etherscan plugin. I found users with the same issue on Discord, but couldn't find any solution there. I'm 100% sure I'm using the same commit deployed when trying to verify, and this process works smoothly when I try it on rinkeby.

npx hardhat verify --network fantomtestnet "<deployed_address>" ""
Nothing to compile
No need to generate any newer typings.
Compiling 1 file with 0.8.9
Successfully submitted source code for contract
contracts/XYZ at <deployed_address>
for verification on Etherscan. Waiting for verification result...

We tried verifying your contract XYZ 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/XYZ at <deployed_address>
for verification on Etherscan. Waiting for verification result...

Error in plugin @nomiclabs/hardhat-etherscan: The contract verification failed.
Reason: Fail - Unable to verify

@gianlucamazza
Copy link

Same problem here, I'm not capable to verify contracts.

@anh194
Copy link

anh194 commented Jan 10, 2022

I have exact same issue, but on Mumbai Polygon.

Any import will result to Reason: Fail - Unable to verify

@seacloud9
Copy link

seacloud9 commented Jan 11, 2022

I am having the same issue here on Mumbai Polygon. I think it could be having issues returning and I think a catch might be missing within the contract because when

it("It should deploy the contract, mint a token, and resolve to the right URI", async function() {
    const NFT = await ethers.getContractFactory("MyNFT");
    const nft = await NFT.deploy();
    const URI = "ipfs://Qmc3uT4LgSrgcF8CkRJtyE8VRkLV2a4zvDpXbFy8DEdBiG";
   //fails below
    await nft.deployed();


    await nft.mint("0x6085923b251E60d54DA40EEcCF98380c37fE462C", URI)
    expect(await nft.tokenURI(1)).to.equal(URI)
  });

When I jump into deployed it looks like this call is failing also I noticed that the compiled typescript doesn't catch this failed promise

this._deployedPromise = this.deployTransaction.wait().then(function () {                    return _this;
                })        

@dantepippi
Copy link

Same problem here trying to verify on testnet.ftmscan.com
Can verify rinkeby contracts but not on other networks (like fantom)

@alcuadrado
Copy link
Member

There's a known issue with ftmscan.com. The etherscan/ftmscan team is already aware of this and deployed a patch. It may take some time to stabilize.

@seacloud9
Copy link

@alcuadrado updated some packages today but still ran into the same issue. I think this issue is probably affecting your current issue log it looks to me like these:

#2208
#2248
#2247

Might all be related. Also, I would like to suggest more robust error handling might help to communicate to devs more about the issue if they run into it. I will have more time over the weekend happy to take a look and possibly suggest some changes.

@emretepedev
Copy link
Contributor

Same problem here.

@drinkius
Copy link

Still issues with Fantom testnet

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2022

This issue was marked as stale because it didn't have any activity in the last 30 days. If you think it's still relevant, please leave a comment indicating so. Otherwise, it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jun 3, 2022
@0xFluffyBeard
Copy link

Same here. Fuji works fine, but FTM Testnet does not.

@github-actions github-actions bot removed the Stale label Jun 6, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2022

This issue was marked as stale because it didn't have any activity in the last 30 days. If you think it's still relevant, please leave a comment indicating so. Otherwise, it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jul 6, 2022
@github-actions
Copy link
Contributor

This issue was closed because it has been stalled for 7 days with no activity.

@aelmanaa
Copy link

aelmanaa commented Aug 1, 2022

etherscan/ftmscan

Hello @alcuadrado

can you please link the issue at etherscan/ftmscan ?

thanks a lot

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests