Copyright | Aleksandr Krupenkin 2016-2021 |
---|---|
License | Apache-2.0 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | noportable |
Safe Haskell | None |
Language | Haskell2010 |
The Application Binary Interface is the standard way to interact with contracts in the Ethereum ecosystem, both from outside the blockchain and for contract-to-contract interaction. Data is encoded according to its type, as described in this specification. The encoding is not self describing and thus requires a schema in order to decode.
Documentation
class AbiType a where Source #
A class for abi encoding datatype descriptions
Instances
AbiType Bool Source # | |
AbiType ByteString Source # | |
Defined in Data.Solidity.Prim.Bytes | |
AbiType Text Source # | |
AbiType Bytes Source # | |
AbiType Address Source # | |
AbiType [a] Source # | |
AbiType a => AbiType (OneTuple a) Source # | |
n <= 256 => AbiType (IntN n) Source # | |
n <= 256 => AbiType (UIntN n) Source # | |
n <= 32 => AbiType (BytesN n) Source # | |
(AbiType a1, AbiType a2) => AbiType (a1, a2) Source # | |
AbiType (ListN n a) Source # | |
(AbiType a1, AbiType a2, AbiType a3) => AbiType (a1, a2, a3) Source # | |
AbiType a => AbiType (Tagged t a) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4) => AbiType (a1, a2, a3, a4) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5) => AbiType (a1, a2, a3, a4, a5) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6) => AbiType (a1, a2, a3, a4, a5, a6) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7) => AbiType (a1, a2, a3, a4, a5, a6, a7) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7, AbiType a8) => AbiType (a1, a2, a3, a4, a5, a6, a7, a8) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7, AbiType a8, AbiType a9) => AbiType (a1, a2, a3, a4, a5, a6, a7, a8, a9) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7, AbiType a8, AbiType a9, AbiType a10) => AbiType (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7, AbiType a8, AbiType a9, AbiType a10, AbiType a11) => AbiType (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7, AbiType a8, AbiType a9, AbiType a10, AbiType a11, AbiType a12) => AbiType (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7, AbiType a8, AbiType a9, AbiType a10, AbiType a11, AbiType a12, AbiType a13) => AbiType (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7, AbiType a8, AbiType a9, AbiType a10, AbiType a11, AbiType a12, AbiType a13, AbiType a14) => AbiType (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7, AbiType a8, AbiType a9, AbiType a10, AbiType a11, AbiType a12, AbiType a13, AbiType a14, AbiType a15) => AbiType (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7, AbiType a8, AbiType a9, AbiType a10, AbiType a11, AbiType a12, AbiType a13, AbiType a14, AbiType a15, AbiType a16) => AbiType (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7, AbiType a8, AbiType a9, AbiType a10, AbiType a11, AbiType a12, AbiType a13, AbiType a14, AbiType a15, AbiType a16, AbiType a17) => AbiType (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7, AbiType a8, AbiType a9, AbiType a10, AbiType a11, AbiType a12, AbiType a13, AbiType a14, AbiType a15, AbiType a16, AbiType a17, AbiType a18) => AbiType (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7, AbiType a8, AbiType a9, AbiType a10, AbiType a11, AbiType a12, AbiType a13, AbiType a14, AbiType a15, AbiType a16, AbiType a17, AbiType a18, AbiType a19) => AbiType (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19) Source # | |
(AbiType a1, AbiType a2, AbiType a3, AbiType a4, AbiType a5, AbiType a6, AbiType a7, AbiType a8, AbiType a9, AbiType a10, AbiType a11, AbiType a12, AbiType a13, AbiType a14, AbiType a15, AbiType a16, AbiType a17, AbiType a18, AbiType a19, AbiType a20) => AbiType (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Source # | |
class AbiType a => AbiPut a where Source #
A class for encoding datatypes to their abi encoding
If your compiler has support for the DeriveGeneric
and
DefaultSignatures
language extensions (ghc >= 7.2.1
),
the abiPut
method will have default generic implementations.
To use this option, simply add a deriving
clause
to your datatype and declare a Generic
AbiPut
instance for it without
giving a definition for abiPut
.
Nothing
Instances
AbiPut Bool Source # | |
AbiPut ByteString Source # | |
Defined in Data.Solidity.Prim.Bytes | |
AbiPut Text Source # | |
AbiPut Bytes Source # | |
AbiPut Address Source # | |
AbiPut a => AbiPut [a] Source # | |
Defined in Data.Solidity.Prim.List | |
AbiPut a => AbiPut (OneTuple a) Source # | |
n <= 256 => AbiPut (IntN n) Source # | |
n <= 256 => AbiPut (UIntN n) Source # | |
(KnownNat n, n <= 32) => AbiPut (BytesN n) Source # | |
(AbiPut a1, AbiPut a2) => AbiPut (a1, a2) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
AbiPut a => AbiPut (ListN n a) Source # | |
(AbiPut a1, AbiPut a2, AbiPut a3) => AbiPut (a1, a2, a3) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
AbiPut a => AbiPut (Tagged t a) Source # | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4) => AbiPut (a1, a2, a3, a4) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5) => AbiPut (a1, a2, a3, a4, a5) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6) => AbiPut (a1, a2, a3, a4, a5, a6) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7) => AbiPut (a1, a2, a3, a4, a5, a6, a7) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7, AbiPut a8) => AbiPut (a1, a2, a3, a4, a5, a6, a7, a8) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7, AbiPut a8, AbiPut a9) => AbiPut (a1, a2, a3, a4, a5, a6, a7, a8, a9) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7, AbiPut a8, AbiPut a9, AbiPut a10) => AbiPut (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7, AbiPut a8, AbiPut a9, AbiPut a10, AbiPut a11) => AbiPut (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7, AbiPut a8, AbiPut a9, AbiPut a10, AbiPut a11, AbiPut a12) => AbiPut (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7, AbiPut a8, AbiPut a9, AbiPut a10, AbiPut a11, AbiPut a12, AbiPut a13) => AbiPut (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7, AbiPut a8, AbiPut a9, AbiPut a10, AbiPut a11, AbiPut a12, AbiPut a13, AbiPut a14) => AbiPut (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7, AbiPut a8, AbiPut a9, AbiPut a10, AbiPut a11, AbiPut a12, AbiPut a13, AbiPut a14, AbiPut a15) => AbiPut (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7, AbiPut a8, AbiPut a9, AbiPut a10, AbiPut a11, AbiPut a12, AbiPut a13, AbiPut a14, AbiPut a15, AbiPut a16) => AbiPut (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7, AbiPut a8, AbiPut a9, AbiPut a10, AbiPut a11, AbiPut a12, AbiPut a13, AbiPut a14, AbiPut a15, AbiPut a16, AbiPut a17) => AbiPut (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7, AbiPut a8, AbiPut a9, AbiPut a10, AbiPut a11, AbiPut a12, AbiPut a13, AbiPut a14, AbiPut a15, AbiPut a16, AbiPut a17, AbiPut a18) => AbiPut (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7, AbiPut a8, AbiPut a9, AbiPut a10, AbiPut a11, AbiPut a12, AbiPut a13, AbiPut a14, AbiPut a15, AbiPut a16, AbiPut a17, AbiPut a18, AbiPut a19) => AbiPut (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiPut a1, AbiPut a2, AbiPut a3, AbiPut a4, AbiPut a5, AbiPut a6, AbiPut a7, AbiPut a8, AbiPut a9, AbiPut a10, AbiPut a11, AbiPut a12, AbiPut a13, AbiPut a14, AbiPut a15, AbiPut a16, AbiPut a17, AbiPut a18, AbiPut a19, AbiPut a20) => AbiPut (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Source # | |
Defined in Data.Solidity.Prim.Tuple |
class GenericAbiPut a where Source #
A class for encoding generically composed datatypes to their abi encoding
class AbiType a => AbiGet a where Source #
A class for decoding datatypes from their abi encoding
If your compiler has support for the DeriveGeneric
and
DefaultSignatures
language extensions (ghc >= 7.2.1
),
the abiGet
method will have default generic implementations.
To use this option, simply add a deriving
clause
to your datatype and declare a Generic
AbiGet
instance for it without
giving a definition for abiGet
.
Nothing
Instances
AbiGet Bool Source # | |
AbiGet ByteString Source # | |
Defined in Data.Solidity.Prim.Bytes abiGet :: Get ByteString Source # | |
AbiGet Text Source # | |
AbiGet Bytes Source # | |
AbiGet Address Source # | |
AbiGet a => AbiGet [a] Source # | |
Defined in Data.Solidity.Prim.List | |
AbiGet a => AbiGet (OneTuple a) Source # | |
n <= 256 => AbiGet (IntN n) Source # | |
n <= 256 => AbiGet (UIntN n) Source # | |
(KnownNat n, n <= 32) => AbiGet (BytesN n) Source # | |
(AbiGet a1, AbiGet a2) => AbiGet (a1, a2) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(NatWithinBound Int n, KnownNat n, AbiGet a) => AbiGet (ListN n a) Source # | |
(AbiGet a1, AbiGet a2, AbiGet a3) => AbiGet (a1, a2, a3) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
AbiGet a => AbiGet (Tagged t a) Source # | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4) => AbiGet (a1, a2, a3, a4) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5) => AbiGet (a1, a2, a3, a4, a5) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6) => AbiGet (a1, a2, a3, a4, a5, a6) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7) => AbiGet (a1, a2, a3, a4, a5, a6, a7) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7, AbiGet a8) => AbiGet (a1, a2, a3, a4, a5, a6, a7, a8) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7, AbiGet a8, AbiGet a9) => AbiGet (a1, a2, a3, a4, a5, a6, a7, a8, a9) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7, AbiGet a8, AbiGet a9, AbiGet a10) => AbiGet (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7, AbiGet a8, AbiGet a9, AbiGet a10, AbiGet a11) => AbiGet (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7, AbiGet a8, AbiGet a9, AbiGet a10, AbiGet a11, AbiGet a12) => AbiGet (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7, AbiGet a8, AbiGet a9, AbiGet a10, AbiGet a11, AbiGet a12, AbiGet a13) => AbiGet (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7, AbiGet a8, AbiGet a9, AbiGet a10, AbiGet a11, AbiGet a12, AbiGet a13, AbiGet a14) => AbiGet (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7, AbiGet a8, AbiGet a9, AbiGet a10, AbiGet a11, AbiGet a12, AbiGet a13, AbiGet a14, AbiGet a15) => AbiGet (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7, AbiGet a8, AbiGet a9, AbiGet a10, AbiGet a11, AbiGet a12, AbiGet a13, AbiGet a14, AbiGet a15, AbiGet a16) => AbiGet (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7, AbiGet a8, AbiGet a9, AbiGet a10, AbiGet a11, AbiGet a12, AbiGet a13, AbiGet a14, AbiGet a15, AbiGet a16, AbiGet a17) => AbiGet (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7, AbiGet a8, AbiGet a9, AbiGet a10, AbiGet a11, AbiGet a12, AbiGet a13, AbiGet a14, AbiGet a15, AbiGet a16, AbiGet a17, AbiGet a18) => AbiGet (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7, AbiGet a8, AbiGet a9, AbiGet a10, AbiGet a11, AbiGet a12, AbiGet a13, AbiGet a14, AbiGet a15, AbiGet a16, AbiGet a17, AbiGet a18, AbiGet a19) => AbiGet (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19) Source # | |
Defined in Data.Solidity.Prim.Tuple | |
(AbiGet a1, AbiGet a2, AbiGet a3, AbiGet a4, AbiGet a5, AbiGet a6, AbiGet a7, AbiGet a8, AbiGet a9, AbiGet a10, AbiGet a11, AbiGet a12, AbiGet a13, AbiGet a14, AbiGet a15, AbiGet a16, AbiGet a17, AbiGet a18, AbiGet a19, AbiGet a20) => AbiGet (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) Source # | |
Defined in Data.Solidity.Prim.Tuple |
class GenericAbiGet a where Source #
A class for decoding generically composed datatypes from their abi encoding
Instances
(AbiGet a, GenericAbiGet (NP I as)) => GenericAbiGet (NP I (a ': as)) Source # | |
GenericAbiGet (NP f ('[] :: [k])) Source # | |
GenericAbiGet (NP f as) => GenericAbiGet (SOP f '[as]) Source # | |