I think so too. And besides, I have another question about this kind of factory contract: How toVerify and Publishmy contract source code which was deployed by the factory contract?
I've tried once but fail to verify the source code. The error message is "Error! Unable to generate Contract ByteCode and ABI". And the source code is from the factory contract that I've deleted the part of the factory contract code.
Ropsten Testnet
My tested factory contract: 0x146a476ff24711a59922Db59DD623423487dE5FC
My tested stakingreward contract which was deployed from factory contract:0x579BE9901cAFe8314C3D594987A0E8823EA108Ed
Hi, @abcoathup
I’ve encountered an issue when I used a similar plugin like buidler called truffle-plugin-verify. While verifying the deployed contract, It fails to connect to Etherscan API at URL https://api-ropsten.etherscan.io/api.
So, there is a difference of API-KEYS between different network on ethereum? Can I use the same key to verify the contract?
Hi, @abcoathup
I’ve tried the example case on buidler and it did work to deploy a contract. But it still fails to request https://api-ropsten.etherscan.io/api with more error message “connect ETIMEDOUT” 31.13.90.33 while I used the buidler-etherscan plugin to verify the contract source code.
However, the status of this problem has a little different than the former way of truffle-plugin-verify that I can receive a report of API statistics.
Hi, @abcoathup
The configuration of mine is totally the same as you. I have no idea too.
According to the error message which I use “–show-stack-traces” to find, maybe there are some issues with the plugin of builder-etherscan. Or could you please have a look at the showed error messages?
Endpoint URL: https://api-ropsten.etherscan.io/api
Reason: request to https://api-ropsten.etherscan.io/api failed, reason: connect ETIMEDOUT 31.13.82.33:443
at verifyContract (C:\Users\Administrator\Desktop\test_buidler\node_modules\@nomiclabs\buidler-etherscan\src\etherscan\EtherscanService.ts:49:11)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at SimpleTaskDefinition.verify (C:\Users\Administrator\Desktop\test_buidler\node_modules\@nomiclabs\buidler-etherscan\src\index.ts:222:20)
at Environment._runTaskDefinition (C:\Users\Administrator\Desktop\test_buidler\node_modules\@nomiclabs\buidler\src\internal\core\runtime-environment.ts:203:14)
at main (C:\Users\Administrator\Desktop\test_buidler\node_modules\@nomiclabs\buidler\src\internal\cli\cli.ts:157:5)
Caused by: FetchError: request to https://api-ropsten.etherscan.io/api failed, reason: connect ETIMEDOUT 31.13.82.33:443
at ClientRequest.<anonymous> (C:\Users\Administrator\Desktop\test_buidler\node_modules\node-fetch\lib\index.js:1461:11)
at ClientRequest.emit (events.js:314:20)
at TLSSocket.socketErrorListener (_http_client.js:469:9)
at TLSSocket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:100:8)
at emitErrorCloseNT (internal/streams/destroy.js:68:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Hi, I’ve found where the issue is. It’s a problem of network port that the PC’s port of 443 had been disable. So I can’t access etherscan API with port 443. I’m using another pc to verify and I found that builder.dev has been replaced with hardhat.org. Maybe I should use the latest version of “@nomiclabs/hardhat-etherscan” to try the verification operation.
Sorry for reviving this one but I’d like to ask if you guys encountered an error such as this after running the npx buidler verify --network bscTest 0xf42186db970d2aca6de7c78119607ef8ef253463 --constructor-args arguments.js --show-stack-traces
An unexpected error occurred:
HardhatError: HH5: HardhatContext is not created.
I was able to verify the Factory contract but not the contract deployed by the factory.
It is the created contract by the factory. The address of the factory is 0x5F17cE4a9394A79b0e41ba514eC251fDd588C1C3 and it is verified successfully. I’m using BSC Testnet by the way.
the error seems like the hardhat can't find your contract content which you created.
what's your file structure? Do you have a factory.sol and target.sol which is goint to be created?
Maybe you can try to deploy and verify the target contract seperately.
Ah, I used Truffle when I deployed it so it is located in the ./contracts.
The JSON or ABI is in ./client/src/contracts folder
I think this usual for Truffle but not Hardhat
Hi,I meet the same issue here like
“Reason: request to https://api-rinkeby.etherscan.io/api failed, reason: connect ETIMEDOUT 66.220.151.20:443”
Could you tell me how to fix it? thx