I just saw that the Minds social network (a ethereum dapp I believe) is written in PHP. Their codebase is huge and I'm having trouble finding where their Smart contracts are written/how they are actually storing information in the Blockchain.

I also always see stuff on the web saying you build dapps in Solidity.

What layers of a dapp can be written in a regular high level language vs a niche Smart contract language like Solidity?

1 Answer 1


Smart contracts have to be written in a language which can be compiled into the right type of bytecode. So in theory any language will do but in reality Solidity is almost the only option - there are a few other small niche languages (Serpent, LLL) but with not much usage.

On top of the smart contract is some client which interacts with the blockchain - typically Geth or Parity. This is usually not written by hand but a ready client is used. Or you can use a ready service provider's node, such as Infura.

On top of the client (or client connection) you can build whatever you want with whatever you want. If it's a web interface you want some HTML code in some fashion. Or it can be some other type of interface such as a desktop app. The main point is that the user interface side can be written with anything and after the node connection (Client) part starts the niche blockchain code.

  • So the client has some sort of API that the user interface can hit? I'm assuming this is the case, but I'd like confirmation :) . Also, does the client have to be installed on every users machine?
    – srlrs20020
    Aug 22, 2019 at 13:40
  • Something like that, yes. See for example here: github.com/ethereum/wiki/wiki/JSON-RPC#json-rpc-api The node client should be centralized and user interfaces call it remotely. Aug 22, 2019 at 15:54
  • so the client is the subscriber and the smart contract is the publisher, passing JSON-RPC messages? @Lauri
    – srlrs20020
    Aug 22, 2019 at 23:56
  • The connection works both ways. Client sends data and receives data. Aug 23, 2019 at 5:22

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.