@@ -711,15 +711,15 @@ func TestInstantiateWithNonExistingCodeID(t *testing.T) {
711711func TestInstantiateWithContractDataResponse (t * testing.T ) {
712712 ctx , keepers := CreateTestInput (t , false , AvailableCapabilities )
713713
714- wasmerMock := & wasmtesting.MockWasmer {
714+ wasmEngineMock := & wasmtesting.MockWasmEngine {
715715 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 ) {
716716 return & wasmvmtypes.Response {Data : []byte ("my-response-data" )}, 0 , nil
717717 },
718718 AnalyzeCodeFn : wasmtesting .WithoutIBCAnalyzeFn ,
719719 StoreCodeFn : wasmtesting .NoOpStoreCodeFn ,
720720 }
721721
722- example := StoreRandomContract (t , ctx , keepers , wasmerMock )
722+ example := StoreRandomContract (t , ctx , keepers , wasmEngineMock )
723723 _ , data , err := keepers .ContractKeeper .Instantiate (ctx , example .CodeID , example .CreatorAddr , nil , nil , "test" , nil )
724724 require .NoError (t , err )
725725 assert .Equal (t , []byte ("my-response-data" ), data )
@@ -738,7 +738,7 @@ func TestInstantiateWithContractFactoryChildQueriesParent(t *testing.T) {
738738
739739 var instantiationCount int
740740 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 {
742742 // dispatch instantiation calls to callbacks
743743 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 ) {
744744 require .Greater (t , len (callbacks ), instantiationCount , "unexpected call to instantiation" )
@@ -758,7 +758,7 @@ func TestInstantiateWithContractFactoryChildQueriesParent(t *testing.T) {
758758 // overwrite wasmvm in response handler
759759 keeper .wasmVMResponseHandler = NewDefaultWasmVMContractResponseHandler (NewMessageDispatcher (keeper .messenger , keeper ))
760760
761- example := StoreRandomContract (t , ctx , keepers , wasmerMock )
761+ example := StoreRandomContract (t , ctx , keepers , wasmEngineMock )
762762 // factory contract
763763 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 ) {
764764 t .Log ("called factory" )
@@ -1467,7 +1467,7 @@ func TestIterateContractsByCode(t *testing.T) {
14671467
14681468func TestIterateContractsByCodeWithMigration (t * testing.T ) {
14691469 // 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 ) {
14711471 return & wasmvmtypes.Response {}, 1 , nil
14721472 }}
14731473 wasmtesting .MakeInstantiable (& mockWasmVM )
@@ -1733,7 +1733,7 @@ func TestPinCode(t *testing.T) {
17331733 k := keepers .WasmKeeper
17341734
17351735 var capturedChecksums []wasmvm.Checksum
1736- mock := wasmtesting.MockWasmer {PinFn : func (checksum wasmvm.Checksum ) error {
1736+ mock := wasmtesting.MockWasmEngine {PinFn : func (checksum wasmvm.Checksum ) error {
17371737 capturedChecksums = append (capturedChecksums , checksum )
17381738 return nil
17391739 }}
@@ -1760,7 +1760,7 @@ func TestUnpinCode(t *testing.T) {
17601760 k := keepers .WasmKeeper
17611761
17621762 var capturedChecksums []wasmvm.Checksum
1763- mock := wasmtesting.MockWasmer {
1763+ mock := wasmtesting.MockWasmEngine {
17641764 PinFn : func (checksum wasmvm.Checksum ) error {
17651765 return nil
17661766 },
@@ -1794,7 +1794,7 @@ func TestInitializePinnedCodes(t *testing.T) {
17941794 k := keepers .WasmKeeper
17951795
17961796 var capturedChecksums []wasmvm.Checksum
1797- mock := wasmtesting.MockWasmer {PinFn : func (checksum wasmvm.Checksum ) error {
1797+ mock := wasmtesting.MockWasmEngine {PinFn : func (checksum wasmvm.Checksum ) error {
17981798 capturedChecksums = append (capturedChecksums , checksum )
17991799 return nil
18001800 }}
@@ -1822,7 +1822,7 @@ func TestInitializePinnedCodes(t *testing.T) {
18221822
18231823func TestPinnedContractLoops (t * testing.T ) {
18241824 var capturedChecksums []wasmvm.Checksum
1825- mock := wasmtesting.MockWasmer {PinFn : func (checksum wasmvm.Checksum ) error {
1825+ mock := wasmtesting.MockWasmEngine {PinFn : func (checksum wasmvm.Checksum ) error {
18261826 capturedChecksums = append (capturedChecksums , checksum )
18271827 return nil
18281828 }}
@@ -1948,7 +1948,7 @@ func TestNewDefaultWasmVMContractResponseHandler(t *testing.T) {
19481948func TestReply (t * testing.T ) {
19491949 ctx , keepers := CreateTestInput (t , false , AvailableCapabilities )
19501950 k := keepers .WasmKeeper
1951- var mock wasmtesting.MockWasmer
1951+ var mock wasmtesting.MockWasmEngine
19521952 wasmtesting .MakeInstantiable (& mock )
19531953 example := SeedNewContractInstance (t , ctx , keepers , & mock )
19541954
@@ -2017,7 +2017,7 @@ func TestReply(t *testing.T) {
20172017func TestQueryIsolation (t * testing.T ) {
20182018 ctx , keepers := CreateTestInput (t , false , AvailableCapabilities )
20192019 k := keepers .WasmKeeper
2020- var mock wasmtesting.MockWasmer
2020+ var mock wasmtesting.MockWasmEngine
20212021 wasmtesting .MakeInstantiable (& mock )
20222022 example := SeedNewContractInstance (t , ctx , keepers , & mock )
20232023 WithQueryHandlerDecorator (func (other WasmVMQueryHandler ) WasmVMQueryHandler {
0 commit comments