Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add derive features #274

Merged
merged 1 commit into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading