From 58f0866910fe4c96882b31c39dc4edeaafdede53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 6 Dec 2023 14:24:24 +0100 Subject: [PATCH] JournalBase --- test/state/state.hpp | 46 +++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/test/state/state.hpp b/test/state/state.hpp index 1e8c2f140c..4b52e5db6b 100644 --- a/test/state/state.hpp +++ b/test/state/state.hpp @@ -15,52 +15,45 @@ namespace evmone::state { -struct JournalBalanceChange +struct JournalBase { address addr; - intx::uint256 prev_balance; }; -struct JournalTouched +struct JournalBalanceChange : JournalBase { - address addr; + intx::uint256 prev_balance; }; -struct JournalStorageChange +struct JournalTouched : JournalBase +{}; + +struct JournalStorageChange : JournalBase { - address addr; bytes32 key; bytes32 prev_value; evmc_access_status prev_access_status; }; -struct JournalTransientStorageChange +struct JournalTransientStorageChange : JournalBase { - address addr; bytes32 key; bytes32 prev_value; }; -struct JournalNonceBump -{ - address addr; -}; +struct JournalNonceBump : JournalBase +{}; -struct JournalCreate +struct JournalCreate : JournalBase { - address addr; bool existed; }; -struct JournalDestruct -{ - address addr; -}; +struct JournalDestruct : JournalBase +{}; -struct JournalAccessAccount -{ - address addr; -}; +struct JournalAccessAccount : JournalBase +{}; using JournalEntry = std::variant