From 880bbca1b8b90fb3cb3be6831bb31544f8229cf7 Mon Sep 17 00:00:00 2001 From: Jonathan LEI Date: Thu, 8 Aug 2024 09:07:30 +0800 Subject: [PATCH] chore: derive serde traits --- crates/trie/common/src/proofs.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/trie/common/src/proofs.rs b/crates/trie/common/src/proofs.rs index 7863ed7b6b2e..87f9b4e4b6c2 100644 --- a/crates/trie/common/src/proofs.rs +++ b/crates/trie/common/src/proofs.rs @@ -9,6 +9,7 @@ use alloy_trie::{ EMPTY_ROOT_HASH, }; use reth_primitives_traits::{constants::KECCAK_EMPTY, Account}; +use serde::{Deserialize, Serialize}; use std::collections::{BTreeMap, HashMap}; /// The state multiproof of target accounts and multiproofs of their storage tries. @@ -119,7 +120,8 @@ impl StorageMultiProof { } /// The merkle proof with the relevant account info. -#[derive(PartialEq, Eq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] pub struct AccountProof { /// The address associated with the account. pub address: Address, @@ -174,7 +176,7 @@ impl AccountProof { } /// The merkle proof of the storage entry. -#[derive(PartialEq, Eq, Default, Debug)] +#[derive(Clone, PartialEq, Eq, Default, Debug, Serialize, Deserialize)] pub struct StorageProof { /// The raw storage key. pub key: B256,