You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The verification process fails when contract needs constructor arguments during verification.
I have deployed my contract using ether.js library. The verification process fails only for the contracts having constructor with arguments.
Contract Deployed using Ether.js:
let factory = new ethers.ContractFactory(contractABI, contractBytecode, wallet);
let contract = await factory.deploy(tokenSymbol, projectName, numOfTokens);
tokenSymbol, projectName, numOfTokens are the arguments for contract constructor
The same arguments I am passing while verification as that while deploying smart contract.
Output:
{
"status": false,
"message": "Fail - Unable to verify"
}
Contracts for reference:
0xa7a3373419dc09740a6D5c7c308230aB37581984 [Manually Verified with etherscan.io]
0x5Cb0832FA136486E15a2271E06f341c81f7d8602 [Fails to verify using sol-verifier]
I am sure this fails because of constructor arguments, because I tried one without arguments and it passed.
Thanks!
The text was updated successfully, but these errors were encountered:
I checked contract 0xa7a3373419dc09740a6D5c7c308230aB37581984 verified as a similar match. I see you defined constructor with function contractName() syntax which got deprecated in Solidity v0.5.0 by new constructor() syntax which was introduced in v0.4.22.
Although we will provide support for old syntax too. This will be fixed in upcoming release.
The verification process fails when contract needs constructor arguments during verification.
I have deployed my contract using ether.js library. The verification process fails only for the contracts having constructor with arguments.
Contract Deployed using Ether.js:
tokenSymbol, projectName, numOfTokens are the arguments for contract constructor
Inputs for sol-verifier:
The same arguments I am passing while verification as that while deploying smart contract.
Output:
Contracts for reference:
0xa7a3373419dc09740a6D5c7c308230aB37581984 [Manually Verified with etherscan.io]
0x5Cb0832FA136486E15a2271E06f341c81f7d8602 [Fails to verify using sol-verifier]
I am sure this fails because of constructor arguments, because I tried one without arguments and it passed.
Thanks!
The text was updated successfully, but these errors were encountered: