1

I have seen a couple of tutorials on how to code smart contracts, but I can not quite gather how to write one for permission and access level on a blockchain. How can you grant access to a user to read/add/edit or just read/write?

1
  • I think you still need to research a bit the actual functionality of the blockchain or rather for what it is needed for. Once you successfully deployed your smart contract, you actually wrote something on the blockchain; your compiled contract and the transactions used to deploy it. And you can, e.g., get the current block number or timestamp inside of your contract, which may symbolize "reading" something from the blockchain. – cryptphil Feb 13 at 18:32
2

This might be done in the same manner as any other programming language: you basically define who will assign/revoke these permissions and create a structure to handle such permissions per user (read, write..).

In Solidity you can develop it yourself or use audited solutions such as the OpenZeppelin's Access Control to ease the job.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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