Module utils

Source
Expand description

Structs and traits for the utility package.

Modules§

as_hex
Handle serializing and deserializing from Vec<u8> to hexadecimal
as_hex_option
Handle serializing and deserializing from Option<Vec<u8>> to hexadecimal
as_string
Handle serializing and deserializing from Vec<u8> to a UTF-8 string
as_string_option
Handle serializing and deserializing from Option<Vec<u8>> to a UTF-8 string

Enums§

DetectedChainType
An enum that shows the detected chain type

Constants§

MAINNET_GENESIS_HASH
Mainnet Genesis Hash 0x4a587bf17a404e3572747add7aab7bbe56e805a5479c6c436f07f36fcc8d3ae1
TESTNET_ON_PASEO_GENESIS_HASH
Frequency Testnet on Paseo Genesis Hash 0x203c6838fc78ea3660a2f298a58d859519c72a5efdc0f194abd6f0d5ce1838e0
TESTNET_ON_WESTEND_GENESIS_HASH
Frequency Testnet on Westend Genesis Hash 0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e

Functions§

get_chain_type_by_genesis_hash
Finds the chain type by genesis hash
to_abi_compatible_number
Generic function for converting any unsigned integer to a 32-byte array compatible with ETH abi
wrap_binary_data
Wraps PREFIX and POSTFIX around a Vec<u8> Returns PREFIX ++ data ++ POSTFIX