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
146 stars 21 forks source link

Alter contract API to facilitate web3 best practices #22

Closed cmditch closed 7 years ago

cmditch commented 7 years ago

See here - https://gist.github.com/ethers/2d8dfaaf7f7a2a9e4eaa

We could generate a MyContract.callMyFunc & MyContract.myFunc for each non-constant function, e.g.,

callMyFunc: web3.eth.contract(abi).at(address).myFunc.sendTransaction.apply(args)

myFunc: web3.eth.contract(abi).at(address).myFunc.call.apply(args)