If a Member(struct) has 10 fields, the contract stores an array of Members, how would I pass 100 Members worth of data into the contract?

1 Answer 1


It's not recommended to keep a lot of data on the blockchain, rather you can use some storage solutions like IPFS or Swarm. By this, you can store the data on one of them and the hash of the files/attributes can be stored on the smart contract.

So basically using IPFS/Swarm is a smarter way of storage, you can store the data on blockchain as well, but in that case storing data would cost you more gas in comparison to storing the hash(pointing to your data).

Blockchain and IPFS/Swarm can be a really good combination, as it becomes more secure because your data is not on blockchain network.

  • you don't explain why he should use swarm or ipfs? why not a simple contract storage?
    – Sig Touri
    May 23, 2017 at 18:06
  • Updated my answer.
    – Sanchit
    May 23, 2017 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.