Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Typo in the key/value contract example in the wiki #703

Open
siraben opened this issue Jun 23, 2020 · 0 comments
Open

Typo in the key/value contract example in the wiki #703

siraben opened this issue Jun 23, 2020 · 0 comments

Comments

@siraben
Copy link

siraben commented Jun 23, 2020

The Ethereum Development Tutorial states:

NOT pops one value and pushes 1 if the value is zero, else 0

However, NOT is a bitwise operation on the top of stack as defined in the yellowpaper, instead ISZERO was probably meant.

Also, the bytecode should be changed from

PUSH1 0 CALLDATALOAD SLOAD NOT PUSH1 10 JUMPI STOP JUMPDEST PUSH1 32 CALLDATALOAD PUSH1 0 CALLDATALOAD SSTORE

to

PUSH1 0 CALLDATALOAD SLOAD ISZERO PUSH1 10 JUMPI STOP JUMPDEST PUSH1 32 CALLDATALOAD PUSH1 0 CALLDATALOAD SSTORE

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant