Skip to content

Commit

Permalink
feat: json rpc access list type transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
djm07073 committed Oct 15, 2024
1 parent b8164ad commit b26d50c
Show file tree
Hide file tree
Showing 22 changed files with 912 additions and 180 deletions.
16 changes: 8 additions & 8 deletions app/ibc-hooks/ack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func Test_onAckIcs20Packet_memo(t *testing.T) {
codeBz, err := hexutil.Decode(counter.CounterBin)
require.NoError(t, err)

_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil)
_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil, nil)
require.NoError(t, err)

abi, err := counter.CounterMetaData.GetAbi()
Expand Down Expand Up @@ -87,7 +87,7 @@ func Test_onAckIcs20Packet_memo(t *testing.T) {
// check the contract state
queryInputBz, err := abi.Pack("count")
require.NoError(t, err)
queryRes, logs, err := input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil)
queryRes, logs, err := input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(0).Bytes32(), [32]byte(queryRes))
require.Empty(t, logs)
Expand All @@ -102,7 +102,7 @@ func Test_onAckIcs20Packet_memo(t *testing.T) {
require.NoError(t, err)

// check the contract state; increased by 99 if ack is success
queryRes, logs, err = input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil)
queryRes, logs, err = input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(99).Bytes32(), [32]byte(queryRes))
require.Empty(t, logs)
Expand All @@ -114,7 +114,7 @@ func Test_onAckIcs20Packet_memo(t *testing.T) {
require.NoError(t, err)

// check the contract state; increased by 1 if ack is failed
queryRes, logs, err = input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil)
queryRes, logs, err = input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(100).Bytes32(), [32]byte(queryRes))
require.Empty(t, logs)
Expand Down Expand Up @@ -157,7 +157,7 @@ func Test_onAckPacket_memo_ICS721(t *testing.T) {
codeBz, err := hexutil.Decode(counter.CounterBin)
require.NoError(t, err)

_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil)
_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil, nil)
require.NoError(t, err)

abi, err := counter.CounterMetaData.GetAbi()
Expand Down Expand Up @@ -197,7 +197,7 @@ func Test_onAckPacket_memo_ICS721(t *testing.T) {
// check the contract state
queryInputBz, err := abi.Pack("count")
require.NoError(t, err)
queryRes, logs, err := input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil)
queryRes, logs, err := input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(0).Bytes32(), [32]byte(queryRes))
require.Empty(t, logs)
Expand All @@ -212,7 +212,7 @@ func Test_onAckPacket_memo_ICS721(t *testing.T) {
require.NoError(t, err)

// check the contract state; increased by 99 if ack is success
queryRes, logs, err = input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil)
queryRes, logs, err = input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(99).Bytes32(), [32]byte(queryRes))
require.Empty(t, logs)
Expand All @@ -224,7 +224,7 @@ func Test_onAckPacket_memo_ICS721(t *testing.T) {
require.NoError(t, err)

// check the contract state; increased by 1 if ack is failed
queryRes, logs, err = input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil)
queryRes, logs, err = input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(100).Bytes32(), [32]byte(queryRes))
require.Empty(t, logs)
Expand Down
18 changes: 9 additions & 9 deletions app/ibc-hooks/receive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func Test_onReceiveIcs20Packet_memo(t *testing.T) {
codeBz, err := hexutil.Decode(counter.CounterBin)
require.NoError(t, err)

_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil)
_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil, nil)
require.NoError(t, err)

