Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data RpcQuery a where
- QueryCode :: Addr -> RpcQuery ByteString
- QueryBalance :: Addr -> RpcQuery W256
- QueryNonce :: Addr -> RpcQuery W256
- QuerySlot :: Addr -> W256 -> RpcQuery W256
- QueryChainId :: RpcQuery W256
- data BlockNumber
- rpc :: String -> [String] -> Value
- class ToRPC a where
- readText :: Read a => Text -> a
- fetchQuery :: Show a => BlockNumber -> (Value -> IO (Maybe Text)) -> RpcQuery a -> IO (Maybe a)
- fetchWithSession :: Text -> Session -> Value -> IO (Maybe Text)
- fetchContractWithSession :: BlockNumber -> Text -> Addr -> Session -> IO (Maybe Contract)
- fetchSlotWithSession :: BlockNumber -> Text -> Session -> Addr -> W256 -> IO (Maybe Word)
- fetchContractFrom :: BlockNumber -> Text -> Addr -> IO (Maybe Contract)
- fetchSlotFrom :: BlockNumber -> Text -> Addr -> W256 -> IO (Maybe Word)
- http :: BlockNumber -> Text -> Fetcher
- zero :: Fetcher
- type Fetcher = Query -> IO (EVM ())
- oracle :: State -> Maybe (BlockNumber, Text) -> StorageModel -> Fetcher
- checksat :: SBool -> Query CheckSatResult
Documentation
data RpcQuery a where Source #
Abstract representation of an RPC fetch request
QueryCode :: Addr -> RpcQuery ByteString | |
QueryBalance :: Addr -> RpcQuery W256 | |
QueryNonce :: Addr -> RpcQuery W256 | |
QuerySlot :: Addr -> W256 -> RpcQuery W256 | |
QueryChainId :: RpcQuery W256 |
data BlockNumber Source #
Instances
ToRPC BlockNumber Source # | |
fetchQuery :: Show a => BlockNumber -> (Value -> IO (Maybe Text)) -> RpcQuery a -> IO (Maybe a) Source #
fetchContractWithSession :: BlockNumber -> Text -> Addr -> Session -> IO (Maybe Contract) Source #
fetchContractFrom :: BlockNumber -> Text -> Addr -> IO (Maybe Contract) Source #
fetchSlotFrom :: BlockNumber -> Text -> Addr -> W256 -> IO (Maybe Word) Source #
oracle :: State -> Maybe (BlockNumber, Text) -> StorageModel -> Fetcher Source #