| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
EVM.ABI
Synopsis
- data AbiValue
- = AbiUInt Int Word256
- | AbiInt Int Int256
- | AbiAddress Addr
- | AbiBool Bool
- | AbiBytes Int ByteString
- | AbiBytesDynamic ByteString
- | AbiString ByteString
- | AbiArrayDynamic AbiType (Vector AbiValue)
- | AbiArray Int AbiType (Vector AbiValue)
- | AbiTuple (Vector AbiValue)
- | AbiFunction Addr FunctionSelector
- data AbiType
- data AbiKind
- data AbiVals
- abiKind :: AbiType -> AbiKind
- data Event = Event Text Anonymity [(Text, AbiType, Indexed)]
- data SolError = SolError Text [AbiType]
- data Anonymity
- data Indexed
- data Sig = Sig Text [AbiType]
- callSig :: Sig -> Text
- putAbi :: AbiValue -> Put
- getAbi :: AbiType -> Get AbiValue
- getAbiSeq :: Int -> [AbiType] -> Get (Vector AbiValue)
- genAbiValue :: AbiType -> Gen AbiValue
- abiValueType :: AbiValue -> AbiType
- abiTypeSolidity :: AbiType -> Text
- abiMethod :: Text -> AbiValue -> ByteString
- emptyAbi :: AbiValue
- encodeAbiValue :: AbiValue -> ByteString
- decodeAbiValue :: AbiType -> ByteString -> AbiValue
- decodeBuf :: [AbiType] -> Expr 'Buf -> (AbiVals, String)
- decodeStaticArgs :: Int -> Int -> Expr 'Buf -> [Expr 'EWord]
- formatString :: ByteString -> String
- parseTypeName :: Vector AbiType -> Text -> Maybe AbiType
- makeAbiValue :: AbiType -> String -> AbiValue
- parseAbiValue :: AbiType -> ReadP AbiValue
- selector :: Text -> ByteString
- showAlter :: ShowAlter a => a -> String
Documentation
Constructors
Instances
Constructors
| AbiUIntType Int | |
| AbiIntType Int | |
| AbiAddressType | |
| AbiBoolType | |
| AbiBytesType Int | |
| AbiBytesDynamicType | |
| AbiStringType | |
| AbiArrayDynamicType AbiType | |
| AbiArrayType Int AbiType | |
| AbiTupleType (Vector AbiType) | |
| AbiFunctionType |
Instances
| Arbitrary AbiType Source # | |||||
| Data AbiType Source # | |||||
Defined in EVM.ABI Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AbiType -> c AbiType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AbiType # toConstr :: AbiType -> Constr # dataTypeOf :: AbiType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AbiType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AbiType) # gmapT :: (forall b. Data b => b -> b) -> AbiType -> AbiType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AbiType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AbiType -> r # gmapQ :: (forall d. Data d => d -> u) -> AbiType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AbiType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AbiType -> m AbiType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AbiType -> m AbiType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AbiType -> m AbiType # | |||||
| Generic AbiType Source # | |||||
Defined in EVM.ABI Associated Types
| |||||
| Read AbiType Source # | |||||
| Show AbiType Source # | |||||
| Eq AbiType Source # | |||||
| Ord AbiType Source # | |||||
| type Rep AbiType Source # | |||||
Defined in EVM.ABI type Rep AbiType = D1 ('MetaData "AbiType" "EVM.ABI" "hevm-0.58.0-inplace" 'False) (((C1 ('MetaCons "AbiUIntType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "AbiIntType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) :+: (C1 ('MetaCons "AbiAddressType" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AbiBoolType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AbiBytesType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))) :+: ((C1 ('MetaCons "AbiBytesDynamicType" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AbiStringType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AbiArrayDynamicType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AbiType)))) :+: (C1 ('MetaCons "AbiArrayType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AbiType)) :+: (C1 ('MetaCons "AbiTupleType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Vector AbiType))) :+: C1 ('MetaCons "AbiFunctionType" 'PrefixI 'False) (U1 :: Type -> Type))))) | |||||
Instances
| Generic Event Source # | |||||
Defined in EVM.ABI Associated Types
| |||||
| Show Event Source # | |||||
| Eq Event Source # | |||||
| Ord Event Source # | |||||
| type Rep Event Source # | |||||
Defined in EVM.ABI type Rep Event = D1 ('MetaData "Event" "EVM.ABI" "hevm-0.58.0-inplace" 'False) (C1 ('MetaCons "Event" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Anonymity) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(Text, AbiType, Indexed)])))) | |||||
Instances
| Generic SolError Source # | |||||
Defined in EVM.ABI Associated Types
| |||||
| Show SolError Source # | |||||
| Eq SolError Source # | |||||
| Ord SolError Source # | |||||
Defined in EVM.ABI | |||||
| type Rep SolError Source # | |||||
Defined in EVM.ABI type Rep SolError = D1 ('MetaData "SolError" "EVM.ABI" "hevm-0.58.0-inplace" 'False) (C1 ('MetaCons "SolError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [AbiType]))) | |||||
Constructors
| Anonymous | |
| NotAnonymous |
Instances
| Generic Anonymity Source # | |
| Show Anonymity Source # | |
| Eq Anonymity Source # | |
| Ord Anonymity Source # | |
| type Rep Anonymity Source # | |
Constructors
| Indexed | |
| NotIndexed |
A method name, and the (ordered) types of it's arguments
getAbiSeq :: Int -> [AbiType] -> Get (Vector AbiValue) Source #
Decode a sequence type (e.g. tuple / array). Will fail for non sequence types
abiValueType :: AbiValue -> AbiType Source #
abiTypeSolidity :: AbiType -> Text Source #
encodeAbiValue :: AbiValue -> ByteString Source #
decodeAbiValue :: AbiType -> ByteString -> AbiValue Source #
formatString :: ByteString -> String Source #
selector :: Text -> ByteString Source #