Skip to content

Commit

Permalink
Merge branch 'master' into warp-contract
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronbuchwald authored Jul 24, 2023
2 parents eb93a70 + 19bef00 commit 533bb58
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
5 changes: 0 additions & 5 deletions core/vm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,6 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
return ret, gas, err
}

// CallFromPrecompile invokes Call to execute the contract with the given input parameters.
func (evm *EVM) CallFromPrecompile(caller common.Address, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error) {
return evm.Call(AccountRef(caller), addr, input, gas, value)
}

// CallCode executes the contract associated with the addr with the given input
// as parameters. It also handles any necessary value transfer required and takes
// the necessary steps to create accounts and reverses the state in case of an
Expand Down
1 change: 0 additions & 1 deletion precompile/contract/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ type AccessibleState interface {
GetStateDB() StateDB
GetBlockContext() BlockContext
GetSnowContext() *snow.Context
CallFromPrecompile(caller common.Address, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error)
}

// BlockContext defines an interface that provides information to a stateful precompile about the
Expand Down
5 changes: 0 additions & 5 deletions precompile/contract/mock_interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"github.com/ava-labs/avalanchego/snow"
"github.com/ava-labs/subnet-evm/commontype"
"github.com/ethereum/go-ethereum/common"
)

// TODO: replace with gomock library
Expand Down Expand Up @@ -53,10 +52,6 @@ func (m *mockAccessibleState) GetBlockContext() BlockContext { return m.blockCon

func (m *mockAccessibleState) GetSnowContext() *snow.Context { return m.snowContext }

func (m *mockAccessibleState) CallFromPrecompile(caller common.Address, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error) {
return nil, 0, nil
}

type mockChainState struct {
feeConfig commontype.FeeConfig
allowedFeeRecipients bool
Expand Down

0 comments on commit 533bb58

Please sign in to comment.