cmditch/elm-ethereum/3.0.1

NOTE: the latest version is 5.0.0

Abi.Decode

Decode RPC Responses

)

Primitives

type AbiDecoder a
uint : AbiDecoder BigInt
int : AbiDecoder BigInt

Bytes

staticBytes : Int -> AbiDecoder String

Arrays

staticArray : Int -> AbiDecoder a -> AbiDecoder (List a)

Decode Statically Sized Arrays

staticArray 10 uint == uint256 [ 10 ]

Decode Dynamically Sized Arrays

Run Decoders

Similar to Json.Decode.succeed, or pure in Haskell

andMap : AbiDecoder a -> AbiDecoder (a -> b) -> AbiDecoder b
toElmDecoder : AbiDecoder a -> Decoder a
fromString : AbiDecoder a -> String -> Result String a

Events/Logs

topic : Int -> AbiDecoder a -> Decoder a

Useful for decoding data withing events/logs.

data : Int -> AbiDecoder a -> Decoder a

Useful for decoding data withing events/logs.

TODO - Will this work if dynamic types are in the log data? dropBytes might mess with the length of grabbing dyn vals off the Original Tape