Can anyone elaborate on how Smart contracts in Ethereum relate to hApps/DNA in holochain?
For example (given holochain is a superset of blockchain)
- What is the equivalent in holochain of deploying a smart contract to an Etheruem blockchain?
- What is the equivalent in holochain of a contract address where the scmart contracts code is stored.
- What is the equivalent in holochain of calling a smart contract’s function using a transaction containing the arguments of that contract’s function.
- What is the equivalent in holochain of calling a function of one smart contract from within another smart contract?
(Context for my answer: I’m a layperson who has read a lot about Holochain, not a programmer, so take it with a grain of salt)
First of all, though you could say Holochain is a superset of blockchain, I don’t think that necessarily means you can draw direct parallels between how Ethereum smart contracts work and how Holochain works. That being said, I’ll try to answer your questions from my understanding:
- A group of people running a hApp together is sort of like deploying a smart contract. Note there is no one single Holochain, so nothing is deployed on “the Holochain,” as every hApp is its own private network
- Each node holds the DNA of the hApp as the first entry in their source chain, which perhaps you could draw a parallel with the “contract address where the code is stored”
- hApps have “zome” functions that define what the hApp can do, which can be all sorts of things, including transactions
- Do you mean between two different hApps? I’m not 100% sure, but I believe this would be done with a bridge. See https://developer.holochain.org/docs/concepts/8_calls_capabilities/
On that note, if you haven’t already, I would suggest taking a look at the core concepts section of the developer website. As you do so, it may help to put aside what you know about how Ethereum works and just approach Holochain as a completely new thing with a totally different design.
As I understand it, a ‘Smart contract’ is a stated set of rules in which participants pay a fee to use due to the underlying supporting architecture.
Holochain is a system which enables general purpose computing in a distributed environment, or on your own but that’s not much fun .
Have you seen this article? I feel the 500 word version may help a little:
Here’s Holochain in 100, 200, and 500 words
For a longer read and insight into the bigger picture:
Unenclosable Carriers and the Future of Communication