Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data RpcQuery a where
- QueryCode :: Addr -> RpcQuery ByteString
- QueryBlock :: RpcQuery Block
- QueryBalance :: Addr -> RpcQuery W256
- QueryNonce :: Addr -> RpcQuery W256
- QuerySlot :: Addr -> W256 -> RpcQuery W256
- QueryChainId :: RpcQuery W256
- data BlockNumber
- type RpcInfo = Maybe (BlockNumber, Text)
- rpc :: String -> [Value] -> Value
- class ToRPC a where
- readText :: Read a => Text -> a
- fetchQuery :: Show a => BlockNumber -> (Value -> IO (Maybe Value)) -> RpcQuery a -> IO (Maybe a)
- parseBlock :: (AsValue s, Show s) => s -> Maybe Block
- fetchWithSession :: Text -> Session -> Value -> IO (Maybe Value)
- fetchContractWithSession :: BlockNumber -> Text -> Addr -> Session -> IO (Maybe Contract)
- fetchSlotWithSession :: BlockNumber -> Text -> Session -> Addr -> W256 -> IO (Maybe W256)
- fetchBlockWithSession :: BlockNumber -> Text -> Session -> IO (Maybe Block)
- fetchBlockFrom :: BlockNumber -> Text -> IO (Maybe Block)
- fetchContractFrom :: BlockNumber -> Text -> Addr -> IO (Maybe Contract)
- fetchSlotFrom :: BlockNumber -> Text -> Addr -> W256 -> IO (Maybe W256)
- http :: Natural -> Maybe Natural -> BlockNumber -> Text -> Fetcher
- zero :: Natural -> Maybe Natural -> Fetcher
- oracle :: SolverGroup -> RpcInfo -> Fetcher
- type Fetcher = Query -> IO (EVM ())
- checkBranch :: SolverGroup -> Prop -> Prop -> IO BranchCondition
Documentation
data RpcQuery a where Source #
Abstract representation of an RPC fetch request
QueryCode :: Addr -> RpcQuery ByteString | |
QueryBlock :: RpcQuery Block | |
QueryBalance :: Addr -> RpcQuery W256 | |
QueryNonce :: Addr -> RpcQuery W256 | |
QuerySlot :: Addr -> W256 -> RpcQuery W256 | |
QueryChainId :: RpcQuery W256 |
data BlockNumber Source #
Instances
Show BlockNumber Source # | |
Defined in EVM.Fetch showsPrec :: Int -> BlockNumber -> ShowS # show :: BlockNumber -> String # showList :: [BlockNumber] -> ShowS # | |
Eq BlockNumber Source # | |
Defined in EVM.Fetch (==) :: BlockNumber -> BlockNumber -> Bool # (/=) :: BlockNumber -> BlockNumber -> Bool # | |
ToRPC BlockNumber Source # | |
fetchQuery :: Show a => BlockNumber -> (Value -> IO (Maybe Value)) -> RpcQuery a -> IO (Maybe a) Source #
fetchContractWithSession :: BlockNumber -> Text -> Addr -> Session -> IO (Maybe Contract) Source #
fetchBlockWithSession :: BlockNumber -> Text -> Session -> IO (Maybe Block) Source #
fetchBlockFrom :: BlockNumber -> Text -> IO (Maybe Block) Source #
fetchContractFrom :: BlockNumber -> Text -> Addr -> IO (Maybe Contract) Source #
fetchSlotFrom :: BlockNumber -> Text -> Addr -> W256 -> IO (Maybe W256) Source #
checkBranch :: SolverGroup -> Prop -> Prop -> IO BranchCondition Source #
Checks which branches are satisfiable, checking the pathconditions for consistency if the third argument is true. When in debug mode, we do not want to be able to navigate to dead paths, but for normal execution paths with inconsistent pathconditions will be pruned anyway.