From 4d2fa4be2af15d10a29428bdc3bfcc58771acfd7 Mon Sep 17 00:00:00 2001 From: Daniel Wedul Date: Thu, 24 Oct 2024 14:50:21 -0600 Subject: [PATCH 1/2] Fix the query wasm build-address command so that it has the needed query flags. --- cmd/provenanced/cmd/root.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmd/provenanced/cmd/root.go b/cmd/provenanced/cmd/root.go index d151d4d01..8bb24890f 100644 --- a/cmd/provenanced/cmd/root.go +++ b/cmd/provenanced/cmd/root.go @@ -132,6 +132,7 @@ func NewRootCmd(sealConfig bool) (*cobra.Command, params.EncodingConfig) { } fixTxWasmInstantiate2Aliases(rootCmd) + fixQueryWasmBuildAddressFlags(rootCmd) return rootCmd, encodingConfig } @@ -535,3 +536,16 @@ func getTelemetryGlobalLabels(logger log.Logger, appOpts servertypes.AppOptions) logger.Debug("Extracted telemetry setup from app options.", telEnabledKey, enabled, telGlobalLabelsKey, globalLabels) return globalLabels, enabled } + +// fixQueryWasmBuildAddressFlags resolves an issue where the Wasm build-address query failed to recognize the node flag. +func fixQueryWasmBuildAddressFlags(rootCmd *cobra.Command) { + // Find the "build-address" command. + cmd, _, err := rootCmd.Find([]string{"query", "wasm", "build-address"}) + if err != nil || cmd == nil { + // If the command doesn't exist, there's nothing to do. + return + } + + // Apply query flags to the command. + flags.AddQueryFlagsToCmd(cmd) +} From 033aaa2200892cc1894b49c44ce15587f6824a83 Mon Sep 17 00:00:00 2001 From: Daniel Wedul Date: Thu, 24 Oct 2024 14:51:54 -0600 Subject: [PATCH 2/2] Add changelog entry. --- .changelog/unreleased/bug-fixes/2199-fix-wasm-build-addr.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .changelog/unreleased/bug-fixes/2199-fix-wasm-build-addr.md diff --git a/.changelog/unreleased/bug-fixes/2199-fix-wasm-build-addr.md b/.changelog/unreleased/bug-fixes/2199-fix-wasm-build-addr.md new file mode 100644 index 000000000..d366ec534 --- /dev/null +++ b/.changelog/unreleased/bug-fixes/2199-fix-wasm-build-addr.md @@ -0,0 +1 @@ +* Add the query flags to the query wasm build-addr command [PR 2199](https://github.com/provenance-io/provenance/pull/2199).