0

Im a little confused on how Smart contracts work on the Ethereum blockchain and with DApps.

I'm confused with the structure of DApps using Ethereum smart contracts. Is just one contract created when the app is made, or are users of the app publishing a smart contract every time? more details of my question are in the next paragraph.

Suppose you have a Ride share Ethereum Dapp, when making this Dapp, the creator of the app publishes a smart contract, for example "Ride". Can there be an implementation where a person looking for a ride can store his information into the "Ride" contract on the blockchain that was published by the creator of the app? So in essence the users of the rideshare app are interacting with the smart contract that is already published. Or, is it that each user of the Rideshare app deploys/ publishes their own smart contract every time that they enter their user details into the Rideshare app?

thank you for your help clearing this confusion.

2 Answers 2

1

Once the contract is deployed and has a specific address (lets say address No.1) then the user interact with the functions of that smart contract in that specific address - address No.1.

If the user deploys his own version of the smart contract or dapp then this smart contract has a new address (address No.2).

If there is a function in smart contract No.1 that accepts your info and stores it then this info will not appear in smart contract No.2

So yes "the users of the rideshare app are interacting with the smart contract that is already published".

Not a very scientific answer but I hope it helps.

0

I'm confused with the structure of DApps using Ethereum smart contracts.

Each contract has a unique address, the bytecode (which is the EVM's implementation of an executable), and state storage which is (very) roughly like a database. The state can include information, like balances, for the users. The bytecode implements the contract's rule, such as the conditions and effects for something like a transfer from one user to another.

Is just one contract created when the app is made, or are users of the app publishing a smart contract every time?

Generally, users interact with one contract. However, modularity is a thing, so systems can be designed with multiple contracts working in concert, and this can include the automated deployment of a module.

So in essence the users of the rideshare app are interacting with the smart contract that is already published. Or, is it that each user of the Rideshare app deploys/ publishes their own smart contract every time that they enter their user details into the Rideshare app?

It would probably be the first way.

Hope it helps.

Your Answer

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

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