Timeline for Child contract vs struct
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 24, 2021 at 3:49 | comment | added | kitta | What to know if using child contract going to be better in upgradability? Since data structure layout is not fixed to a single contract we could upgrade anything | |
Sep 13, 2016 at 16:51 | history | edited | Matthew Schmidt | CC BY-SA 3.0 |
Another reason to choose contracts.
|
Sep 13, 2016 at 16:49 | comment | added | Matthew Schmidt | In the current version Ethereum, there's no concurrent transactions (this is projected to change). Whether it's one contract or several, transactions still happen one at a time. Similarly, the same amount is stored whether in the same contract or multiple (overhead aside). After a certain level of complexity, individual contract starts to make sense. If each auction is its own contract, you'll have a much easier time working with the balances of users, for example. | |
Sep 13, 2016 at 4:41 | comment | added | Sergey Ilin | Is number of transactions and amount of data stored in the contract may affect the decision to use child contract or struct? Let say I have auction DApp where every item for sale would have a number of transactions related to it (bids, payment, shipping info added, etc). That DApp can be implemented with structs and a single contract. But in that case there will be a lot of transactions executing concurrently against that contract and storage for that contract will grow really fast. Child contract would allow isolate transactions and storage for sold item. | |
Sep 13, 2016 at 4:23 | vote | accept | Sergey Ilin | ||
Sep 11, 2016 at 20:04 | history | answered | Matthew Schmidt | CC BY-SA 3.0 |