Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <[email protected]>
  • Loading branch information
jsign committed Sep 19, 2024
1 parent e98688e commit f29b148
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/vm/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,11 @@ func opExtCodeCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext)

if interpreter.evm.chainRules.IsVerkle {
addr := common.Address(a.Bytes20())
if _, isPrecompile := interpreter.evm.precompile(addr); !isPrecompile {
if _, isPrecompile := interpreter.evm.precompile(addr); isPrecompile {
if !scope.Contract.UseGas(params.WarmStorageReadCostEIP2929) {
return nil, ErrExecutionReverted
}
} else {
chargedGas, ok := interpreter.evm.Accesses.TouchBasicData(addr[:], false, scope.Contract.UseGas)
if !ok || (chargedGas == 0 && !scope.Contract.UseGas(params.WarmStorageReadCostEIP2929)) {
return nil, ErrExecutionReverted
Expand Down

0 comments on commit f29b148

Please sign in to comment.