diff --git a/core/vm/evm.go b/core/vm/evm.go index c6752e03cc..be7ffebf53 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -38,6 +38,11 @@ type ( GetHashFunc func(uint64) common.Hash ) +func (evm *EVM) IsPrecompileAddr(addr common.Address) bool { + _, isPrecompile := evm.precompile(addr) + return isPrecompile +} + func (evm *EVM) precompile(addr common.Address) (PrecompiledContract, bool) { var precompiles map[common.Address]PrecompiledContract switch {