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

implement: 0X08 - ADDMOD #25

Closed
LucasLvy opened this issue Oct 14, 2022 · 0 comments · Fixed by #26
Closed

implement: 0X08 - ADDMOD #25

LucasLvy opened this issue Oct 14, 2022 · 0 comments · Fixed by #26
Assignees

Comments

@LucasLvy
Copy link
Collaborator

LucasLvy commented Oct 14, 2022

SINCE GROUP
Frontier Stop and Arithmetic Operations
Reproduce in playground.

Error cases

The state changes done by the current context are reverted in those cases:

  • Not enough gas.
  • Not enough values on the stack.

SINCE GROUP Frontier Stop and Arithmetic Operations Index 1 is top of the stack. See PUSH.

Notes

All values are treated as two’s complement signed 256-bit integers. Note the overflow semantic when −2255 is negated.

Stack input

a: integer. b: integer. c: integer.

Stack output

a + b % c: integer result of the addition integer modulo.

Examples

Reproduce in playground.

Error cases

The state changes done by the current context are reverted in those cases:

  • Not enough gas.
  • Not enough values on the stack.
@LucasLvy LucasLvy self-assigned this Oct 14, 2022
@LucasLvy LucasLvy mentioned this issue Oct 14, 2022
@matthieuauger matthieuauger added this to the Full OPCODE implementation milestone Nov 17, 2022
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

Successfully merging a pull request may close this issue.

2 participants