Skip to content

Commit 690de88

Browse files
authored
Update opcodes for Dencun (#348)
* Add missing opcode in table The description for this opcode exists below, but this opcode is not in the table * Update opcodes for Dencun
1 parent 2a86450 commit 690de88

File tree

1 file changed

+62
-3
lines changed

1 file changed

+62
-3
lines changed

Diff for: learn_evm/evm_opcodes.md

+62-3
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,11 @@ The gas information is a work in progress. If an asterisk is in the Gas column,
6464
| [`0x44`](#difficulty) | DIFFICULTY | Get the block's difficulty | - | 2 |
6565
| [`0x45`](#gaslimit) | GASLIMIT | Get the block's gas limit | - | 2 |
6666
| [`0x46`](#chainid) | CHAINID | Returns the current chain’s EIP-155 unique identifier | [EIP 1344](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1344.md) | 2 |
67-
| `0x47` - `0x4f` | Unused | - |
67+
| [`0x47`](#selfbalance) | SELFBALANCE | Returns the balance of the currently executing account | - | 5 |
6868
| [`0x48`](#basefee) | BASEFEE | Returns the value of the base fee of the current block it is executing in. | [EIP 3198](https://eips.ethereum.org/EIPS/eip-3198) | 2 |
69+
| [`0x49`](#blobhash) | BLOBHASH | Returns the transaction blob versioned hash at the given index, or `0` if the index is greater than the number of versioned hashes | [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) | 3 |
70+
| [`0x4a`](#blobbasefee) | BLOBBASEFEE | Returns the value of the blob base fee of the current block it is executing in | [EIP-7516](https://eips.ethereum.org/EIPS/eip-7516) | 2 |
71+
| `0x4b` - `0x4f` | Unused | - |
6972
| [`0x50`](#pop) | POP | Remove word from stack | - | 2 |
7073
| [`0x51`](#mload) | MLOAD | Load word from memory | - | 3\* |
7174
| [`0x52`](#mstore) | MSTORE | Save word to memory | - | 3\* |
@@ -78,7 +81,9 @@ The gas information is a work in progress. If an asterisk is in the Gas column,
7881
| [`0x59`](#msize) | MSIZE | Get the size of active memory in bytes | - | 2 |
7982
| [`0x5a`](#gas) | GAS | Get the amount of available gas, including the corresponding reduction for the cost of this instruction | - | 2 |
8083
| [`0x5b`](#jumpdest) | JUMPDEST | Mark a valid destination for jumps | - | 1 |
81-
| `0x5c` - `0x5e` | Unused | - |
84+
| [`0x5c`](#tload) | TLOAD | Load word from transient storage | [EIP-1153](https://eips.ethereum.org/EIPS/eip-1153) | 100 |
85+
| [`0x5d`](#tstore) | TSTORE | Save word to transient storage | [EIP-1153](https://eips.ethereum.org/EIPS/eip-1153) | 100 |
86+
| [`0x5e`](#mcopy) | MCOPY | Copy memory from one area to another | [EIP-5656](https://eips.ethereum.org/EIPS/eip-5656) | 3+3\*words\*|
8287
| [`0x5f`](#push0) | PUSH0 | Place the constant value 0 on stack | [EIP-3855](https://eips.ethereum.org/EIPS/eip-3855) | 2 |
8388
| [`0x60`](#push1) | PUSH1 | Place 1 byte item on stack | - | 3 |
8489
| [`0x61`](#push2) | PUSH2 | Place 2-byte item on stack | - | 3 |
@@ -175,7 +180,7 @@ The gas information is a work in progress. If an asterisk is in the Gas column,
175180
| `0xfb` | Unused | - | - |
176181
| [`0xfd`](#revert) | REVERT | Stop execution and revert state changes, without consuming all provided gas and providing a reason | - | 0 |
177182
| `0xfe` | INVALID | Designated invalid instruction | - | 0 |
178-
| [`0xff`](#selfdestruct) | SELFDESTRUCT | Halt execution and register account for later deletion | - | 5000\* |
183+
| [`0xff`](#selfdestruct) | SELFDESTRUCT | Sends all ETH to the target. If executed in the same transaction a contract was created, register the account for later deletion | [EIP-6780](https://eips.ethereum.org/EIPS/eip-6780) | 5000\* |
179184

180185
## Instruction Details
181186

@@ -693,6 +698,26 @@ current block's base fee (related to EIP1559)
693698

694699
---
695700

701+
### BLOBHASH
702+
703+
**0x49**
704+
705+
(index) => (tx.blob_versioned_hashes[index])
706+
707+
the transaction blob versioned hash at the given index, or `0` if the index is greater than the number of versioned hashes ([EIP-4844](https://eips.ethereum.org/EIPS/eip-4844))
708+
709+
---
710+
711+
### BLOBBASEFEE
712+
713+
**0x4a**
714+
715+
() => (block.blobbasefee)
716+
717+
current block's blob base fee ([EIP-7516](https://eips.ethereum.org/EIPS/eip-7516))
718+
719+
---
720+
696721
### POP
697722

698723
**0x50**
@@ -817,6 +842,40 @@ noop, marks a valid jump destination
817842

818843
---
819844

845+
### TLOAD
846+
847+
**0x5c**
848+
849+
Pops 1 element off the stack, that being the key which is the transient storage slot and returns the read value stored there ([EIP-1153](https://eips.ethereum.org/EIPS/eip-1153)).
850+
851+
(key) => (value)
852+
853+
value = transient_storage[key]
854+
855+
---
856+
857+
### TSTORE
858+
859+
**0x5d**
860+
861+
Pops 2 elements off the stack, the first element being the key and the second being the value which is then stored at the transient storage slot represented from the first element (key) ([EIP-1153](https://eips.ethereum.org/EIPS/eip-1153)).
862+
863+
(key, value) => ()
864+
865+
transient_storage[key] = value
866+
867+
---
868+
869+
### MCOPY
870+
871+
**0x5e**
872+
873+
(dstOffset, srcOffset, length) => ()
874+
875+
memory[dstOffset:dstOffset+length] = memory[srcOffset:srcOffset+length]
876+
877+
---
878+
820879
### PUSH0
821880

822881
**0x5f**

0 commit comments

Comments
 (0)