How to verify multi-file ERC20 contract importing other files

Hi Everyone!

After deploying multiple iterations of my code to the testnet I finally took the plunge and created my first token on the main net but forgot to test out one crucial step - verifying the code on Etherscan.

I can’t seem to figure out how to submit my contract code to Etherscan for verification, any help would be greatly appreciated!!

The problem stems from me downloading the OpenZeppelin library rather than importing from git as I wanted to change some things such as the decimals.

Here is my code:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../extensions/ERC20Burnable.sol";

/** 
* OpenZeppelin Library used
* @dev {ERC20} token, including:
 * 
 *  - Preminted initial supply
 *  - No access control mechanism (for minting/pausing) and hence no governance
 *
 * This contract uses {ERC20Burnable} to include burn capabilities - head to
 * its documentation for details.
 *
 * 
 * 
 * 
 */

contract ELIXR is ERC20Burnable {
    /**
     * @dev Mints `initialSupply` amount of token and transfers them to `owner`.
     *
     * See {ERC20-constructor}.
     */
    constructor(
        string memory name,
        string memory symbol,
        uint256 initialSupply,
        address owner
    ) ERC20(name, symbol) {
        _mint(owner, initialSupply);
    }
}

However, an error always comes up due to importing of ERC20Burnable.sol, and subsequently all the files that ERC20Burnable imports (ERC20, Context, etc.).

Is there any way to downlaod all the files together or flatten them to verify to etherscan?

Thanks!

:cry: This is not how you're supposed to use the library. From the documentation:

The defaut value of decimals is 18. To select a different value for decimals you should overload it.


How have you deployed this contract? Did you use Remix or Hardhat. See these guides:


PS: Please use triple backticks to surround your code in order to get proper formatting.

```
code here
```