From ca7d5d91aa0e9018f54919ee9d2da15243c7d3a2 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 8 Aug 2019 17:18:58 +0200 Subject: [PATCH] examples: dump storage key "0" because some examples write to it --- examples/example.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/example.c b/examples/example.c index 36cbf3b..891fe9c 100644 --- a/examples/example.c +++ b/examples/example.c @@ -72,6 +72,12 @@ int main(int argc, char* argv[]) for (i = 0; i < result.output_size; i++) printf("%02x", result.output_data[i]); printf("\n"); + const evmc_bytes32 storage_key = {{0}}; + evmc_bytes32 storage_value = ctx->host->get_storage(ctx, &msg.destination, &storage_key); + printf(" Storage at 0x00..00: "); + for (i = 0; i < sizeof(storage_value.bytes) / sizeof(storage_value.bytes[0]); i++) + printf("%02x", storage_value.bytes[i]); + printf("\n"); } evmc_release_result(&result); example_host_destroy_context(ctx);