Skip to content

Commit

Permalink
move more to ext
Browse files Browse the repository at this point in the history
  • Loading branch information
darioush committed Aug 29, 2024
1 parent 34baeec commit 7221490
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions core/vm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ type (
GetHashFunc func(uint64) common.Hash
)

type (
// RunFunc is the signature of a precompiled contract run function
// Consider passing caller as ContractRef instead of common.Address
RunFunc func(caller common.Address, input []byte, suppliedGas uint64, readOnly bool) (ret []byte, remainingGas uint64, err error)
)

func (evm *EVM) precompile(addr common.Address) (RunFunc, bool) {
var precompiles map[common.Address]PrecompiledContract
switch {
Expand Down
6 changes: 6 additions & 0 deletions core/vm/evm_ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import (
"github.com/ethereum/go-ethereum/common"
)

type (
// RunFunc is the signature of a precompiled contract run function
// Consider passing caller as ContractRef instead of common.Address
RunFunc func(caller common.Address, input []byte, suppliedGas uint64, readOnly bool) (ret []byte, remainingGas uint64, err error)
)

var defaultEVMFactory EvmFactory = &evmFactory{}

type evmFactory struct{}
Expand Down

0 comments on commit 7221490

Please sign in to comment.