Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: v0.50.x is outdated #392

Merged
merged 39 commits into from
Jun 4, 2024
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
87ad797
build(deps): Bump github.com/cosmos/gogoproto from 1.4.11 to 1.4.12 (…
dependabot[bot] Mar 21, 2024
a0faab3
feat(x/gov): emit proposer address in submit proposal event (backport…
mergify[bot] Mar 24, 2024
9c53142
feat(x/gov): emit depositor in `proposal_deposit` event (backport #19…
mergify[bot] Mar 25, 2024
d78edac
reuse fromAddrString (minor cleanup) (#19881)
yihuang Mar 27, 2024
8641cd2
feat(client): replace `event-query-tx-for` with `wait-tx` (backport #…
mergify[bot] Mar 27, 2024
7b35e36
feat(server): add custom start handler (backport #19854) (#19884)
mergify[bot] Mar 28, 2024
405471b
build(deps): Bump cosmossdk.io/store from 1.0.2 to 1.1.0 (#19810)
dependabot[bot] Mar 28, 2024
f63e5fd
docs(x/mint): Fix inconsistency in mint docs (backport #19915) (#19925)
mergify[bot] Apr 3, 2024
4b71767
build(deps): Bump github.com/cosmos/iavl from 1.1.1 to 1.1.2 (#19985)
dependabot[bot] Apr 10, 2024
525b720
fix(client/v2): add encoder for `cosmos.base.v1beta1.DecCoin` (backpo…
mergify[bot] Apr 10, 2024
f76c659
fix(mempool): use no-op mempool as default (backport #19970) (#20008)
mergify[bot] Apr 11, 2024
974a24c
feat: Conditionally emit metrics based on enablement (backport #19903…
mergify[bot] Apr 12, 2024
452632f
fix(x/bank): align query with multi denoms for send-enabled (backport…
mergify[bot] Apr 12, 2024
521ebe5
fix: Implement gogoproto customtype to secp256r1 keys (backport #2002…
mergify[bot] Apr 13, 2024
741b01c
fix(client/v2): respect output format from client ctx (backport #2003…
mergify[bot] Apr 15, 2024
d6a0fa1
build(deps): Bump cosmossdk.io/x/tx from 0.13.1 to 0.13.2 (#20042)
dependabot[bot] Apr 15, 2024
dafcc78
feat(x/bank): support depinject for send restrictions (backport #2001…
mergify[bot] Apr 15, 2024
9941498
fix(baseapp): don't share global gas meter in tx execution (backport …
mergify[bot] Apr 16, 2024
49c3ae6
fix: secp256r1 json missing quotes (backport #20060) (#20069)
mergify[bot] Apr 17, 2024
a2abf1a
build(deps): Bump github.com/cosmos/cosmos-proto from 1.0.0-beta.4 to…
dependabot[bot] Apr 19, 2024
2a32f42
feat(client/v2): implement version filtering using annotation (backpo…
mergify[bot] Apr 19, 2024
4bd0e02
chore: prepare v0.50.6 (#19998)
julienrbrt Apr 21, 2024
0a682f7
fix: use timestamp for sim log file name (backport #20108) (#20111)
mergify[bot] Apr 21, 2024
fcb9d84
fix(x/authz,x/feegrant): check blocked address (#20102)
julienrbrt Apr 21, 2024
c4d9a49
chore: update v0.50.6 release notes (#20124)
julienrbrt Apr 22, 2024
a42a85a
build(deps): bump sdk in modules (#20126)
julienrbrt Apr 22, 2024
3437fd5
docs(gas/fees): Update block gas documentation (backport #20128) (#20…
mergify[bot] Apr 22, 2024
7828a00
fix(baseapp): avoid header height overwrite block height (backport #2…
mergify[bot] Apr 22, 2024
ad8c205
docs: fix broken link (backport #20133) (#20138)
mergify[bot] Apr 22, 2024
bb9f451
build(deps): bump modules in simapp (#20137)
julienrbrt Apr 22, 2024
d4896c2
build(deps): Bump cosmossdk.io/x/tx from 0.13.2 to 0.13.3 (#20152)
dependabot[bot] Apr 23, 2024
016389c
docs: add authz reference info in the circuit antehandler (backport #…
mergify[bot] Apr 23, 2024
66ac784
fix(testsuite/sims): set all signatures (backport #20151) (#20185)
mergify[bot] Apr 25, 2024
f74c0e9
build(deps): Bump github.com/cometbft/cometbft from 0.38.6 to 0.38.7 …
dependabot[bot] Apr 29, 2024
a65c2f7
fix(server): bootstrap-state command can't parse latest genesis forma…
mergify[bot] Apr 29, 2024
8ffc807
fix: remove txs from mempool when antehandler fails in recheck (backp…
mergify[bot] May 2, 2024
c42a5e1
Merge remote-tracking branch 'origin/release/v0.50.x' into release/v0…
mmsqe May 3, 2024
d745b17
fix resolve
mmsqe May 3, 2024
0bd0905
align dependencies
mmsqe Jun 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(client/v2): add encoder for cosmos.base.v1beta1.DecCoin (backport
cosmos#19976) (cosmos#20001)

Co-authored-by: Julien Robert <[email protected]>
mergify[bot] and julienrbrt authored Apr 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 525b7208711734aa9303e91fe0953c89c91dd42e
3 changes: 2 additions & 1 deletion client/v2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -44,11 +44,12 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Bump `cosmossdk.io/store` to v1.1.0.
* [#19618](https://github.com/cosmos/cosmos-sdk/pull/19618) Marshal enum as string in queries.
* [#19060](https://github.com/cosmos/cosmos-sdk/pull/19060) Use client context from root (or enhanced) command in autocli commands.
* Note, the given command must have a `client.Context` in its context.
* Note, the given command must have a `client.Context` in its context.
* [#19216](https://github.com/cosmos/cosmos-sdk/pull/19216) Do not overwrite TxConfig, use directly the one provided in context. TxConfig should always be set in the `client.Context` in `root.go` of an app.

### Bug Fixes

* [#19976](https://github.com/cosmos/cosmos-sdk/pull/19976) Add encoder for `cosmos.base.v1beta1.DecCoin`.
* [#19377](https://github.com/cosmos/cosmos-sdk/pull/19377) Partly fix comment parsing in autocli.
* [#19060](https://github.com/cosmos/cosmos-sdk/pull/19060) Simplify key flag parsing logic in flag handler.

40 changes: 40 additions & 0 deletions client/v2/autocli/query.go
Original file line number Diff line number Diff line change
@@ -4,16 +4,20 @@ import (
"context"
"fmt"
"io"
"strings"
"time"

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
"cosmossdk.io/math"
"cosmossdk.io/x/tx/signing/aminojson"
"github.com/cockroachdb/errors"
"github.com/spf13/cobra"
"google.golang.org/protobuf/reflect/protoreflect"

"cosmossdk.io/client/v2/internal/flags"
"cosmossdk.io/client/v2/internal/util"

sdk "github.com/cosmos/cosmos-sdk/types"
)

// BuildQueryCommand builds the query commands for all the provided modules. If a custom command is provided for a
@@ -183,5 +187,41 @@ func encoder(encoder aminojson.Encoder) aminojson.Encoder {

_, err := fmt.Fprintf(w, `"%s"`, (time.Duration(seconds)*time.Second + (time.Duration(nanos) * time.Nanosecond)).String())
return err
}).DefineTypeEncoding("cosmos.base.v1beta1.DecCoin", func(_ *aminojson.Encoder, msg protoreflect.Message, w io.Writer) error {
var (
denomName protoreflect.Name = "denom"
amountName protoreflect.Name = "amount"
)

fields := msg.Descriptor().Fields()
denomField := fields.ByName(denomName)
if denomField == nil {
return fmt.Errorf("expected denom field")
}

denom := msg.Get(denomField).String()

amountField := fields.ByName(amountName)
if amountField == nil {
return fmt.Errorf("expected amount field")
}

amount := msg.Get(amountField).String()
decimalPlace := len(amount) - math.LegacyPrecision
if decimalPlace > 0 {
amount = amount[:decimalPlace] + "." + amount[decimalPlace:]
} else if decimalPlace == 0 {
amount = "0." + amount
} else {
amount = "0." + strings.Repeat("0", -decimalPlace) + amount
}

amountDec, err := math.LegacyNewDecFromStr(amount)
if err != nil {
return fmt.Errorf("invalid amount: %s: %w", amount, err)
}

_, err = fmt.Fprintf(w, `"%s"`, sdk.NewDecCoinFromDec(denom, amountDec)) // TODO(@julienrbrt): Eventually remove this SDK dependency
return err
})
}