shafu0x / evm-from-scratch-book

The EVM from scratch book
https://evm-from-scratch.xyz
70 stars 14 forks source link

Code typos on page /content/07a_opcodes/07_environment.html #14

Open itfat opened 1 month ago

itfat commented 1 month ago

In the function balance

def balance(evm):
    address = cpu.stack.pop()
    evm.stack.push(99999999999)

    evm.pc += 1
    evm.gas_dec(2600) # 100 if warm

The address should be evm.stack.pop(). Same is the case with calldatacopy.

shafu0x commented 1 month ago

yeah could you PR it?