diff --git a/mp_starknet/crypto/commitment/fn.calculate_event_hash.html b/mp_starknet/crypto/commitment/fn.calculate_event_hash.html index c77dfee125..91fce4de75 100644 --- a/mp_starknet/crypto/commitment/fn.calculate_event_hash.html +++ b/mp_starknet/crypto/commitment/fn.calculate_event_hash.html @@ -1,4 +1,4 @@ calculate_event_hash in mp_starknet::crypto::commitment - Rust
pub fn calculate_event_hash<T: HasherT>(event: &EventWrapper) -> FieldElement
Expand description

Calculate the hash of an event.

-

See the documentation +

See the documentation for details.

\ No newline at end of file diff --git a/mp_starknet/crypto/commitment/index.html b/mp_starknet/crypto/commitment/index.html index fd28351e72..b7888ce1b8 100644 --- a/mp_starknet/crypto/commitment/index.html +++ b/mp_starknet/crypto/commitment/index.html @@ -1,2 +1,2 @@ mp_starknet::crypto::commitment - Rust
Expand description

Compute the various commitments.

-

Structs

  • A Patricia Merkle tree with height 251 used to compute transaction and event commitments.

Functions

Type Definitions

\ No newline at end of file +

Structs

Functions

Type Definitions

\ No newline at end of file diff --git a/mp_starknet/crypto/commitment/struct.StateCommitmentTree.html b/mp_starknet/crypto/commitment/struct.StateCommitmentTree.html index cec686694b..e5a480c487 100644 --- a/mp_starknet/crypto/commitment/struct.StateCommitmentTree.html +++ b/mp_starknet/crypto/commitment/struct.StateCommitmentTree.html @@ -1,5 +1,5 @@ -StateCommitmentTree in mp_starknet::crypto::commitment - Rust
pub struct StateCommitmentTree<T: HasherT> { /* private fields */ }
Expand description

A Patricia Merkle tree with height 251 used to compute transaction and event commitments.

-

According to the documentation +StateCommitmentTree in mp_starknet::crypto::commitment - Rust

pub struct StateCommitmentTree<T: HasherT> { /* private fields */ }
Expand description

A Patricia Merkle tree with height 251 used to compute contract and class tree commitments.

+

According to the documentation the commitment trees are of height 251, because the key used is a Field Element.

The tree height is 251 in our case since our set operation takes Fieldelement index values.

Implementations§

source§

impl<T: HasherT> StateCommitmentTree<T>

source

pub fn set(&mut self, index: Felt252Wrapper, value: Felt252Wrapper)

Sets the value of a key in the merkle tree.

diff --git a/src/mp_starknet/crypto/commitment/mod.rs.html b/src/mp_starknet/crypto/commitment/mod.rs.html index cf58d124ae..fb2a8e07a0 100644 --- a/src/mp_starknet/crypto/commitment/mod.rs.html +++ b/src/mp_starknet/crypto/commitment/mod.rs.html @@ -393,7 +393,7 @@ /// A Patricia Merkle tree with height 64 used to compute transaction and event commitments. /// -/// According to the [documentation](https://docs.starknet.io/docs/Blocks/header/#block-header) +/// According to the [documentation](https://docs.starknet.io/documentation/architecture_and_concepts/Blocks/header/) /// the commitment trees are of height 64, because the key used is the 64 bit representation /// of the index of the transaction / event within the block. /// @@ -426,9 +426,9 @@ } } -/// A Patricia Merkle tree with height 251 used to compute transaction and event commitments. +/// A Patricia Merkle tree with height 251 used to compute contract and class tree commitments. /// -/// According to the [documentation](https://docs.starknet.io/docs/Blocks/header/#block-header) +/// According to the [documentation](https://docs.starknet.io/documentation/architecture_and_concepts/State/starknet-state/) /// the commitment trees are of height 251, because the key used is a Field Element. /// /// The tree height is 251 in our case since our set operation takes Fieldelement index values. @@ -735,7 +735,7 @@ /// Calculate the hash of an event. /// -/// See the [documentation](https://docs.starknet.io/docs/Events/starknet-events#event-hash) +/// See the [documentation](https://docs.starknet.io/documentation/architecture_and_concepts/Events/starknet-events/#event_hash) /// for details. pub fn calculate_event_hash<T: HasherT>(event: &EventWrapper) -> FieldElement { let hasher = T::default();