Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/quietgarden/elm-web3 is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 2.0.0 found (5 same-name repos checked); no cached copy. Use another version.
Helpers to decode contract return values from JSON received through ports from the JS Web3 layer.
Decode a uint256 return value as a BigInt. Accepts both decimal strings ("100") and 0x-prefixed hex strings ("0x64").
Decode a bool return value.
Decode a string return value.
Decode a bytes32 hex string (e.g. an event topic). Expects a 0x-prefixed 66-character hex string and returns it as-is.
Decode a uint8 return value as an Elm Int (validated 0–255).
Decode a uint16 return value as an Elm Int (validated 0–65535).
Decode a uint32 return value as an Elm Int (validated 0–4294967295).
Extract the 64-character hex of the 32-byte word at slot index n
(0-indexed) from a 0x-prefixed ABI-encoded hex string.
hexSlot 0 "0x0000...0064" == "0000...0064"Decode a uint256 from slot n of a raw 0x-hex ABI response.
Decode an Address from slot n of a raw 0x-hex ABI response.
Addresses are right-aligned in the 32-byte slot.
Decode a bool from slot n of a raw 0x-hex ABI response.
Decode a dynamic UTF-8 string from slot n of a raw 0x-hex ABI response.
Slot n contains an offset pointer; the string length and data follow at
that offset.
Decode a dynamic array from slot n. Each element is decoded by calling
elemDecoder slotIndex fullHex. Works for static-element arrays (uint256[],
address[], etc.) where elements are stored consecutively.
Decode a static 2-tuple from the head of a 0x-hex ABI response. Each decoder is called with its slot index (0, 1).
Decode a static 3-tuple from the head of a 0x-hex ABI response.
Attempt to decode an EVM revert reason from raw revert data.
Checks for the Error(string) selector 0x08c379a2 and decodes the
ABI-encoded string that follows. Returns Nothing if the data is not
a standard Error(string) revert.
decodeRevertReason "0x08c379a200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000011496e73756666696369656e742066756e647300000000000000000000000000"
--> Just "Insufficient funds"
Decode an Address return value.