Elm and smart contracts (blockchains)

I don’t agree with this. I have been doing blockchain development in Elm for more than two years and my trajectory was:

  1. Use ports with web3js.
  2. Since web3js implementation of websockets wasn’t reliable, we stopped using ports and I wrote a custom implementation of websockets for elm 0.18 because the official one was too naive to be used in production. We started using cmditch/elm-ethereum.
  3. We stopped using websockets at all because blockchain events could get lost in parity client, so we created a custom server that analyzes all blocks indexing relevant events for us. We moved back to using ports and ethersjs for blockchain interaction.
  4. We have gone back to using cmditch/elm-ethereum only for parsing and writing blockchain calls. Ports have become a proxy that connects Elm to the wallet manager. We did this because we have a complex system that does many blockchain interations that depend on each other, and we needed to have it stable once and for all.
  5. In order to make our lives easier, I created elm-effects-proxy, witch allows to use function calls, promises or generators (websockets planned, not yet implemented) making elm believe that it is making plain HTTP calls or multipart HTTP calls in the case of generators.

Right now our system is very robust from the use interaction to the blockchain interaction. Also, elm 0.19 is supposed to last a couple or three years. Also, if the core team drops it, as it has been said, many companies depend on it because, IMHO, there is nothing that can rival Elm in terms of technology. The compiler is open source, you can always fork but as the core team says, there is no strong fork out there. I think that it is because it is not needed. If for some reason I couldn’t use elm-effects-proxy anymore, I would create a fork myself, which is what I was planning to do when I found the workaround.

So, go for it. The worst that can happen is that you can learn much more than you would expect.

1 Like