examples: dump storage key "0" because some examples write to it

This commit is contained in:
Alex Beregszaszi 2019-08-08 17:18:58 +02:00
parent dd065265d9
commit ca7d5d91aa
1 changed files with 6 additions and 0 deletions

View File

@ -72,6 +72,12 @@ int main(int argc, char* argv[])
for (i = 0; i < result.output_size; i++) for (i = 0; i < result.output_size; i++)
printf("%02x", result.output_data[i]); printf("%02x", result.output_data[i]);
printf("\n"); 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); evmc_release_result(&result);
example_host_destroy_context(ctx); example_host_destroy_context(ctx);