UNPKG
evm
Version:
latest (0.2.0)
0.2.0
0.1.1
0.1.0
0.0.4
0.0.3
0.0.2
0.0.1
0.0.0
An ethereum virtual machine (EVM) bytecode decompiler
github.com/MrLuit/evm
MrLuit/evm
evm
/
src
/
opcodes
/
swap.ts
8 lines
(6 loc)
•
267 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
import
EVM
from
'../classes/evm.class'
;
import
Opcode
from
'../interfaces/opcode.interface'
;
export
default
(
opcode
:
Opcode
,
state
:
EVM
):
void
=>
{
const
swapLocation =
parseInt
(opcode.
name
.
replace
(
'SWAP'
,
''
),
10
); state.
stack
.
swap
(swapLocation); };