Skip to Content
Mastering Blockchain - Second Edition
book

Mastering Blockchain - Second Edition

by Ankur Daharwal, Imran Bashir, Pranav Burnwal
March 2018
Beginner to intermediate
656 pages
20h 9m
English
Packt Publishing
Content preview from Mastering Blockchain - Second Edition

Exchange operations

The SWAP operations provide the ability to exchange stack items. There are 16 SWAP instructions available, and with each instruction, the stack items are removed and placed incrementally up to 17 items depending on the type of opcode used.

Mnemonic

Value

POP

PUSH

Gas

Description

SWAP1 . . . SWAP16

0x90 ...0x9f

X

Y

3

Used to swap the Nth stack item, where N is the number corresponding to the SWAP instruction used. X and Y are the items removed and placed on the stack, respectively.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Blockchain - Third Edition

Mastering Blockchain - Third Edition

Imran Bashir
Mastering Blockchain

Mastering Blockchain

Lorne Lantz, Daniel Cawrey
Mastering Ethereum

Mastering Ethereum

Andreas M. Antonopoulos, Gavin Wood

Publisher Resources

ISBN: 9781788839044Supplemental Content