Commit Graph

22 Commits

Author SHA1 Message Date
Peter Lemenkov
6a6bf303b5 libsolutil: Add missing include
This one is more obscure. It helps suppressing the following error while
compiling:

```
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:33:6: error: elaborated-type-specifier for a scoped enum must not use the 'class' keyword [-Werror]
   33 | enum class Instruction: uint8_t;
      | ~~~~ ^~~~~
      |      -----
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:33:23: error: found ':' in nested-name-specifier, expected '::'
   33 | enum class Instruction: uint8_t;
      |                       ^
      |                       ::
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:33:12: error: 'Instruction' has not been declared
   33 | enum class Instruction: uint8_t;
      |            ^~~~~~~~~~~
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:101:24: error: 'solidity::evmasm::Instruction' has not been declared
  101 |         bool hasOpcode(evmasm::Instruction _opcode) const;
      |                        ^~~~~~
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.cpp:29:6: error: no declaration matches 'bool solidity::langutil::EVMVersion::hasOpcode(solidity::evmasm::Instruction) const'
   29 | bool EVMVersion::hasOpcode(Instruction _opcode) const
      |      ^~~~~~~~~~
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:101:14: note: candidate is: 'bool solidity::langutil::EVMVersion::hasOpcode(int) const'
  101 |         bool hasOpcode(evmasm::Instruction _opcode) const;
      |              ^~~~~~~~~
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:43:7: note: 'class solidity::langutil::EVMVersion' defined here
   43 | class EVMVersion:
      |       ^~~~~~~~~~
cc1plus: all warnings being treated as errors
```

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2023-02-04 16:22:18 +01:00
Rodrigo Q. Saramago
d9d9ab30a2 Update default evm version to paris 2023-01-30 17:57:08 +01:00
Rodrigo Q. Saramago
ef6ff2f055
Adds support for the EVM version "Paris".
Deprecates `block.difficulty` and disallow `difficulty()` in inline assembly for EVM versions >= paris.
The change is due to the renaming introduced by EIP-4399 (see: https://eips.ethereum.org/EIPS/eip-4399).
Introduces `block.prevrandao` in Solidity and `prevrandao()` in inline assembly for EVM versions >= paris.

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
Co-authored-by: Daniel <daniel@ekpyron.org>
Co-authored-by: matheusaaguiar <95899911+matheusaaguiar@users.noreply.github.com>
Co-authored-by: Nikola Matić <nikola.matic@ethereum.org>
2023-01-23 18:50:36 +00:00
Alex Beregszaszi
eb8af2caec Add basic support for the EVM version Paris
This mostly means testing with evmone, but instruction renaming of difficulty->prevrandao is omitted.
2022-11-21 14:56:46 +01:00
Marenz
9e674ba047 Forward declare Instruction enum in EVMVersion 2022-09-29 13:41:58 +02:00
William Entriken
2a957413d0 Update naming of Mainnet 2022-06-30 16:47:11 +02:00
hrkrshnn
79733fca48 Set default EVM version to London. 2021-08-11 09:54:14 +02:00
hrkrshnn
af1dabb555 Added EVMVersion london.
Also set the value of `block_base_fee` for testing to 7 wei.
2021-08-09 16:18:08 +02:00
hrkrshnn
d5564a0304 Set default EVM version to Berlin 2021-05-26 12:23:06 +02:00
Sachin Grover
b7adb2aa42 Add SPDX license identifier if not present already in source file
Fixes: #9220
2020-07-17 20:24:12 +05:30
Christian Parpart
6b23412fae C++ namespace cleanup (except tests). 2020-01-07 15:51:50 +01:00
chriseth
dc79274871 Set default EVM version to Istanbul. 2019-12-04 10:42:14 +01:00
Christian Parpart
df729b3084 Make use of C++17 std::optional<> instead of boost::optional<>. 2019-10-28 11:39:30 +01:00
Dimitry
fd3ae0b24a add chainid and selfbalance to lllc 2019-09-09 23:35:36 +03:00
Alex Beregszaszi
5749a5d7c9 Introduce istanbul and berlin versions 2019-08-26 13:15:01 +01:00
chriseth
003c170989 Add EVM instructions as builtin functions. 2019-05-20 16:46:31 +02:00
chriseth
9a949c1bda Set default EVM version to Petersburg. 2019-03-04 14:53:00 +01:00
Alex Beregszaszi
ecd246aeb6 Support petersburg in evmVersion 2019-03-04 14:10:41 +01:00
Alex Beregszaszi
cb7b053a4a Consider extcodehash as part of Constantinople 2019-02-26 12:40:31 +00:00
Leonardo Alt
2405b2151a EVMVersion in langutil namespace instead of solidity 2019-02-25 15:29:57 +01:00
Christian Parpart
62fe57479e
make use of C++ = default constructor declarations as well as more non-static member initialization syntax. 2018-12-19 11:26:42 +01:00
Christian Parpart
87821c53c3 Isolating files shared between Yul- and Solidity language frontend. 2018-11-21 18:58:12 +00:00