mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Set default EVM version to Istanbul.
This commit is contained in:
parent
d0f9201ed4
commit
dc79274871
@ -34,4 +34,4 @@ for OPTIMIZE in 0 1; do
|
||||
done
|
||||
done
|
||||
|
||||
EVM=constantinople OPTIMIZE=1 ABI_ENCODER_V2=1 ${REPODIR}/.circleci/soltest.sh
|
||||
EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V2=1 ${REPODIR}/.circleci/soltest.sh
|
||||
|
@ -6,6 +6,7 @@ Language Features:
|
||||
|
||||
|
||||
Compiler Features:
|
||||
* Set the default EVM version to "Istanbul".
|
||||
* Commandline Interface: Allow translation from yul / strict assembly to EWasm using ``solc --yul --yul-dialect evm --machine eWasm``
|
||||
* SMTChecker: Add support to constructors including constructor inheritance.
|
||||
* Yul: When compiling via Yul, string literals from the Solidity code are kept as string literals if every character is safely printable.
|
||||
|
@ -120,9 +120,9 @@ at each version. Backward compatibility is not guaranteed between each version.
|
||||
- ``constantinople``
|
||||
- Opcodes ``create2`, ``extcodehash``, ``shl``, ``shr`` and ``sar`` are available in assembly.
|
||||
- Shifting operators use shifting opcodes and thus need less gas.
|
||||
- ``petersburg`` (**default**)
|
||||
- ``petersburg``
|
||||
- The compiler behaves the same way as with constantinople.
|
||||
- ``istanbul``
|
||||
- ``istanbul`` (**default**)
|
||||
- Opcodes ``chainid`` and ``selfbalance`` are available in assembly.
|
||||
- ``berlin`` (**experimental**)
|
||||
|
||||
|
@ -98,7 +98,7 @@ private:
|
||||
|
||||
EVMVersion(Version _version): m_version(_version) {}
|
||||
|
||||
Version m_version = Version::Petersburg;
|
||||
Version m_version = Version::Istanbul;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -656,7 +656,8 @@ Allowed options)",
|
||||
(
|
||||
g_strEVMVersion.c_str(),
|
||||
po::value<string>()->value_name("version"),
|
||||
"Select desired EVM version. Either homestead, tangerineWhistle, spuriousDragon, byzantium, constantinople, petersburg (default), istanbul or berlin."
|
||||
"Select desired EVM version. Either homestead, tangerineWhistle, spuriousDragon, "
|
||||
"byzantium, constantinople, petersburg, istanbul (default) or berlin."
|
||||
)
|
||||
(g_argOptimize.c_str(), "Enable bytecode optimizer.")
|
||||
(
|
||||
|
@ -900,9 +900,11 @@ BOOST_AUTO_TEST_CASE(evm_version)
|
||||
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"constantinople\"") != string::npos);
|
||||
result = compile(inputForVersion("\"evmVersion\": \"petersburg\","));
|
||||
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"petersburg\"") != string::npos);
|
||||
result = compile(inputForVersion("\"evmVersion\": \"istanbul\","));
|
||||
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"istanbul\"") != string::npos);
|
||||
// test default
|
||||
result = compile(inputForVersion(""));
|
||||
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"petersburg\"") != string::npos);
|
||||
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"istanbul\"") != string::npos);
|
||||
// test invalid
|
||||
result = compile(inputForVersion("\"evmVersion\": \"invalid\","));
|
||||
BOOST_CHECK(result["errors"][0]["message"].asString() == "Invalid EVM version requested.");
|
||||
|
Loading…
Reference in New Issue
Block a user