Guest User

Untitled

a guest
Jun 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. func opAdd(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
  2. x, y := stack.pop(), stack.pop()
  3. stack.push(math.U256(x.Add(x, y)))
  4.  
  5. evm.interpreter.intPool.put(y)
  6.  
  7. return nil, nil
  8. }
  9.  
  10. func gasPush(gt params.GasTable, evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) {
  11. return GasFastestStep, nil
  12. }
  13.  
  14. ADD: {
  15. execute: opAdd,
  16. gasCost: constGasFunc(GasFastestStep),
  17. validateStack: makeStackFunc(2, 1),
  18. valid: true,
  19. },
Add Comment
Please, Sign In to add comment