0

I understand that import your own code in smart contract effect it's gas price (you can find more here: Import in Solidity.. Does it affect the Gas?)

But what about already existing code?

Let's say I'm doing import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; that also has tone of dependencies. But there are already tone of deployed contracts that uses same code. Will I pay for deploying all this dependencies, too? Or it will has different price and use some reuse engine?

Thank you

3
  • 1
    U will pay gas. I think in solidity you can only use deployed external libraries if u want but it will probably just save some deployment gas but make each call then more expensive and it is also not a good idea. People lost millions cause of that.
    – Majd TL
    Oct 11 at 14:00
  • @MajdTL thank you for the answer Oct 11 at 14:30
  • medium.com/coinmonks/…
    – Majd TL
    Oct 11 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.