@@ -711,15 +711,15 @@ func TestInstantiateWithNonExistingCodeID(t *testing.T) {
711
711
func TestInstantiateWithContractDataResponse (t * testing.T ) {
712
712
ctx , keepers := CreateTestInput (t , false , AvailableCapabilities )
713
713
714
- wasmerMock := & wasmtesting.MockWasmer {
714
+ wasmEngineMock := & wasmtesting.MockWasmEngine {
715
715
InstantiateFn : func (codeID wasmvm.Checksum , env wasmvmtypes.Env , info wasmvmtypes.MessageInfo , initMsg []byte , store wasmvm.KVStore , goapi wasmvm.GoAPI , querier wasmvm.Querier , gasMeter wasmvm.GasMeter , gasLimit uint64 , deserCost wasmvmtypes.UFraction ) (* wasmvmtypes.Response , uint64 , error ) {
716
716
return & wasmvmtypes.Response {Data : []byte ("my-response-data" )}, 0 , nil
717
717
},
718
718
AnalyzeCodeFn : wasmtesting .WithoutIBCAnalyzeFn ,
719
719
StoreCodeFn : wasmtesting .NoOpStoreCodeFn ,
720
720
}
721
721
722
- example := StoreRandomContract (t , ctx , keepers , wasmerMock )
722
+ example := StoreRandomContract (t , ctx , keepers , wasmEngineMock )
723
723
_ , data , err := keepers .ContractKeeper .Instantiate (ctx , example .CodeID , example .CreatorAddr , nil , nil , "test" , nil )
724
724
require .NoError (t , err )
725
725
assert .Equal (t , []byte ("my-response-data" ), data )
@@ -738,7 +738,7 @@ func TestInstantiateWithContractFactoryChildQueriesParent(t *testing.T) {
738
738
739
739
var instantiationCount int
740
740
callbacks := make ([]func (codeID wasmvm.Checksum , env wasmvmtypes.Env , info wasmvmtypes.MessageInfo , initMsg []byte , store wasmvm.KVStore , goapi wasmvm.GoAPI , querier wasmvm.Querier , gasMeter wasmvm.GasMeter , gasLimit uint64 , deserCost wasmvmtypes.UFraction ) (* wasmvmtypes.Response , uint64 , error ), 2 )
741
- wasmerMock := & wasmtesting.MockWasmer {
741
+ wasmEngineMock := & wasmtesting.MockWasmEngine {
742
742
// dispatch instantiation calls to callbacks
743
743
InstantiateFn : func (codeID wasmvm.Checksum , env wasmvmtypes.Env , info wasmvmtypes.MessageInfo , initMsg []byte , store wasmvm.KVStore , goapi wasmvm.GoAPI , querier wasmvm.Querier , gasMeter wasmvm.GasMeter , gasLimit uint64 , deserCost wasmvmtypes.UFraction ) (* wasmvmtypes.Response , uint64 , error ) {
744
744
require .Greater (t , len (callbacks ), instantiationCount , "unexpected call to instantiation" )
@@ -758,7 +758,7 @@ func TestInstantiateWithContractFactoryChildQueriesParent(t *testing.T) {
758
758
// overwrite wasmvm in response handler
759
759
keeper .wasmVMResponseHandler = NewDefaultWasmVMContractResponseHandler (NewMessageDispatcher (keeper .messenger , keeper ))
760
760
761
- example := StoreRandomContract (t , ctx , keepers , wasmerMock )
761
+ example := StoreRandomContract (t , ctx , keepers , wasmEngineMock )
762
762
// factory contract
763
763
callbacks [0 ] = func (codeID wasmvm.Checksum , env wasmvmtypes.Env , info wasmvmtypes.MessageInfo , initMsg []byte , store wasmvm.KVStore , goapi wasmvm.GoAPI , querier wasmvm.Querier , gasMeter wasmvm.GasMeter , gasLimit uint64 , deserCost wasmvmtypes.UFraction ) (* wasmvmtypes.Response , uint64 , error ) {
764
764
t .Log ("called factory" )
@@ -1467,7 +1467,7 @@ func TestIterateContractsByCode(t *testing.T) {
1467
1467
1468
1468
func TestIterateContractsByCodeWithMigration (t * testing.T ) {
1469
1469
// mock migration so that it does not fail when migrate example1 to example2.codeID
1470
- mockWasmVM := wasmtesting.MockWasmer {MigrateFn : func (codeID wasmvm.Checksum , env wasmvmtypes.Env , migrateMsg []byte , store wasmvm.KVStore , goapi wasmvm.GoAPI , querier wasmvm.Querier , gasMeter wasmvm.GasMeter , gasLimit uint64 , deserCost wasmvmtypes.UFraction ) (* wasmvmtypes.Response , uint64 , error ) {
1470
+ mockWasmVM := wasmtesting.MockWasmEngine {MigrateFn : func (codeID wasmvm.Checksum , env wasmvmtypes.Env , migrateMsg []byte , store wasmvm.KVStore , goapi wasmvm.GoAPI , querier wasmvm.Querier , gasMeter wasmvm.GasMeter , gasLimit uint64 , deserCost wasmvmtypes.UFraction ) (* wasmvmtypes.Response , uint64 , error ) {
1471
1471
return & wasmvmtypes.Response {}, 1 , nil
1472
1472
}}
1473
1473
wasmtesting .MakeInstantiable (& mockWasmVM )
@@ -1733,7 +1733,7 @@ func TestPinCode(t *testing.T) {
1733
1733
k := keepers .WasmKeeper
1734
1734
1735
1735
var capturedChecksums []wasmvm.Checksum
1736
- mock := wasmtesting.MockWasmer {PinFn : func (checksum wasmvm.Checksum ) error {
1736
+ mock := wasmtesting.MockWasmEngine {PinFn : func (checksum wasmvm.Checksum ) error {
1737
1737
capturedChecksums = append (capturedChecksums , checksum )
1738
1738
return nil
1739
1739
}}
@@ -1760,7 +1760,7 @@ func TestUnpinCode(t *testing.T) {
1760
1760
k := keepers .WasmKeeper
1761
1761
1762
1762
var capturedChecksums []wasmvm.Checksum
1763
- mock := wasmtesting.MockWasmer {
1763
+ mock := wasmtesting.MockWasmEngine {
1764
1764
PinFn : func (checksum wasmvm.Checksum ) error {
1765
1765
return nil
1766
1766
},
@@ -1794,7 +1794,7 @@ func TestInitializePinnedCodes(t *testing.T) {
1794
1794
k := keepers .WasmKeeper
1795
1795
1796
1796
var capturedChecksums []wasmvm.Checksum
1797
- mock := wasmtesting.MockWasmer {PinFn : func (checksum wasmvm.Checksum ) error {
1797
+ mock := wasmtesting.MockWasmEngine {PinFn : func (checksum wasmvm.Checksum ) error {
1798
1798
capturedChecksums = append (capturedChecksums , checksum )
1799
1799
return nil
1800
1800
}}
@@ -1822,7 +1822,7 @@ func TestInitializePinnedCodes(t *testing.T) {
1822
1822
1823
1823
func TestPinnedContractLoops (t * testing.T ) {
1824
1824
var capturedChecksums []wasmvm.Checksum
1825
- mock := wasmtesting.MockWasmer {PinFn : func (checksum wasmvm.Checksum ) error {
1825
+ mock := wasmtesting.MockWasmEngine {PinFn : func (checksum wasmvm.Checksum ) error {
1826
1826
capturedChecksums = append (capturedChecksums , checksum )
1827
1827
return nil
1828
1828
}}
@@ -1948,7 +1948,7 @@ func TestNewDefaultWasmVMContractResponseHandler(t *testing.T) {
1948
1948
func TestReply (t * testing.T ) {
1949
1949
ctx , keepers := CreateTestInput (t , false , AvailableCapabilities )
1950
1950
k := keepers .WasmKeeper
1951
- var mock wasmtesting.MockWasmer
1951
+ var mock wasmtesting.MockWasmEngine
1952
1952
wasmtesting .MakeInstantiable (& mock )
1953
1953
example := SeedNewContractInstance (t , ctx , keepers , & mock )
1954
1954
@@ -2017,7 +2017,7 @@ func TestReply(t *testing.T) {
2017
2017
func TestQueryIsolation (t * testing.T ) {
2018
2018
ctx , keepers := CreateTestInput (t , false , AvailableCapabilities )
2019
2019
k := keepers .WasmKeeper
2020
- var mock wasmtesting.MockWasmer
2020
+ var mock wasmtesting.MockWasmEngine
2021
2021
wasmtesting .MakeInstantiable (& mock )
2022
2022
example := SeedNewContractInstance (t , ctx , keepers , & mock )
2023
2023
WithQueryHandlerDecorator (func (other WasmVMQueryHandler ) WasmVMQueryHandler {
0 commit comments