Where does the smart contracts stored and executed on blockchain?


I have just started creating smart contracts. There are certain questions that I have in mind.
If I talk about contract deployment and storage of the contract, i want to know where is the contract stored in ethereum or hyperledger?

Also, once deployed, how other participants can interact with this contract?

And, is it possible to activate participant level access to the contract on blockchain??



Ethereum smart contracts are executed on EVM and once the byte code is generated it is then sent within a transaction and then it exists on the blockchain. This happens because once the contract is deployed it then interacts with other transactions.

Hyperledger is a bit of a different approach, the contract might be on the ledger or it may not be. If you take an example of fabric, it deploys the code in the docker container which can then be interacted with using transactions. The participants will be able to access the contract via credentials given to them.

In ethereum, the code is a bit simplified, and publicly accessible which means that you only need to employ a check to only allow a few to interact with smart contracts.

In hyperledger, it would most likely be modeled in a similar manner.

to answer your last question each participant in both systems has credentials and the designer of the smart contract can use this to control access. Also, in Fabric, there are channels that partition the ledger which is used for access control.


If you want to unleash your potential in this competitive field, please visit the Blockchain course page for more information, where you can find the Blockchain tutorials and Blockchain frequently asked interview questions and answers as well.


This topic has been locked/unapproved. No replies allowed

Login to participate in this discussion.

Leave a reply

Before proceeding, please check your email for a verification link. If you did not receive the email, click here to request another.