Where does the smart contracts stored and executed on blockchain?

+1 vote
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??
May 2, 2018 in Blockchain by Johnathon
• 9,070 points

5 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+1 vote
Best answer

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 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 can 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 contract.

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.

answered May 2, 2018 by Shashank
• 10,330 points

selected Aug 3, 2018 by Omkar
0 votes
The smart contracts are stored on the Blockchain itself.
answered May 6 by Komal
0 votes
When you deploy the smart contract, the contract is compiled into byte code and this code is stored on the Blockchain. The smart contract will be available at least in two locations: on the Blockchain and on the deployed machine.
answered May 6 by Tina
+1 vote
The contract is stored on the ledger on the Blockchain. So, whenever a transaction happens, a function is invoked that calls the smart contract and the processing is done. Smart Contracts are stored on the Blockchain because it is important for the contract to be available to the people making transactions.
answered May 6 by Esha
0 votes
Ethereum and Hyperledger are 2 different implementations of Blockchain. In Ethereum the contract in stored on the Blockchain and on the Hyperledger it is stored either on the ledger or on the system.
answered May 6 by Yogi

Related Questions In Blockchain

+1 vote
3 answers

Is it possible to store data about arbitrary objects on the blockchain using smart contracts?

Consider following tutorial from Hyperledger Fabric "Getting Started" pages. Basically ...READ MORE

answered Aug 30, 2018 in Blockchain by Artem
+15 votes
2 answers

What are the various blockchain smart contracts platforms?

While Ethereum is the most popular platform ...READ MORE

answered Mar 26, 2018 in Blockchain by Johnathon
• 9,070 points
+1 vote
1 answer

How is a smart contract stored on a Blockchain?

Smart contract template and transaction events are ...READ MORE

answered Apr 4, 2018 in Blockchain by Christine
• 15,790 points
0 votes
1 answer

Where is the data stored in blockchain?

The smart contract is just the business ...READ MORE

answered Jun 29, 2018 in Blockchain by slayer
• 29,040 points
0 votes
1 answer
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
0 votes
1 answer
+1 vote
4 answers

How to estimate the cost for deploying smart contract on mainnet?

Since you have already deployed the contract ...READ MORE

answered Apr 9, 2018 in Blockchain by Shashank
• 10,330 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.