# Is this way of simplifying imports correct?

**URL:** <https://forum.openzeppelin.com/t/is-this-way-of-simplifying-imports-correct/36201>\
**Category:** Contracts\
**Tags:** erc20\
**Created:** [May 14, 2023, 1:18pm UTC](https://forum.openzeppelin.com/t/is-this-way-of-simplifying-imports-correct/36201 "2023-05-14T13:18:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tempe-techie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/tempe-techie/32/18525_2.png) [@tempe-techie](https://forum.openzeppelin.com/u/tempe-techie)\
**Post date:** [May 14, 2023, 1:18pm UTC](https://forum.openzeppelin.com/t/is-this-way-of-simplifying-imports-correct/36201/1 "2023-05-14T13:18:56Z")

</div>

Hi, instead of writing import statements like this:

```auto
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { ERC20Burnable } from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import { ERC20Permit } from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol";
import { ERC20Votes } from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

contract MyToken is ERC20, ERC20Burnable, Ownable, ERC20Permit, ERC20Votes {

```

I decided to simplify it like this:

```auto
import { ERC20, ERC20Burnable } from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import { ERC20Votes, ERC20Permit } from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

contract MyToken is ERC20Burnable, Ownable, ERC20Votes {

```

My questions are:

1. Is it okay to do it like this, or does this cause some unwanted consequences?
2. AFAIK the order of placing extensions matters. In my case I put the ERC20Votes in the last place (`is ERC20Burnable, Ownable, ERC20Votes`). Is that correct? Or should it be placed somewhere else, for example in the first place (`is ERC20Votes, ERC20Burnable, Ownable`)?

Thanks!

---

<div class="post-metadata">

**Author:** ![ernestognw](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ernestognw/32/18576_2.png) [@ernestognw](https://forum.openzeppelin.com/u/ernestognw)\
**Post date:** [May 16, 2023, 6:08pm UTC](https://forum.openzeppelin.com/t/is-this-way-of-simplifying-imports-correct/36201/2 "2023-05-16T18:08:29Z")

</div>

Hello @tempe-techie,

At first sight, it's difficult to tell if there are unexpected consequences on your smart contract. This is basically because of the way Solidity linearizes the inheritance graph based on the order you defined the inherited contracts.

I recommend you going through the [Multiple Inheritance and Linearization](https://docs.soliditylang.org/en/latest/contracts.html#multiple-inheritance-and-linearization) section of the Solidity docs.

The TLDR is that the order of execution of functions implemented by multiple inherited contracts will follow a right-to-left order in the contract declaration (`contract Foo is <Leftmost>, ..., <Rightmost>`), so as long as you don't have to disambiguate between functions using `function Bar() ... override(A, B)`, both options you presented are likely to be equivalent.

Hope this helps!
