QQ reader for contract Abi
Moduleweb3-ethereum-1.1.0.1Haskell2010
Network.Ethereum.Contract.TH
Contract abstraction is a high level interface of web3 library.
The Application Binary Interface is the standard way to interact
with contracts in the Ethereum ecosystem. It can be described by
specially JSON file, like ERC20.json. This module use TemplateHaskell
for generation described in Abi contract methods and events. Helper
functions and instances inserted in haskell module and can be used in
another modules or in place.
import Network.Ethereum.Contract.TH
[abiFrom|examples/ERC20.json|]
main = do
runWeb3 $ event' def $
(Transfer _ to val) -> liftIO $ do print to
print val
Full code example available in examples folder.
- 2 values
- Packageweb3-ethereum-1.1.0.1
- Exports2
- LanguageHaskell2010
- LicenceApache-2.0
- SourceTH.hs
The contract quasiquoters
2 declarationsRead contract Abi from file