Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EVMC_LATEST_STABLE_REVISON #605

Merged
merged 1 commit into from
Jun 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion include/evmc/evmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,14 @@ enum evmc_revision
EVMC_SHANGHAI = 10,

/** The maximum EVM revision supported. */
EVMC_MAX_REVISION = EVMC_SHANGHAI
EVMC_MAX_REVISION = EVMC_SHANGHAI,

/**
* The latest known EVM revision with finalized specification.
*
* This is handy for EVM tools to always use the latest revision available.
*/
EVMC_LATEST_STABLE_REVISION = EVMC_LONDON
};


Expand Down
6 changes: 6 additions & 0 deletions test/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ add_evmc_tool_test(
"Result: +success[\r\n]+Gas used: +7[\r\n]+Output: +aabbccdd00000000000000000000000000000000000000000000000000000000[\r\n]"
)

add_evmc_tool_test(
default_revision
"--vm $<TARGET_FILE:evmc::example-vm> run 00"
"Executing on London"
)

add_evmc_tool_test(
create_return_2
"--vm $<TARGET_FILE:evmc::example-vm> run --create 6960026000526001601ff3600052600a6016f3"
Expand Down
2 changes: 1 addition & 1 deletion tools/evmc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int main(int argc, const char** argv)
std::string vm_config;
std::string code_arg;
int64_t gas = 1000000;
auto rev = EVMC_BERLIN;
auto rev = EVMC_LATEST_STABLE_REVISION;
std::string input_arg;
auto create = false;
auto bench = false;
Expand Down