Skip to content

Commit

Permalink
feat: add derive features (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoavGrs authored Jun 9, 2024
1 parent c6cacd7 commit 1521999
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "starknet_api"
version = "0.13.0-dev.5"
version = "0.13.0-dev.6"
edition = "2021"
repository = "https://github.com/starkware-libs/starknet-api"
license = "Apache-2.0"
Expand Down
6 changes: 4 additions & 2 deletions src/block_hash/block_hash_calculator.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use once_cell::sync::Lazy;
use serde::Deserialize;
use serde::{Deserialize, Serialize};
use starknet_types_core::felt::Felt;
use starknet_types_core::hash::Poseidon;

Expand Down Expand Up @@ -27,7 +27,7 @@ static STARKNET_BLOCK_HASH0: Lazy<Felt> = Lazy::new(|| {
});

/// The common fields of transaction output types.
#[derive(Clone, Deserialize, PartialEq, Eq)]
#[derive(Clone, Debug, Deserialize, PartialEq, Eq)]
pub struct TransactionOutputForHash {
pub actual_fee: Fee,
pub events: Vec<Event>,
Expand All @@ -36,13 +36,15 @@ pub struct TransactionOutputForHash {
pub messages_sent: Vec<MessageToL1>,
}

#[derive(Clone, Debug, Deserialize, Eq, PartialEq)]
pub struct TransactionHashingData {
pub transaction_signature: Option<TransactionSignature>,
pub transaction_output: TransactionOutputForHash,
pub transaction_hash: TransactionHash,
}

/// Commitments of a block.
#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
pub struct BlockHeaderCommitments {
pub transactions_commitment: TransactionCommitment,
pub events_commitment: EventCommitment,
Expand Down

0 comments on commit 1521999

Please sign in to comment.