Expand description
Utilities used for serializing/deserializing sequencer REST API related data.
Modules§
- u64_
as_ hex_ str - A Serde helper module to be used as
#[serde(with = "u64_as_hex_str")]Helps us keep primitive types in struct fields.
Structs§
- Call
Param AsDecimal Str - Constructor
Param AsDecimal Str - Ethereum
Address AsHex Str - GasPrice
AsHex Str - H256
AsNo Leading Zeros HexStr - L1To
L2Message Payload Elem AsDecimal Str - L2To
L1Message Payload Elem AsDecimal Str - Resource
Amount AsHex Str - Resource
Price PerUnit AsHex Str - Starknet
Block Number AsHex Str - TipAs
HexStr - Transaction
Signature Elem AsDecimal Str - U64As
HexStr - U256
AsHex Str
Functions§
- block_
number_ as_ hex_ str - Converts a BlockNumber to a RPC-compatible hex string.
- bytes_
as_ hex_ str - A convenience function which produces a “0x” prefixed hex str slice in a
given buffer
buffrom an array of bytes. Panics ifbytes.len() * 2 + 2 > buf.len() - bytes_
to_ hex_ str - A convenience function which produces a “0x” prefixed hex string from a Felt.
- extract_
program_ and_ entry_ points_ by_ type - Extract JSON representation of program and entry points from the contract definition.
- h256_
as_ no_ leading_ zeros_ hex_ str - A convenience function which produces a “0x” prefixed hex string from a H256.
- starkhash_
to_ dec_ str - A helper conversion function. Only use with sequencer API related types.