Verify ERC20 token on Etherscan with GitHub imports

hi there! we are having the same issue (Verify ERC20 token on Etherscan) in having the codes verified in etherscan. we are using the following OZ imports:

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.2.0/contracts/token/ERC20/ERC20Pausable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.2.0/contracts/token/ERC20/ERC20Burnable.sol";

Compiled the sol file in remix with optimisation. for version 0.6.12
Tried having it verified as single file but it prompted errors for the import files.

So do we need to flatten the code using truffle-flattener?

Thanks.

1 Like

Hi, we’re good now, We flattened the codes and it was verified without any problem.

Thanks.

1 Like

Hi @Cris,

Glad you were able to resolve.

This is the current best way to verify is as follows: Verify smart contract inheriting from OpenZeppelin Contracts

Yes, use the truffle-flattener.

1 Like