Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code typos on content/07a_opcodes/02_math.ipynb #18

Open
0x6980 opened this issue Aug 17, 2024 · 1 comment
Open

Code typos on content/07a_opcodes/02_math.ipynb #18

0x6980 opened this issue Aug 17, 2024 · 1 comment

Comments

@0x6980
Copy link

0x6980 commented Aug 17, 2024

In the function mulmod(evm)

def mulmod(evm):
    a, b = evm.stack.pop(), evm.stack.pop()
    N = evm.stack.pop()
    evm.stack.push((a + b) * N)
    evm.pc += 1
    evm.gas_dec(8)

this part evm.stack.push((a + b) * N) should be evm.stack.push((a * b) % N)

@shafu0x
Copy link
Owner

shafu0x commented Aug 17, 2024

you are right, could you do a PR?

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

No branches or pull requests

2 participants