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:
- Is it better to store a new instance of a contract for each set of data (for example, information about a user), or...
- 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.