# Unable to Verify Contract Using Hardhat/PolygonScan

**URL:** <https://forum.openzeppelin.com/t/unable-to-verify-contract-using-hardhat-polygonscan/27329>\
**Category:** Smart Contracts\
**Tags:** hardhat, erc1155, etherscan-verify\
**Created:** [April 7, 2022, 7:11pm UTC](https://forum.openzeppelin.com/t/unable-to-verify-contract-using-hardhat-polygonscan/27329 "2022-04-07T19:11:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![caio\_Henrique](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/caio_henrique/32/12935_2.png) [@caio\_Henrique](https://forum.openzeppelin.com/u/caio_Henrique)\
**Post date:** [April 7, 2022, 7:11pm UTC](https://forum.openzeppelin.com/t/unable-to-verify-contract-using-hardhat-polygonscan/27329/1 "2022-04-07T19:11:23Z")

</div>

# Unable to Verify Contracts On PolygonScan

There has been an issue when I am trying to verify two smart contracts using hardhat and polygonscan itself. I will summarize both my attempts below and at the end I will ask for help.

## Unable to Verify Contract Through Hardhat

Error:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/6/61b027b1c8d70deebac276a943112caa6b1f8b79.png)

I ran: `npx hardhat verify --network polygon 0x39652163c7C1BEe9E00dF3c4ce0292F52bEb1815 --constructor-args argsBC.js`

All arguments are the same ones used when deploying the contracts.

## Unable to Verify Contract Manually

I went on Polygoscan and tried verifying it by hand. It gives me an error due to the openzeppelin imports. I then flattened it and tried again.

Error:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/f/f5033cfd8d88503f9e387f09a5a7ce4405d747b4.png)

I compared the bytecode expected with the bytecode of the BaseContract in a text comparing tool online and they're exactly the same. I don't know why polygoscan up there says they have compared the expected with all below and they all mismatch.

### Question

I would like to receive help on identifying what is the problem that is avoinding this contract to be verified.
