Copyright | Alexander Krupenkin 2016 |
---|---|
License | BSD3 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Network.Ethereum.Web3.Contract
Description
Ethereum contract generalized interface, e.g. event
function
catch all event depend by given callback function type.
runWeb3 $ do event "0x..." $ (MyEvent a b c) -> liftIO $ print (a + b * c))
In other case call
function used for constant calls (without
transaction creation and change state), and sendTx
function
like a call
but return no contract method return but created
transaction hash.
runweb3 $ do x <- call "0x.." Latest MySelector tx <- sendTx "0x.." nopay $ MySelector2 (x + 2)
- data EventAction
- class ABIEncoding a => Method a where
- class ABIEncoding a => Event a where
- data NoMethod = NoMethod
- nopay :: Wei
Documentation
data EventAction Source #
Event callback control response
Constructors
ContinueEvent | Continue to listen events |
TerminateEvent | Terminate event listener |
Instances
class ABIEncoding a => Method a where Source #
Contract method caller
Methods
sendTx :: (Provider p, Unit b) => Address -> b -> a -> Web3 p TxHash Source #
Send a transaction for given contract Address
, value and input data
call :: (Provider p, ABIEncoding b) => Address -> DefaultBlock -> a -> Web3 p b Source #
Constant call given contract Address
in mode and given input data
Dummy method for sending transaction without method call
Constructors
NoMethod |