shafu0x / evm-from-scratch-book

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

Code typos: extra `.value` in calling `evm.stack.pop()` #22

Open 0x6980 opened 3 weeks ago

0x6980 commented 3 weeks ago

In function sload(evm) of content/07a_opcodes/10_storage.ipynb

def sload(evm): 
    key = evm.stack.pop().value
    warm, value = evm.storage.load(key)
    evm.stack.push(value)

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

key = evm.stack.pop().value should be key = evm.stack.pop()

same problem in content/07a_opcodes/17_transient file in tload function.