-
Notifications
You must be signed in to change notification settings - Fork 298
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
fails to verify on testnet.ftmscan.com #527
Comments
can you provide the metadata of src/ERC20/SimpleERC20.sol:SimpleERC20 |
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "hardhat-deploy/solc_0.8/proxy/Proxied.sol";
import "./ERC20Base.sol";
import {ALib} from "./ALib.sol";
contract SimpleERC20 is ERC20Base, Proxied {
constructor(address to, uint256 amount) {
postUpgrade(to, amount);
}
function postUpgrade(address to, uint256 amount) public proxied {
_mint(to, amount);
}
function a() public pure returns (uint256) {
ALib.a();
}
string public constant symbol = "SIMPLE";
function name() public pure override returns (string memory) {
return "Simple ERC20";
}
} deployments/fantom_test/SimpleERC20.json
deployments/fantom_test/SimpleERC20_Proxy.json
deployments/fantom_test/SimpleERC20_Implementation.json
|
hmm I can see the libraries field set correctly can you run verify with |
I didn't modify any output, but the "apikey": "XXXXXX" displayed here is also written in your source code, in the logError function.
|
|
etherscan_requests/fantom_test/SimpleERC20_Implementation.formdata
|
description
When I use an external library, I can deploy a script to link the contract with the external library and deploy it successfully. But it fails when verifying the contract. It should be noted that when I do not use an external library, the verification All are successful.
console error log
yarn verify fantom_test
yarn run v1.22.19
warning ../../../package.json: No license field
$ node ./_scripts.js verify fantom_test
verifying ALib (0x55C78657394CF27632B9C528B0bd2e62F3006FfF) ...
waiting for result...
=> contract ALib is now verified
already verified: GreetingsRegistry (0x11b070f32C76Cb589F24Bb15b06eC8C027E65ed0), skipping.
already verified: SimpleERC20 (0x739D5cddEeDe5e6404aC5a4de657B8F30760be32), skipping.
verifying SimpleERC20_Implementation (0xBe8a575Dc4fE3D036000883Fed49875C5ed177A6) ...
waiting for result...
Failed to verify contract SimpleERC20_Implementation: NOTOK, Fail - Unable to verify. Please check for missing Library or invalid name (i.e names are case senstive). Library was required but suitable match not found
{
"apikey": "XXXXXX",
"module": "contract",
"action": "verifysourcecode",
"contractaddress": "0xBe8a575Dc4fE3D036000883Fed49875C5ed177A6",
"sourceCode": "...",
"codeformat": "solidity-standard-json-input",
"contractname": "src/ERC20/SimpleERC20.sol:SimpleERC20",
"compilerversion": "v0.8.17+commit.8df45f5f",
"constructorArguements": "000000000000000000000000aa2a4abfc4c97c390b4d933fd45df10ad5151c2b0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000",
"licenseType": 3
}
Etherscan sometime fails to verify when only metadata sources are given. See ethereum/solidity#9573. You can add the option --solc-input to try with full solc-input sources. This will include all contract source in the etherscan result, even the one not relevant to the contract being verified
already verified: SimpleERC20_Proxy (0x739D5cddEeDe5e6404aC5a4de657B8F30760be32), skipping.
✨ Done in 27.11s.
The text was updated successfully, but these errors were encountered: