From b449ac06dd1612e52f4c1f5e54212724a3dbd4f8 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Wed, 8 Mar 2023 16:11:55 +0100 Subject: [PATCH] chore: add from u256 impl to JsonU256 (#1673) --- crates/primitives/src/serde_helper/jsonu256.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/primitives/src/serde_helper/jsonu256.rs b/crates/primitives/src/serde_helper/jsonu256.rs index 58c7158061..3cf187f1f3 100644 --- a/crates/primitives/src/serde_helper/jsonu256.rs +++ b/crates/primitives/src/serde_helper/jsonu256.rs @@ -15,6 +15,12 @@ impl From for U256 { } } +impl From for JsonU256 { + fn from(value: U256) -> Self { + JsonU256(value) + } +} + impl Serialize for JsonU256 { fn serialize(&self, serializer: S) -> Result where