@@ -34,7 +34,7 @@ func TestAddNative(t *testing.T) {
34
34
require .Nil (t , err )
35
35
statedb := state .NewDBImpl (ctx , & testApp .EvmKeeper , true )
36
36
blockCtx , _ := testApp .EvmKeeper .GetVMBlockContext (ctx , core .GasPool (suppliedGas ))
37
- evm := vm .NewEVM (* blockCtx , vm.TxContext {}, statedb , cfg , vm.Config {}, testApp .EvmKeeper .CustomPrecompiles ())
37
+ evm := vm .NewEVM (* blockCtx , vm.TxContext {}, statedb , cfg , vm.Config {}, testApp .EvmKeeper .CustomPrecompiles (ctx ))
38
38
_ , g , err := p .RunAndCalculateGas (evm , caller , caller , append (p .GetExecutor ().(* pointer.PrecompileExecutor ).AddNativePointerID , args ... ), suppliedGas , nil , nil , false , false )
39
39
require .NotNil (t , err )
40
40
require .NotNil (t , statedb .GetPrecompileError ())
@@ -54,7 +54,7 @@ func TestAddNative(t *testing.T) {
54
54
}},
55
55
})
56
56
statedb = state .NewDBImpl (ctx , & testApp .EvmKeeper , false )
57
- evm = vm .NewEVM (* blockCtx , vm.TxContext {}, statedb , cfg , vm.Config {}, testApp .EvmKeeper .CustomPrecompiles ())
57
+ evm = vm .NewEVM (* blockCtx , vm.TxContext {}, statedb , cfg , vm.Config {}, testApp .EvmKeeper .CustomPrecompiles (ctx ))
58
58
ret , g , err := p .RunAndCalculateGas (evm , caller , caller , append (p .GetExecutor ().(* pointer.PrecompileExecutor ).AddNativePointerID , args ... ), suppliedGas , nil , nil , false , false )
59
59
require .Nil (t , err )
60
60
require .Equal (t , uint64 (8889527 ), g )
@@ -83,7 +83,7 @@ func TestAddNative(t *testing.T) {
83
83
testApp .EvmKeeper .DeleteERC20NativePointer (statedb .Ctx (), "test" , version )
84
84
testApp .EvmKeeper .SetERC20NativePointerWithVersion (statedb .Ctx (), "test" , pointerAddr , version - 1 )
85
85
statedb = state .NewDBImpl (statedb .Ctx (), & testApp .EvmKeeper , true )
86
- evm = vm .NewEVM (* blockCtx , vm.TxContext {}, statedb , cfg , vm.Config {}, testApp .EvmKeeper .CustomPrecompiles ())
86
+ evm = vm .NewEVM (* blockCtx , vm.TxContext {}, statedb , cfg , vm.Config {}, testApp .EvmKeeper .CustomPrecompiles (ctx ))
87
87
_ , _ , err = p .RunAndCalculateGas (evm , caller , caller , append (p .GetExecutor ().(* pointer.PrecompileExecutor ).AddNativePointerID , args ... ), suppliedGas , nil , nil , false , false )
88
88
require .Nil (t , err )
89
89
require .Nil (t , statedb .GetPrecompileError ())
0 commit comments