You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn_evm/evm_opcodes.md
+62-3
Original file line number
Diff line number
Diff line change
@@ -64,8 +64,11 @@ The gas information is a work in progress. If an asterisk is in the Gas column,
64
64
|[`0x44`](#difficulty)| DIFFICULTY | Get the block's difficulty | - | 2 |
65
65
|[`0x45`](#gaslimit)| GASLIMIT | Get the block's gas limit | - | 2 |
66
66
|[`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|
68
68
|[`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 | - |
69
72
|[`0x50`](#pop)| POP | Remove word from stack | - | 2 |
70
73
|[`0x51`](#mload)| MLOAD | Load word from memory | - | 3\*|
71
74
|[`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,
78
81
|[`0x59`](#msize)| MSIZE | Get the size of active memory in bytes | - | 2 |
79
82
|[`0x5a`](#gas)| GAS | Get the amount of available gas, including the corresponding reduction for the cost of this instruction | - | 2 |
80
83
|[`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\*|
82
87
|[`0x5f`](#push0)| PUSH0 | Place the constant value 0 on stack |[EIP-3855](https://eips.ethereum.org/EIPS/eip-3855)| 2 |
83
88
|[`0x60`](#push1)| PUSH1 | Place 1 byte item on stack | - | 3 |
84
89
|[`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,
175
180
|`0xfb`| Unused | - | - |
176
181
|[`0xfd`](#revert)| REVERT | Stop execution and revert state changes, without consuming all provided gas and providing a reason | - | 0 |
|[`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\*|
179
184
180
185
## Instruction Details
181
186
@@ -693,6 +698,26 @@ current block's base fee (related to EIP1559)
693
698
694
699
---
695
700
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
+
696
721
### POP
697
722
698
723
**0x50**
@@ -817,6 +842,40 @@ noop, marks a valid jump destination
817
842
818
843
---
819
844
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)).
0 commit comments