Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

encode

Fully qualified path: alexandria_encoding::sol_abi::encode

Traits

SolAbiEncodeSelectorTraitEncode selector trait meant to provide an interface similar to Solidity’s abi.encodeWithSelector function. It is meant to be the first call in an…
SolAbiEncodeTraitEncode trait meant to provide an interface similar to Solidity’s abi.encode function. It is meant to allow chaining of encode calls to build up a Bytes

Impls

SolAbiEncodeSelector
SolAbiEncodeU8Encode int types Integers are encoded as 32 bytes long, which are right-aligned/left-padded Big-endian. Packed encodings are not padded and only append the bytes of the value based on type.
SolAbiEncodeU16
SolAbiEncodeU32
SolAbiEncodeU64
SolAbiEncodeU128
SolAbiEncodeU256
SolAbiEncodeBoolEncode other primitives Primitives are encoded as 32 bytes long, which are right-aligned/left-padded Big-endian. Packed encodings are not padded and only append the bytes of the value based on type.
SolAbiEncodeFelt252
SolAbiEncodeBytes31
SolAbiEncodeBytesEncode byte types Bytes are encoded as 32 bytes long, which are left-aligned/right-padded. Packed encodings are not padded and only append the bytes up to the length of the value.
SolAbiEncodeByteArray
SolAbiEncodeStarknetAddressEncode address types Addresses are encoded as 32 bytes long, which are right-aligned/left-padded Big-endian. Packed encodings are not padded and only append the bytes of the value based on type.
SolAbiEncodeEthAddress