From 63bb5093b601619ddfb6e5f3a989b75477b3c825 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Wed, 26 Jul 2023 16:01:44 +0300 Subject: [PATCH 1/3] Use wasmQuery for the rest of the query functions. --- modules/light-clients/08-wasm/types/client_state.go | 4 ++-- modules/light-clients/08-wasm/types/misbehaviour_handle.go | 2 +- modules/light-clients/08-wasm/types/update.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/light-clients/08-wasm/types/client_state.go b/modules/light-clients/08-wasm/types/client_state.go index ced9598d5b6..cf2e9a9f015 100644 --- a/modules/light-clients/08-wasm/types/client_state.go +++ b/modules/light-clients/08-wasm/types/client_state.go @@ -191,7 +191,7 @@ func (cs ClientState) VerifyMembership( Value: value, }, } - _, err = call[contractResult](ctx, clientStore, &cs, payload) + _, err = wasmQuery[contractResult](ctx, clientStore, &cs, payload) return err } @@ -247,7 +247,7 @@ func (cs ClientState) VerifyNonMembership( Path: path, }, } - _, err = call[contractResult](ctx, clientStore, &cs, payload) + _, err = wasmQuery[contractResult](ctx, clientStore, &cs, payload) return err } diff --git a/modules/light-clients/08-wasm/types/misbehaviour_handle.go b/modules/light-clients/08-wasm/types/misbehaviour_handle.go index 0dc89294ff0..f4a75cb44a3 100644 --- a/modules/light-clients/08-wasm/types/misbehaviour_handle.go +++ b/modules/light-clients/08-wasm/types/misbehaviour_handle.go @@ -41,7 +41,7 @@ func (cs ClientState) CheckForMisbehaviour(ctx sdk.Context, _ codec.BinaryCodec, CheckForMisbehaviour: inner, } - result, err := call[CheckForMisbehaviourExecuteResult](ctx, clientStore, &cs, payload) + result, err := wasmQuery[CheckForMisbehaviourExecuteResult](ctx, clientStore, &cs, payload) if err != nil { panic(err) } diff --git a/modules/light-clients/08-wasm/types/update.go b/modules/light-clients/08-wasm/types/update.go index b86f7dc1ad3..6454d0b3254 100644 --- a/modules/light-clients/08-wasm/types/update.go +++ b/modules/light-clients/08-wasm/types/update.go @@ -45,7 +45,7 @@ func (cs ClientState) VerifyClientMessage(ctx sdk.Context, _ codec.BinaryCodec, payload := verifyClientMessagePayload{ VerifyClientMessage: inner, } - _, err := call[contractResult](ctx, clientStore, &cs, payload) + _, err := wasmQuery[contractResult](ctx, clientStore, &cs, payload) return err } From e74c68cefd42df59bf9a3e97f5bec571cd9a6ecb Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Fri, 28 Jul 2023 13:28:37 +0200 Subject: [PATCH 2/3] Update client_state.go --- modules/light-clients/08-wasm/types/client_state.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/light-clients/08-wasm/types/client_state.go b/modules/light-clients/08-wasm/types/client_state.go index df9bb05d848..1428ecc2014 100644 --- a/modules/light-clients/08-wasm/types/client_state.go +++ b/modules/light-clients/08-wasm/types/client_state.go @@ -191,7 +191,6 @@ func (cs ClientState) VerifyMembership( Value: value, }, } - _, err = wasmQuery[contractResult](ctx, clientStore, &cs, payload) return err } @@ -248,7 +247,6 @@ func (cs ClientState) VerifyNonMembership( Path: path, }, } - _, err = wasmQuery[contractResult](ctx, clientStore, &cs, payload) return err } From 42ec92fd7727e8b41102501fd68689662a958ef4 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Mon, 31 Jul 2023 10:27:25 +0300 Subject: [PATCH 3/3] Fix rebasing induced failure. --- modules/light-clients/08-wasm/types/client_state.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/light-clients/08-wasm/types/client_state.go b/modules/light-clients/08-wasm/types/client_state.go index 1428ecc2014..b28ec9d4a6a 100644 --- a/modules/light-clients/08-wasm/types/client_state.go +++ b/modules/light-clients/08-wasm/types/client_state.go @@ -191,7 +191,7 @@ func (cs ClientState) VerifyMembership( Value: value, }, } - _, err = wasmQuery[contractResult](ctx, clientStore, &cs, payload) + _, err := wasmQuery[contractResult](ctx, clientStore, &cs, payload) return err } @@ -247,7 +247,7 @@ func (cs ClientState) VerifyNonMembership( Path: path, }, } - _, err = wasmQuery[contractResult](ctx, clientStore, &cs, payload) + _, err := wasmQuery[contractResult](ctx, clientStore, &cs, payload) return err }