evm v0.1.14 EVM.ProgramCounter
Module for manipulating the program counter which keeps track of where we are in the contract code.
Reffered to as pc in the Yellow Paper.
Link to this section Summary
Functions
Increments the program counter
Link to this section Functions
    
      
      Link to this function
    
    next(current_position, map, arg3)
    
    
    
      
        
          
    
  
  next(integer, Operation.Metadata.t, [EVM.val]) :: MachineState.t
Increments the program counter
Examples
iex> EVM.ProgramCounter.next(9, EVM.Operation.metadata(:add), [1, 1])
10
iex> EVM.ProgramCounter.next(10, EVM.Operation.metadata(:push2), [1, 1])
13
iex> EVM.ProgramCounter.next(7, EVM.Operation.metadata(:jumpi), [1, 1])
1
iex> EVM.ProgramCounter.next(7, EVM.Operation.metadata(:jumpi), [1, 0])
8