diff options
author | chriseth <chris@ethereum.org> | 2018-03-13 03:06:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-13 03:06:57 +0800 |
commit | 0062cddad3f13f46865e2e95bb6cdab16feae484 (patch) | |
tree | 964e42073f50a378cd2a371f40bbd30a3430bb57 | |
parent | 15a0b97f61e76e4a5615f04c116688bf98367076 (diff) | |
parent | a59d6d2e5303e714a6e66a5d11bd6a9c2e904e4e (diff) | |
download | dexon-solidity-0062cddad3f13f46865e2e95bb6cdab16feae484.tar dexon-solidity-0062cddad3f13f46865e2e95bb6cdab16feae484.tar.gz dexon-solidity-0062cddad3f13f46865e2e95bb6cdab16feae484.tar.bz2 dexon-solidity-0062cddad3f13f46865e2e95bb6cdab16feae484.tar.lz dexon-solidity-0062cddad3f13f46865e2e95bb6cdab16feae484.tar.xz dexon-solidity-0062cddad3f13f46865e2e95bb6cdab16feae484.tar.zst dexon-solidity-0062cddad3f13f46865e2e95bb6cdab16feae484.zip |
Merge pull request #3713 from ethereum/version-constantinople
Support constantinople in evm-version
-rw-r--r-- | Changelog.md | 5 | ||||
-rw-r--r-- | libsolidity/interface/EVMVersion.h | 2 | ||||
-rw-r--r-- | test/libsolidity/StandardCompiler.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/Changelog.md b/Changelog.md index 6a25569f..648af66c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,11 +2,10 @@ Features: - Bugfixes: * Code Generator: Properly skip unneeded storgae array cleanup when not reducing length. - - + * Commandline interface: Support ``--evm-version constantinople`` properly. + * Standard JSON: Support ``constantinople`` as ``evmVersion`` properly. ### 0.4.21 (2018-03-07) diff --git a/libsolidity/interface/EVMVersion.h b/libsolidity/interface/EVMVersion.h index 13c4ec94..b68e1f4e 100644 --- a/libsolidity/interface/EVMVersion.h +++ b/libsolidity/interface/EVMVersion.h @@ -49,7 +49,7 @@ public: static boost::optional<EVMVersion> fromString(std::string const& _version) { - for (auto const& v: {homestead(), tangerineWhistle(), spuriousDragon(), byzantium()}) + for (auto const& v: {homestead(), tangerineWhistle(), spuriousDragon(), byzantium(), constantinople()}) if (_version == v.name()) return v; return {}; diff --git a/test/libsolidity/StandardCompiler.cpp b/test/libsolidity/StandardCompiler.cpp index 4c8918be..dd6eb7c4 100644 --- a/test/libsolidity/StandardCompiler.cpp +++ b/test/libsolidity/StandardCompiler.cpp @@ -752,6 +752,8 @@ BOOST_AUTO_TEST_CASE(evm_version) BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"spuriousDragon\"") != string::npos); result = compile(inputForVersion("\"evmVersion\": \"byzantium\",")); BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"byzantium\"") != string::npos); + result = compile(inputForVersion("\"evmVersion\": \"constantinople\",")); + BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"constantinople\"") != string::npos); // test default result = compile(inputForVersion("")); BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"byzantium\"") != string::npos); |