From a5fda6f03e6cb3e8288a9c85f035a74bdc46af5e Mon Sep 17 00:00:00 2001 From: ZuphitF Date: Tue, 18 Jul 2023 11:51:36 +0300 Subject: [PATCH] add Fee::ZERO --- src/transaction.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/transaction.rs b/src/transaction.rs index ccd2611e..a7629daa 100644 --- a/src/transaction.rs +++ b/src/transaction.rs @@ -277,6 +277,10 @@ pub struct TransactionReceipt { #[serde(from = "PrefixedBytesAsHex<16_usize>", into = "PrefixedBytesAsHex<16_usize>")] pub struct Fee(pub u128); +impl Fee { + pub const ZERO: Self = Self(0); +} + impl From> for Fee { fn from(val: PrefixedBytesAsHex<16_usize>) -> Self { Self(u128::from_be_bytes(val.0))