Невозможно проверить контракт токена, унаследованный от OpenZeppelin, с помощью hardhat-etherscan

Код контракта:

      //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract KwnToken is ERC20 {
  constructor(uint totalSupply) ERC20('KWN', 'KwnToken') {
    uint amount = totalSupply * 10 ** decimals();
    _mint(_msgSender(), amount);
  }
}

Развернут в Goerli 0x1be5ccde92e839c1cdbefd02045830855257a152

Пытаюсь проверить:

      npx hardhat verify --network goerli --contract contracts/KwnToken.sol:KwnToken 0x1be5ccde92e839c1cdbefd02045830855257a152 100
Compiling 7 files with 0.8.0
Compilation finished successfully
Compiling 1 file with 0.8.0
Successfully submitted source code for contract
contracts/KwnToken.sol:KwnToken at 0x1be5ccde92e839c1cdbefd02045830855257a152
for verification on Etherscan. Waiting for verification result...

We tried verifying your contract KwnToken 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/KwnToken.sol:KwnToken at 0x1be5ccde92e839c1cdbefd02045830855257a152
for verification on Etherscan. Waiting for verification result...

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

For more info run Hardhat with --show-stack-traces

Какие-либо предложения?

0 ответов

Другие вопросы по тегам