Module

Network.Ethereum.Web3.Solidity.AbiEncoding

Package
purescript-web3
Repository
f-o-a-m/purescript-web3

#ABIEncode Source

class ABIEncode a  where

Class representing values that have an encoding and decoding instance to/from a solidity type.

Members

Instances

#fromData Source

fromData :: forall a. ABIDecode a => HexString -> Either ParseError a

Parse encoded value, droping the leading 0x

#bytesBuilder Source

bytesBuilder :: ByteString -> HexString

Special Builders and Parsers base16 encode, then utf8 encode, then pad

#bytesDecode Source

bytesDecode :: String -> ByteString

unsafe utfDecode

#int256HexBuilder Source

int256HexBuilder :: BigNumber -> HexString

Encode something that is essentaially a signed integer.

#uInt256HexBuilder Source

uInt256HexBuilder :: BigNumber -> HexString

Encode something that is essentially an unsigned integer.

#int256HexParser Source

int256HexParser :: forall m. Monad m => ParserT String m BigNumber

Parse as a signed BigNumber

#uInt256HexParser Source

uInt256HexParser :: forall m. Monad m => ParserT String m BigNumber

Parse an unsigned BigNumber

#fromBool Source

fromBool :: Boolean -> BigNumber

Decode a Boolean as a BigNumber

#toBool Source

toBool :: BigNumber -> Boolean

Encode a Boolean as a BigNumber

#take Source

take :: forall m. Monad m => Int -> ParserT String m HexString

Read any number of HexDigits