abi, err := counter.CounterMetaData.GetAbi()
Expand Down Expand Up @@ -105,7 +105,7 @@ func Test_onReceiveIcs20Packet_memo(t *testing.T) {
require.NoError(t, err)

// check the contract state
queryRes, err := input.EVMKeeper.EVMStaticCall(ctx, evmAddr, contractAddr, queryInputBz)
queryRes, err := input.EVMKeeper.EVMStaticCall(ctx, evmAddr, contractAddr, queryInputBz, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(1).Bytes32(), [32]byte(queryRes))

Expand All @@ -114,7 +114,7 @@ func Test_onReceiveIcs20Packet_memo(t *testing.T) {
require.NoError(t, err)
queryInputBz, err = input.EVMKeeper.ERC20Keeper().GetERC20ABI().Pack("allowance", common.BytesToAddress(intermediateSender.Bytes()), contractAddr)
require.NoError(t, err)
queryRes, err = input.EVMKeeper.EVMStaticCall(ctx, evmtypes.StdAddress, erc20Addr, queryInputBz)
queryRes, err = input.EVMKeeper.EVMStaticCall(ctx, evmtypes.StdAddress, erc20Addr, queryInputBz, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(10000).Bytes32(), [32]byte(queryRes))
}
Expand Down Expand Up @@ -155,7 +155,7 @@ func Test_onReceivePacket_memo_ICS721(t *testing.T) {
codeBz, err := hexutil.Decode(counter.CounterBin)
require.NoError(t, err)

_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil)
_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil, nil)
require.NoError(t, err)

abi, err := counter.CounterMetaData.GetAbi()
Expand Down Expand Up @@ -222,7 +222,7 @@ func Test_onReceivePacket_memo_ICS721(t *testing.T) {
require.NoError(t, err)

// check the contract state
queryRes, logs, err := input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil)
queryRes, logs, err := input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(1).Bytes32(), [32]byte(queryRes))
require.Empty(t, logs)
Expand All @@ -234,7 +234,7 @@ func Test_onReceivePacket_memo_ICS721(t *testing.T) {
require.NoError(t, err)
queryInputBz, err = input.EVMKeeper.ERC721Keeper().GetERC721ABI().Pack("getApproved", tokenId)
require.NoError(t, err)
queryRes, err = input.EVMKeeper.EVMStaticCall(ctx, evmtypes.StdAddress, erc721Addr, queryInputBz)
queryRes, err = input.EVMKeeper.EVMStaticCall(ctx, evmtypes.StdAddress, erc721Addr, queryInputBz, nil)
require.NoError(t, err)
require.Equal(t, contractAddr.Bytes(), common.HexToAddress(hexutil.Encode(queryRes)).Bytes())
}
Expand All @@ -248,7 +248,7 @@ func Test_onReceivePacket_memo_ICS721_Wasm(t *testing.T) {
codeBz, err := hexutil.Decode(counter.CounterBin)
require.NoError(t, err)

_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil)
_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil, nil)
require.NoError(t, err)

abi, err := counter.CounterMetaData.GetAbi()
Expand Down Expand Up @@ -316,7 +316,7 @@ func Test_onReceivePacket_memo_ICS721_Wasm(t *testing.T) {
require.NoError(t, err)

// check the contract state
queryRes, logs, err := input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil)
queryRes, logs, err := input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(1).Bytes32(), [32]byte(queryRes))
require.Empty(t, logs)
Expand All @@ -328,7 +328,7 @@ func Test_onReceivePacket_memo_ICS721_Wasm(t *testing.T) {
require.NoError(t, err)
queryInputBz, err = input.EVMKeeper.ERC721Keeper().GetERC721ABI().Pack("getApproved", tokenId)
require.NoError(t, err)
queryRes, err = input.EVMKeeper.EVMStaticCall(ctx, evmtypes.StdAddress, erc721Addr, queryInputBz)
queryRes, err = input.EVMKeeper.EVMStaticCall(ctx, evmtypes.StdAddress, erc721Addr, queryInputBz, nil)
require.NoError(t, err)
require.Equal(t, contractAddr.Bytes(), common.HexToAddress(hexutil.Encode(queryRes)).Bytes())
}
12 changes: 6 additions & 6 deletions app/ibc-hooks/timeout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func Test_onTimeoutIcs20Packet_memo(t *testing.T) {
codeBz, err := hexutil.Decode(counter.CounterBin)
require.NoError(t, err)

_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil)
_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil, nil)
require.NoError(t, err)

