3

I've just started writing smart contracts and developing Dapps on the Ethereum Blockchain, basically users interacting with the smart contract and storing some lightweight data into the blockchain. I have a general but very vague idea on how to do all of this so I simply wanted to make sure that I got stuff right, so please beare with me .

What I want to do:

  • User Login : I am not very sure about this. Should I handle it as a traditional user login ( database) or I could use the blockchain for that? and if so , how would I be able to do so?

  • Store data (Strings, boolean and an Image) into the blockchain via a web interface: I've seen some tutorials but most of them don't 'store' the data, I want to be able to show this data to my user . So maybe I should use a JSON file? I read about IPFS fo image storing but I dont know how to associate a hash to my Eth account.

  • What I did :

    • Set up my own private Ethereum Blockchain

    • Written a contract that handles a string ( user's name) and then returns it on the GUI

    • Written the web interface

TL;DR: I am trying to store user's data into the blockchain so that I can show it again but I dont know how to proceed. I am also confused about the user Login . Please help me ( any links would be greatly appreciated) or at least tell me if I'm on the right path.

confusedstudent
  • 353
  • 3
  • 11

1 Answers1

1
  • For login you can have a user to sign a message using the private key in their wallet on web or mobile Then on the server-side you can verify this message came from a certain Ethereum address and create the database record for the matching address in fly

  • You can store data in a transactional blockchain, but it is discouraged and not the purpose of a blockchain. The data storage cost on a public Ethereum blockchain will be millions of times more than in a database or other dedicated storaeg. If you do this for learning I suggest you try products like Storj or Sia for decentralised file storage.

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435