Commit Graph

41 Commits

Author SHA1 Message Date
hrkrshnn
8757e0aa11 feat: add support for push0 in libevmasm
See https://eips.ethereum.org/EIPS/eip-3855

Note: `push0` costs 2 gas, i.e., `Tier::Base` unlike other pushes.
2023-04-09 18:01:52 +02: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
Marenz
4b69b5fdc1 YulRunner: Add support for external calls to the same contract 2022-09-14 11:40:02 +02:00
chriseth
b0dcd7b915 Split out disassemble to remove numeric from instruction includes. 2022-03-02 15:30:41 +01:00
chriseth
1531863835 Split Common.h into Numeric.h. 2021-09-23 15:27:29 +02:00
hrkrshnn
d92b211a2f Added the instruction basefee. 2021-08-09 16:18:08 +02:00
Daniel Kirchner
a75424eec4 Drop support for evm15 and eip-615. 2021-03-09 15:56:03 +01:00
Daniel Kirchner
e99da7e015 Extract StackReuseCodegen tests. 2021-03-09 15:47:24 +01: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
Alex Beregszaszi
870ea98c21 Prefix EIP-615 opcodes with EIP615 in Instructions 2020-07-13 17:34:19 +01:00
Christian Parpart
345f9928ab Library libdevcore renamed to libsolutil. 2020-01-07 15:51:50 +01:00
Christian Parpart
6b23412fae C++ namespace cleanup (except tests). 2020-01-07 15:51:50 +01:00
Alex Beregszaszi
fc10fc3073 Move InvalidDeposit/InvalidOpcode from Instructions.h to Exceptions.h 2019-11-26 12:21:06 +01:00
Dimitry
fd3ae0b24a add chainid and selfbalance to lllc 2019-09-09 23:35:36 +03:00
chriseth
2308904f68 Remove "using namespace" from header and move Instruction to dev::eth. 2019-03-28 13:48:11 +01:00
Christian Parpart
ab0de38f16
Eliminate byte-typedef and use uint8_t in all their places instead.
This change is made to (easily) be forward compatible with future C++
standards, in order to allow compiling the code with newer standards at
some point in the future.

* Removed the `using byte = uint8_t;` line from Common.h
* Mechanically change all uses of `byte` to `uint8_t`.

Tested with GCC 7.3 in C++11/14/17 modes :-)
2018-11-07 12:17:57 +01:00
Jared Wasinger
c6bd2979b1 Add assembly support for EXTCODEHASH (EIP-1052) 2018-09-26 16:11:02 +01:00
Alex Beregszaszi
21beba76e2 Add helpers for the LOG instruction 2018-09-25 20:39:35 +01:00
Alex Beregszaszi
0db76a01da CREATE2 opcode has been moved from 0xfb to 0xf5 2018-09-18 23:04:57 +01:00
Omar Boukli-Hacene
090f9995f2 Fix comment typos 2018-04-27 19:31:30 +04:00
Alex Beregszaszi
afa4a48e37 Remove ROL/ROR as they are not part of EIP145 anymore 2018-02-27 13:42:41 +01:00
Alex Beregszaszi
59e6ea601b Add bitwise shift operators to libevmasm (EIP145) 2018-02-27 12:03:18 +01:00
Alex Beregszaszi
8a32d7c3d7 Add helpers for isPush/isDup/isSwap 2017-10-02 10:34:54 +01:00
gcolvin
7da86daa17 Reconcile EVM 1.5 instruction numbers with working draft EIP615 2017-08-28 23:27:13 +01:00
Dimitry
c20cdd0a05 add new opcode instructions to the parser
STATICCALL        0xfa  6 inputs  (gas address mem1 mem2 mem3 mem4)
2017-06-14 18:18:12 +02:00
Alex Beregszaszi
bec30051c5 Introduce CREATE2 in the assembler 2017-06-14 16:00:39 +02:00
Yoichi Hirai
0b22154a75
libevmasm: add RETURNDATACOPY and RETURNDATASIZE 2017-06-13 16:57:02 +02:00
chriseth
97cc968a13 Initial EVM1.5 assembly implementation. 2017-06-08 15:52:44 +02:00
Alex Beregszaszi
0c8beac357 Rename the SHA3 assembly instruction to KECCAK256 2017-05-30 10:54:29 +01:00
Yoichi Hirai
f2775f82d0 libevmadm: EIP150.a changes on EXTCODE, EXTCODESIZE and BALANCE 2017-04-25 16:14:58 +02:00
Alex Beregszaszi
148f923351 Add REVERT to libevmasm 2017-02-10 22:40:12 +00:00
Alex Beregszaszi
693226b1ab Rename SUICIDE opcode to SELFDESTRUCT in libevmasm 2017-02-06 20:17:52 +00:00
Alex Beregszaszi
7ec3dd9bbc More verbose log of when using invalid instructions 2017-02-02 11:39:29 +00:00
chriseth
c2b3d8bcd2 Change code for INVALID opcode to 0xfe. 2017-01-26 16:39:07 +01:00
Valentin Wüstholz
9bcbd93ac5 Change translation of implicit throws (issue #1589).
This adds a new invalid instruction that is used for encoding
implicit throws that are emitted by the compiler. This makes it
possible to distinguish such runtime errors from user-provided,
explicit throws.
2017-01-26 16:39:07 +01:00
Yoichi Hirai
821997a1d3
libevmasm: remove duplicate Tier from Tier::xTiers
Synchronize with cpp-ethereum
2017-01-18 17:24:39 +01:00
Yoichi Hirai
20c62a132d
Make enum Tier into an enum class 2017-01-13 13:19:14 +01:00
VoR0220
3f9f725737 Fix licensing headers
Signed-off-by: VoR0220 <rj@erisindustries.com>
2016-11-23 12:22:33 +01:00
Dimitry
d43d4347bf return instructionInfo style 2016-04-04 15:27:09 +04:00
Dimitry
858c41260d rename namespace for instruction.h/cpp in libevmasm 2016-04-02 15:56:43 +03:00
Dimitry
ccbd3ff63f move libevmcore to solidity 2016-04-01 23:11:01 +03:00