From d2a4bc0541f1d8e6551672fb049311611c98c146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Sun, 12 Jan 2020 15:59:13 +0100 Subject: [PATCH] Implement Tokenize for fixed-size arrays up to 16 elements. (#307) * Implement Tokenize for fixed-size arrays up to 16 elements. * Fix formatting. --- src/contract/tokens.rs | 9 +++++++++ src/types/trace_filtering.rs | 6 ++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/contract/tokens.rs b/src/contract/tokens.rs index c77dddcf..4b72ac16 100644 --- a/src/contract/tokens.rs +++ b/src/contract/tokens.rs @@ -376,7 +376,16 @@ impl_fixed_types!(2); impl_fixed_types!(3); impl_fixed_types!(4); impl_fixed_types!(5); +impl_fixed_types!(6); +impl_fixed_types!(7); impl_fixed_types!(8); +impl_fixed_types!(9); +impl_fixed_types!(10); +impl_fixed_types!(11); +impl_fixed_types!(12); +impl_fixed_types!(13); +impl_fixed_types!(14); +impl_fixed_types!(15); impl_fixed_types!(16); impl_fixed_types!(32); impl_fixed_types!(64); diff --git a/src/types/trace_filtering.rs b/src/types/trace_filtering.rs index 3cc4fd87..47dc801e 100644 --- a/src/types/trace_filtering.rs +++ b/src/types/trace_filtering.rs @@ -277,8 +277,7 @@ pub enum RewardType { mod tests { use super::*; - const EXAMPLE_TRACE_CALL: &'static str = - r#"{ + const EXAMPLE_TRACE_CALL: &'static str = r#"{ "action": { "callType": "call", "from": "0xd1220a0cf47c7b9be7a2e6ba89f429762e7b9adb", @@ -300,8 +299,7 @@ mod tests { "type": "call" }"#; - const EXAMPLE_TRACE_CREATE: &'static str = - r#"{ + const EXAMPLE_TRACE_CREATE: &'static str = r#"{ "action": { "from": "0xd1220a0cf47c7b9be7a2e6ba89f429762e7b9adb", "gas": "0x63ab9",