Copyright | Alexander Krupenkin 2016-2018 |
---|---|
License | BSD3 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | unportable |
Safe Haskell | None |
Language | Haskell2010 |
An Ethereum node offers a RPC interface. This interface gives Ðapp’s access to the Ethereum blockchain and functionality that the node provides, such as compiling smart contract code. It uses a subset of the JSON-RPC 2.0 specification (no support for notifications or named parameters) as serialisation protocol and is available over HTTP and IPC (unix domain sockets on linux/OSX and named pipe’s on Windows).
Web3 Haskell library currently use JSON-RPC over HTTP to access node functionality.
- data Web3 a
- runWeb3 :: MonadIO m => Web3 a -> m (Either Web3Error a)
- sendTx :: Method a => Call -> a -> Web3 Hash
- data Call = Call {}
- data EventAction
- event :: DecodeEvent i ni e => Filter e -> (e -> ReaderT Change Web3 EventAction) -> Web3 (Async ())
- event' :: DecodeEvent i ni e => Filter e -> (e -> ReaderT Change Web3 EventAction) -> Web3 ()
- module Network.Ethereum.ABI.Prim
- module Network.Ethereum.Unit
Monad as base of any Ethereum node communication
Any communication with Ethereum node wrapped with Web3
monad
Basic transaction sending
sendTx
is used to submit a state changing transaction.
The contract call params.
Call | |
|
Basic event listening
data EventAction Source #
Event callback control response
ContinueEvent | Continue to listen events |
TerminateEvent | Terminate event listener |
event :: DecodeEvent i ni e => Filter e -> (e -> ReaderT Change Web3 EventAction) -> Web3 (Async ()) Source #
Run 'event\'' one block at a time.
event' :: DecodeEvent i ni e => Filter e -> (e -> ReaderT Change Web3 EventAction) -> Web3 () Source #
Same as event
, but does not immediately spawn a new thread.
Primitive data types
module Network.Ethereum.ABI.Prim
Metric unit system
module Network.Ethereum.Unit