Skip to main content
10 events
when toggle format what by license comment
Jul 3, 2017 at 6:13 history bounty awarded Juan Ignacio Pérez Sacristán
Jul 3, 2017 at 6:13 vote accept Juan Ignacio Pérez Sacristán
Jun 28, 2017 at 22:29 comment added Ismael 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.
Jun 28, 2017 at 22:26 comment added Ismael @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.
Jun 28, 2017 at 21:15 comment added Juan Ignacio Pérez Sacristán How are these contracts linked? As libraries? Or by inheritance? My code is using inheritance as well, and it requires too much gas, making it impossible to deploy.
Jun 28, 2017 at 18:00 comment added Ismael @JuanIgnacioPérezSacristán I've updated with an example
Jun 28, 2017 at 18:00 history edited Ismael CC BY-SA 3.0
Add an example how to split a contract
Jun 28, 2017 at 15:58 comment added Jeff Coleman 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.
Jun 28, 2017 at 14:56 comment added Juan Ignacio Pérez Sacristán I tried it, but splitting the contract using include commands does not reduce the total gas cost of deployment.
Jun 24, 2017 at 16:12 history answered Ismael CC BY-SA 3.0