# How can I make an ERC20 both Burnable and Detailed?

**URL:** <https://forum.openzeppelin.com/t/how-can-i-make-an-erc20-both-burnable-and-detailed/2505>\
**Category:** Contracts\
**Tags:** erc20\
**Created:** [March 22, 2020, 12:40pm UTC](https://forum.openzeppelin.com/t/how-can-i-make-an-erc20-both-burnable-and-detailed/2505 "2020-03-22T12:40:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lennard\_Mulder](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/lennard_mulder/32/1920_2.png) [@Lennard\_Mulder](https://forum.openzeppelin.com/u/Lennard_Mulder)\
**Post date:** [March 22, 2020, 12:40pm UTC](https://forum.openzeppelin.com/t/how-can-i-make-an-erc20-both-burnable-and-detailed/2505/1 "2020-03-22T12:40:48Z")

</div>

I’m trying to build a token with its ticker, name, and decimals specified, while also being burnable. I’m importing ERC20Detailed and ERC20Burnable. But my Remix compiler throws:

`browser/GGCoin.sol:4:1: DeclarationError: Identifier already declared. import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v2.5.0/contracts/token/ERC20/ERC20Burnable.sol"; ^--------------------------------------------------------------------------------------------------------------------------^ https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/IERC20.sol:7:1: The previous declaration is here: interface IERC20 { ^ (Relevant source part starts here and spans across multiple lines).`

I suspect this is because both ERC20Detailed and ERC20Burnable are inheriting from IERC20.

**💻 Environment**  
Remix IDE  
OpenZeppelin Contracts v2.5.0  
Solidity 0.5.0

**🔢 Code to reproduce**

```auto
    pragma solidity ^0.5.0;

    import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20Detailed.sol";
    import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v2.5.0/contracts/token/ERC20/ERC20Burnable.sol";

    contract GGCoin is ERC20Burnable, ERC20Detailed {
        
        address owner;
        
        constructor () public ERC20Detailed("GGCoin", "GGC", 2) {
            _mint(msg.sender, 100000);
            owner = msg.sender;
        }
        
        function mint(uint256 amount) public {
            require(msg.sender == owner);
            _mint(msg.sender, amount);
        }
        
    }

```

Is it possible to inherit from both ERC20Detailed and ERC20Burnable, without getting this error? Maybe I have to call the constructor differently?

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [March 23, 2020, 9:09am UTC](https://forum.openzeppelin.com/t/how-can-i-make-an-erc20-both-burnable-and-detailed/2505/2 "2020-03-23T09:09:51Z")

</div>

Hi @Lennard_Mulder,

Welcome to the community 👋

It is definitely possible to inherit from ERC20Detailed and ERC20Burnable. (You could also inherit from [ERC20Mintable](https://docs.openzeppelin.com/contracts/2.x/api/token/erc20#ERC20Mintable)).

Using [Deploy a simple ERC20 token in Remix](https://forum.openzeppelin.com/t/deploy-a-simple-erc20-token-in-remix/1203) as a basis.

A simple token that is burnable could be as follows:

⚠ Please note this code hasn’t been tested or audited

```auto
pragma solidity ^0.5.0;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20Detailed.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20Burnable.sol";

contract Token is ERC20, ERC20Detailed, ERC20Burnable {

    constructor () public ERC20Detailed("Token", "TKN", 18) {
        _mint(msg.sender, 1000000 * (10 ** uint256(decimals())));
    }
}

```

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [March 29, 2020, 11:18pm UTC](https://forum.openzeppelin.com/t/how-can-i-make-an-erc20-both-burnable-and-detailed/2505/3 "2020-03-29T23:18:18Z")

</div>

Hi @Lennard_Mulder,

Just wanted to check how you got on with creating a burnable and detailed ERC20?
