cmditch / elm-ethereum

dApps in Elm
https://package.elm-lang.org/packages/cmditch/elm-ethereum/1.0.1/
BSD 3-Clause "New" or "Revised" License
145 stars 21 forks source link

Contract Code Generation #20

Closed nickmonad closed 6 years ago

nickmonad commented 7 years ago

Create a CLI tool to transform a contract's ABI into an Elm module, suitable for direct import into user applications.

More details to come. Using this as a placeholder issue for now.

hickscorp commented 6 years ago

Any progress on this? It's not really clear whether using elm-web3 supersedes what is being done in https://github.com/cmditch/elm-truffle-webpack, how elm-web3 could work with Truffle, etc.

cmditch commented 6 years ago

Hey @hickscorp! Things are just starting to pick back up. I have recently changed employment, and am starting to use elm-web3 in production. So I anticipate much fine tuning and development to occur from here on out.

Obviously manually writing Elm interfaces to a contracts ABI is cumbersome (examples can be seen in the test folder), so I plan to have a binary, written in Haskell to consume an ABI and spit out some nice generated Elm code. This was a good excuse for me to start learning Haskell as well. Development on this will resume shortly.

Cheers!

ps - elm-truffle-webpack is more of a placeholder at this point, don't bother with it right now.

hickscorp commented 6 years ago

@cmditch Thanks for the update!

Regarding Elm generation from ABIs, that'd be nice to have something that:

I might give it a try using javascript (Since everyone using webpack as a build pipeline would have it anyway). Make sure to keep us posted 😉

cmditch commented 6 years ago

@hickscorp No need to install Haskell, as the Generator will end up as a compiled binary, and thus support unix piping.

cmditch commented 6 years ago

Beta released! https://github.com/cmditch/elm-web3-contract