{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Network.Polkadot.Api.Contracts where
import Data.Text (Text)
import Data.ByteArray.HexString (HexString)
import Network.JsonRpc.TinyClient (JsonRpc (..))
import Network.Polkadot.Api.Types (ContractCall, ContractExecResult)
call :: JsonRpc m
=> ContractCall
-> Maybe HexString
-> m ContractExecResult
{-# INLINE call #-}
call = remote "contracts_call"
getStorage :: JsonRpc m
=> Text
-> HexString
-> Maybe HexString
-> m (Maybe HexString)
{-# INLINE getStorage #-}
getStorage = remote "contracts_getStorage"
rentProjection :: JsonRpc m
=> Text
-> Maybe HexString
-> m (Maybe Int)
{-# INLINE rentProjection #-}
rentProjection = remote "contracts_rentProjection"