2

From what I understand, code is deduplicated on the Ethereum blockchain by storing pointers in new blocks to blocks containing code that is being reused in the new block.

If that's the case:

  1. Is it better to store a new instance of a contract for each set of data (for example, information about a user), or...
  2. better to have just one contract that stores all data in a data structure like an array of objects (for example, storing information about all users in one contract.

To clarify with some incorrect pseudo code, should I store my information like this?

contract Whatever {
  Users = [
   {}, {}, {}, {}
  ]
}

or like this:

// User 1
contract Whatever {}

// User 2
contract Whatever {}

// User 3
contract Whatever {}

// etc.

closed as off-topic by Andrew Chow Jul 17 at 18:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about cryptocurrencies or projects that are not Bitcoin, and are not applicable to Bitcoin, are off-topic. For more information, see this meta-discussion." – Andrew Chow
If this question can be reworded to fit the rules in the help center, please edit the question.