abi, err := counter.CounterMetaData.GetAbi()
Expand Down Expand Up @@ -81,7 +81,7 @@ func Test_onTimeoutIcs20Packet_memo(t *testing.T) {
// check the contract state
queryInputBz, err := abi.Pack("count")
require.NoError(t, err)
queryRes, logs, err := input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil)
queryRes, logs, err := input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(0).Bytes32(), [32]byte(queryRes))
require.Empty(t, logs)
Expand All @@ -96,7 +96,7 @@ func Test_onTimeoutIcs20Packet_memo(t *testing.T) {
require.NoError(t, err)

// check the contract state; increased by 99
queryRes, logs, err = input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil)
queryRes, logs, err = input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(99).Bytes32(), [32]byte(queryRes))
require.Empty(t, logs)
Expand Down Expand Up @@ -136,7 +136,7 @@ func Test_onTimeoutPacket_memo_ICS721(t *testing.T) {
codeBz, err := hexutil.Decode(counter.CounterBin)
require.NoError(t, err)

_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil)
_, contractAddr, _, err := input.EVMKeeper.EVMCreate(ctx, evmAddr, codeBz, nil, nil)
require.NoError(t, err)

abi, err := counter.CounterMetaData.GetAbi()
Expand Down Expand Up @@ -169,7 +169,7 @@ func Test_onTimeoutPacket_memo_ICS721(t *testing.T) {
// check the contract state
queryInputBz, err := abi.Pack("count")
require.NoError(t, err)
queryRes, logs, err := input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil)
queryRes, logs, err := input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(0).Bytes32(), [32]byte(queryRes))
require.Empty(t, logs)
Expand All @@ -184,7 +184,7 @@ func Test_onTimeoutPacket_memo_ICS721(t *testing.T) {
require.NoError(t, err)

// check the contract state; increased by 99
queryRes, logs, err = input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil)
queryRes, logs, err = input.EVMKeeper.EVMCall(ctx, evmAddr, contractAddr, queryInputBz, nil, nil)
require.NoError(t, err)
require.Equal(t, uint256.NewInt(99).Bytes32(), [32]byte(queryRes))
require.Empty(t, logs)
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/erc721_transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (suite *KeeperTestSuite) CreateNftClass(
inputBz, err := nftKeeper.ABI.Pack("", name, name)
suite.Require().NoError(err)

_, contractAddr, _, err := evmKeeper.EVMCreate(ctx, createAccountAddr, append(nftKeeper.ERC721Bin, inputBz...), nil)
_, contractAddr, _, err := evmKeeper.EVMCreate(ctx, createAccountAddr, append(nftKeeper.ERC721Bin, inputBz...), nil, nil)
suite.Require().NoError(err)

classId, err := evmtypes.ClassIdFromCollectionAddress(endpoint.Chain.GetContext(), nftKeeper, contractAddr)
Expand Down Expand Up @@ -166,7 +166,7 @@ func (suite *KeeperTestSuite) MintNft(
contractAddr, err := evmtypes.ContractAddressFromClassId(ctx, nftKeeper, classId)
suite.Require().NoError(err)

_, _, err = nftKeeper.EVMCall(ctx, createAccountAddr, contractAddr, inputBz, nil)
_, _, err = nftKeeper.EVMCall(ctx, createAccountAddr, contractAddr, inputBz, nil, nil)
suite.Require().NoError(err)
}

Expand Down
8 changes: 8 additions & 0 deletions proto/minievm/evm/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ message MsgCreate {
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
// AccessList is a predefined list of Ethereum addresses and their corresponding storage slots that a transaction will interact with during its execution. can be none
repeated AccessTuple access_list = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

// MsgCreateResponse defines the Msg/Create response type.
Expand Down Expand Up @@ -79,6 +81,9 @@ message MsgCreate2 {
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];

// AccessList is a predefined list of Ethereum addresses and their corresponding storage slots that a transaction will interact with during its execution. can be none
repeated AccessTuple access_list = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

// MsgCreate2Response defines the Msg/Create2 response type.
Expand Down Expand Up @@ -117,6 +122,9 @@ message MsgCall {
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];

// AccessList is a predefined list of Ethereum addresses and their corresponding storage slots that a transaction will interact with during its execution. can be none
repeated AccessTuple access_list = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

// MsgCallResponse defines the Msg/Call response type.
Expand Down
9 changes: 9 additions & 0 deletions proto/minievm/evm/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,12 @@ message Log {
// supplied by the contract, usually ABI-encoded
string data = 3;
}

message AccessTuple {
// Address of the contract that will be accessed during the transaction execution.
string address = 1;

// A list of storage keys that the transaction will interact with within the specified contract.
// These keys represent specific storage slots in the contract's storage that are accessed or modified.
repeated string storage_keys = 2;
}
30 changes: 15 additions & 15 deletions x/evm/keeper/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/tracing"
coretype "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/trie/utils"
Expand Down Expand Up @@ -198,22 +199,21 @@ func (k Keeper) CreateEVM(ctx context.Context, caller common.Address, tracer *tr
}

// EVMStaticCall executes an EVM call with the given input data in static mode.
func (k Keeper) EVMStaticCall(ctx context.Context, caller common.Address, contractAddr common.Address, inputBz []byte) ([]byte, error) {
return k.EVMStaticCallWithTracer(ctx, caller, contractAddr, inputBz, nil)
func (k Keeper) EVMStaticCall(ctx context.Context, caller common.Address, contractAddr common.Address, inputBz []byte, accessList coretype.AccessList) ([]byte, error) {
return k.EVMStaticCallWithTracer(ctx, caller, contractAddr, inputBz, accessList, nil)
}

// EVMStaticCallWithTracer executes an EVM call with the given input data and tracer in static mode.
func (k Keeper) EVMStaticCallWithTracer(ctx context.Context, caller common.Address, contractAddr common.Address, inputBz []byte, tracer *tracing.Hooks) ([]byte, error) {
func (k Keeper) EVMStaticCallWithTracer(ctx context.Context, caller common.Address, contractAddr common.Address, inputBz []byte, accessList coretype.AccessList, tracer *tracing.Hooks) ([]byte, error) {
ctx, evm, err := k.CreateEVM(ctx, caller, tracer)
if err != nil {
return nil, err
}

sdkCtx := sdk.UnwrapSDKContext(ctx)
gasBalance := k.computeGasLimit(sdkCtx)

rules := evm.ChainConfig().Rules(evm.Context.BlockNumber, evm.Context.Random != nil, evm.Context.Time)
evm.StateDB.Prepare(rules, caller, types.NullAddress, &contractAddr, append(vm.ActivePrecompiles(rules), k.precompiles.toAddrs()...), nil)
evm.StateDB.Prepare(rules, caller, types.NullAddress, &contractAddr, append(vm.ActivePrecompiles(rules), k.precompiles.toAddrs()...), accessList)

retBz, gasRemaining, err := evm.StaticCall(
vm.AccountRef(caller),
Expand All @@ -233,12 +233,12 @@ func (k Keeper) EVMStaticCallWithTracer(ctx context.Context, caller common.Addre
}

// EVMCall executes an EVM call with the given input data.
func (k Keeper) EVMCall(ctx context.Context, caller common.Address, contractAddr common.Address, inputBz []byte, value *uint256.Int) ([]byte, types.Logs, error) {
return k.EVMCallWithTracer(ctx, caller, contractAddr, inputBz, value, nil)
func (k Keeper) EVMCall(ctx context.Context, caller common.Address, contractAddr common.Address, inputBz []byte, value *uint256.Int, accessList coretype.AccessList) ([]byte, types.Logs, error) {
return k.EVMCallWithTracer(ctx, caller, contractAddr, inputBz, value, accessList, nil)
}

// EVMCallWithTracer executes an EVM call with the given input data and tracer.
func (k Keeper) EVMCallWithTracer(ctx context.Context, caller common.Address, contractAddr common.Address, inputBz []byte, value *uint256.Int, tracer *tracing.Hooks) ([]byte, types.Logs, error) {
func (k Keeper) EVMCallWithTracer(ctx context.Context, caller common.Address, contractAddr common.Address, inputBz []byte, value *uint256.Int, accessList coretype.AccessList, tracer *tracing.Hooks) ([]byte, types.Logs, error) {
ctx, evm, err := k.CreateEVM(ctx, caller, tracer)
if err != nil {
return nil, nil, err
Expand All @@ -251,7 +251,7 @@ func (k Keeper) EVMCallWithTracer(ctx context.Context, caller common.Address, co
}

rules := evm.ChainConfig().Rules(evm.Context.BlockNumber, evm.Context.Random != nil, evm.Context.Time)
evm.StateDB.Prepare(rules, caller, types.NullAddress, &contractAddr, append(vm.ActivePrecompiles(rules), k.precompiles.toAddrs()...), nil)
evm.StateDB.Prepare(rules, caller, types.NullAddress, &contractAddr, append(vm.ActivePrecompiles(rules), k.precompiles.toAddrs()...), accessList)

retBz, gasRemaining, err := evm.Call(
vm.AccountRef(caller),
Expand Down Expand Up @@ -313,19 +313,19 @@ func (k Keeper) EVMCallWithTracer(ctx context.Context, caller common.Address, co
}

// EVMCreate creates a new contract with the given code.
func (k Keeper) EVMCreate(ctx context.Context, caller common.Address, codeBz []byte, value *uint256.Int) ([]byte, common.Address, types.Logs, error) {
return k.EVMCreateWithTracer(ctx, caller, codeBz, value, nil, nil)
func (k Keeper) EVMCreate(ctx context.Context, caller common.Address, codeBz []byte, value *uint256.Int, accessList coretype.AccessList) ([]byte, common.Address, types.Logs, error) {
return k.EVMCreateWithTracer(ctx, caller, codeBz, value, nil, accessList, nil)
}

// EVMCreate creates a new contract with the given code.
func (k Keeper) EVMCreate2(ctx context.Context, caller common.Address, codeBz []byte, value *uint256.Int, salt uint64) ([]byte, common.Address, types.Logs, error) {
return k.EVMCreateWithTracer(ctx, caller, codeBz, value, &salt, nil)
func (k Keeper) EVMCreate2(ctx context.Context, caller common.Address, codeBz []byte, value *uint256.Int, salt uint64, accessList coretype.AccessList) ([]byte, common.Address, types.Logs, error) {
return k.EVMCreateWithTracer(ctx, caller, codeBz, value, &salt, accessList, nil)
}

// EVMCreateWithTracer creates a new contract with the given code and tracer.
// if salt is nil, it will create a contract with the CREATE opcode.
// if salt is not nil, it will create a contract with the CREATE2 opcode.
func (k Keeper) EVMCreateWithTracer(ctx context.Context, caller common.Address, codeBz []byte, value *uint256.Int, salt *uint64, tracer *tracing.Hooks) (retBz []byte, contractAddr common.Address, logs types.Logs, err error) {
func (k Keeper) EVMCreateWithTracer(ctx context.Context, caller common.Address, codeBz []byte, value *uint256.Int, salt *uint64, accessList coretype.AccessList, tracer *tracing.Hooks) (retBz []byte, contractAddr common.Address, logs types.Logs, err error) {
ctx, evm, err := k.CreateEVM(ctx, caller, tracer)
if err != nil {
return nil, common.Address{}, nil, err
Expand All @@ -338,7 +338,7 @@ func (k Keeper) EVMCreateWithTracer(ctx context.Context, caller common.Address,
}

rules := evm.ChainConfig().Rules(evm.Context.BlockNumber, evm.Context.Random != nil, evm.Context.Time)
evm.StateDB.Prepare(rules, caller, types.NullAddress, nil, append(vm.ActivePrecompiles(rules), k.precompiles.toAddrs()...), nil)
evm.StateDB.Prepare(rules, caller, types.NullAddress, nil, append(vm.ActivePrecompiles(rules), k.precompiles.toAddrs()...), accessList)

var gasRemaining uint64
if salt == nil {
Expand Down
Loading

0 comments on commit b26d50c

Please sign in to comment.