Hello everybody,
I am puzzled by something I noticed something I can not understand.
I am trying to deploy a simple nft contract using remix. When I do the import in the file deployment cost me 400$ of gas. However to make the verification easier I tried to flatten the file using truffle-flattener mycontract.sol. Now if I try to deploy the output of truffle flattener it is costing me 2000$ of gas.
My code at origin was just:
pragma solidity >=0.7.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract NFT_test is ERC721Enumerable, Ownable {
...
...
}
and the flatten version is the same with all the openzepplin code at the place of the import...
I am a bit confused am I doing something wrong ?
Best and thanks in advance,
J