Skip to content

Commit

Permalink
feat: Add convenience method for constructing key to access account's…
Browse files Browse the repository at this point in the history
… balance for a given denom (backport cosmos#12674) (cosmos#12745)

* feat: Add convenience method for constructing key to access account's balance for a given denom (cosmos#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

# Conflicts:
#	CHANGELOG.md
#	x/bank/legacy/v043/store.go
#	x/bank/types/keys.go

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <41963722+renaynay@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
  • Loading branch information
3 people authored and JeancarloBarrios committed Sep 28, 2024
1 parent ebabdd9 commit 89dbe54
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (x/params) [#12724](https://github.com/cosmos/cosmos-sdk/pull/12724) Add `GetParamSetIfExists` function to params `Subspace` to prevent panics on breaking changes.
* [#12668](https://github.com/cosmos/cosmos-sdk/pull/12668) Add `authz_msg_index` event attribute to message events emitted when executing via `MsgExec` through `x/authz`.
* [#12697](https://github.com/cosmos/cosmos-sdk/pull/12697) Upgrade IAVL to v0.19.0 with fast index and error propagation. NOTE: first start will take a while to propagate into new model.
* (x/bank) [#12674](https://github.com/cosmos/cosmos-sdk/pull/12674) Add convenience function `CreatePrefixedAccountStoreKey()` to construct key to access account's balance for a given denom.

### Bug Fixes

Expand Down

0 comments on commit 89dbe54

Please sign in to comment.