0

How a number of blockchain users save their data in the blockchain network using ethereum. Meaning more than one user sends his data using Python to save it in blockchain networl ?? How do I distinguish this data from this user or from another user? i am using ethereum virtual machine

1 Answer 1

0

You used the tags "solidity" and "contract-development" so I assume your question is from a code point of view.

The smart contracts use a data structure called "mapping" to save data to the Blockchain. An exemple of mapping declaration in Solidity can be :

mapping( address => uint256) userBalances; 

This is a kind of dictionary with the first parameter being the key and the second the value.

That's how you link data to users in Ethereum.

4
  • I have a group of blockchain users, how can I distinguish that data comes from a specific user? My question is how do I represent users ???
    – esraa
    Jul 4, 2020 at 17:00
  • Intercept the transactions and get the senders' addresses. Users are defined by their Ethereum address.
    – clement
    Jul 4, 2020 at 17:11
  • In Python, how do I specify the address for each transaction? I am really sorry, I am a beginner in Ether
    – esraa
    Jul 4, 2020 at 17:30
  • You would need some kind of library to interact with contracts, like pypi.org/project/ethereum
    – Maxpeinas
    Jul 4, 2020 at 19:45

Your Answer

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

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