Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • I tried it, but splitting the contract using include commands does not reduce the total gas cost of deployment. Commented Jun 28, 2017 at 14:56
  • 1
    Using include does not split the contract. That is just an instruction to the compiler to put all of those things together into one contract. Commented Jun 28, 2017 at 15:58
  • @JuanIgnacioPérezSacristán I've updated with an example Commented Jun 28, 2017 at 18:00
  • 1
    @JuanIgnacioPérezSacristán Inheritance will pull all the code together. You have to split into separate contracts so each can be deployed independently. Look at status ico github.com/status-im/status-network-token, they have separate contracts and a script that will deploy them, and set the initial configuration. They use truffle, that make really easy to deploy several contracts, and configure them. Commented Jun 28, 2017 at 22:26
  • 1
    Sometimes make for sense to use libraries if the code can be reused, like in SafeMath for example. Because libraries use the same shared data. If the contracts are separated then they can only access the data through the public methods. Commented Jun 28, 2017 at 22:29