Evm_node_lib_dev_encoding.Ethereum_types
val hex_encoding : hex Tezos_base.TzPervasives.Data_encoding.t
val hex_encoding_no0x : hex Tezos_base.TzPervasives.Data_encoding.t
version of hex_encoding
that do not add `0x` on encoded values.
val hex_to_string : hex -> string
Produced string is prefixed with 0x
.
val hex_of_string : string -> hex
Strips the 0x
prefix of a string.
val hex_encode_string : string -> hex
Encodes a string into hexa. see Hex.of_string
E.g. hex_encode_string "Mirage OS"
is Hex "4d69726167654f53"
val hex_to_bytes : hex -> string
hex_to_bytes hex
transforms the hex
to binary format.
val hex_to_real_bytes : hex -> bytes
hex_to_real_bytes hex
transforms the hex
to bytes.
val hex_of_utf8 : string -> hex
hex_of_utf8
encodes a string to its utf8 representation in hexadecimal.
val hex_of_bytes : bytes -> hex
hex_of_bytes
transforms the bytes
to hexadecimal.
Ethereum block hash (32 bytes)
val block_hash_encoding : block_hash Tezos_base.TzPervasives.Data_encoding.t
val pp_block_hash : Stdlib.Format.formatter -> block_hash -> unit
val decode_block_hash : bytes -> block_hash
val encode_block_hash : block_hash -> bytes
val genesis_parent_hash : block_hash
val block_hash_to_bytes : block_hash -> string
val block_hash_of_bytes : bytes -> block_hash
val block_hash_of_string : string -> block_hash
module Qty : sig ... end
val quantity_encoding : quantity Tezos_base.TzPervasives.Data_encoding.t
val pp_quantity : Stdlib.Format.formatter -> quantity -> unit
val quantity_of_z : Z.t -> quantity
val decode_number_le : bytes -> quantity
val decode_number_be : bytes -> quantity
val encode_u256_le : quantity -> bytes
val encode_u64_le : quantity -> bytes
u16_to_bytes n
Translate an int in a binary string of two bytes (little endian). Ints greater than 2 bytes are truncated.
Ethereum hash, that would encoded with a 0x prefix.
val hash_encoding : hash Tezos_base.TzPervasives.Data_encoding.t
val pp_hash : Stdlib.Format.formatter -> hash -> unit
val decode_hash : bytes -> hash
val hash_of_string : string -> hash
hash_of_string s
takes a string s
representing a hash in hexadecimal format, e.g. 0xFFFFFFF
. Strips the prefix and keeps the hash value, e.g. FFFFFFF
.
val hash_to_string : hash -> string
hash_to_string h
constructs a valid hash encoded in hexadecimal format, e.g. 0xFFFFFFF
.
val hash_to_bytes : hash -> string
hash_to_bytes hash
transforms the hash
to binary format.
Ethereum address (20 bytes)
val address_encoding : address Tezos_base.TzPervasives.Data_encoding.t
val decode_address : bytes -> address
val legacy_transaction_object_encoding :
legacy_transaction_object Tezos_base.TzPervasives.Data_encoding.t
val legacy_transaction_object_from_rlp_item :
block_hash option ->
Rlp.item ->
legacy_transaction_object
val legacy_transaction_object_from_rlp :
block_hash option ->
bytes ->
legacy_transaction_object
type 'transaction_object block_transactions =
| TxHash of hash list
| TxFull of 'transaction_object list
type 'transaction_object block = {
number : quantity;
hash : block_hash;
parent : block_hash;
nonce : hex;
sha3Uncles : hash;
logsBloom : hex;
transactionRoot : hash;
stateRoot : hash;
receiptRoot : hash;
miner : hex;
difficulty : quantity;
totalDifficulty : quantity;
extraData : hex;
size : quantity;
gasLimit : quantity;
gasUsed : quantity;
timestamp : quantity;
transactions : 'transaction_object block_transactions;
uncles : hash list;
baseFeePerGas : quantity option;
prevRandao : block_hash option;
withdrawals : hash list option;
withdrawalsRoot : hash option;
blobGasUsed : hex option;
excessBlobGas : hex option;
parentBeaconBlockRoot : hash option;
}
Ethereum block hash representation from RPCs.
val block_encoding :
'transaction_object Tezos_base.TzPervasives.Data_encoding.t ->
'transaction_object block Tezos_base.TzPervasives.Data_encoding.t
val block_transactions_encoding :
'a Tezos_base.TzPervasives.Data_encoding.t ->
'a block_transactions Tezos_base.TzPervasives.Data_encoding.t
val call_encoding : call Tezos_base.TzPervasives.Data_encoding.t
module NonceMap : sig ... end
module AddressMap : sig ... end
type txpool = {
pending : legacy_transaction_object NonceMap.t AddressMap.t;
queued : legacy_transaction_object NonceMap.t AddressMap.t;
}
val txpool_encoding : txpool Tezos_base.TzPervasives.Data_encoding.t
module StorageMap : sig ... end
type state_account_override = {
balance : quantity option;
nonce : quantity option;
code : hex option;
state_diff : hex StorageMap.t;
state : hex StorageMap.t option;
}
type state_override = state_account_override AddressMap.t
val state_override_encoding :
state_override Tezos_base.TzPervasives.Data_encoding.t
val state_override_empty : state_override
val block_from_rlp : bytes -> legacy_transaction_object block
module Block_parameter : sig ... end
module Address : sig ... end
val timestamp_to_bytes : Tezos_base.TzPervasives.Time.Protocol.t -> bytes
timestamp_to_bytes timestamp
transforms the timestamp to bytes compatible with the kernel.
val bool_to_rlp_bytes : bool -> Rlp.item
See bool encoding for RLP: https://docs.rs/ethereum-rlp/latest/src/rlp/impls.rs.html#36-44
val hash_raw_tx : string -> hash
val timestamp_of_bytes : bytes -> Tezos_base.TzPervasives.Time.Protocol.t
val encode_address : address -> bytes
val transaction_log_encoding :
transaction_log Tezos_base.TzPervasives.Data_encoding.t
val decode_hex : bytes -> hex
module From_rlp : sig ... end
module Filter : sig ... end
module Subscription : sig ... end