Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cherry-picked from upstream code #109

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/vm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (evm *EVM) precompile(addr common.Address) (PrecompiledContract, bool) {
p, ok := precompiles[addr]
// Restrict overrides to known precompiles
if ok && evm.chainConfig.IsOptimism() && evm.Config.OptimismPrecompileOverrides != nil {
override, ok := evm.Config.OptimismPrecompileOverrides(evm.chainRules, addr)
override, ok := evm.Config.OptimismPrecompileOverrides(evm.chainRules, p, addr)
if ok {
return override, ok
}
Expand Down
2 changes: 1 addition & 1 deletion core/vm/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

// PrecompileOverrides is a function that can be used to override the default precompiled contracts
type PrecompileOverrides func(params.Rules, common.Address) (PrecompiledContract, bool)
type PrecompileOverrides func(params.Rules, PrecompiledContract, common.Address) (PrecompiledContract, bool)

// Config are the configuration options for the Interpreter
type Config struct {
Expand Down
Loading