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

fix: sdkmath type in PoolSnapshot #536

Merged
merged 5 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
- name: Test & Create coverage report
run: make install test-unit stop-docker-test
- name: Upload cove coverage
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#### Staking Module
- ([\#443](https://github.com/forbole/bdjuno/pull/443)) Remove tombstone status from staking module(already stored in slashing module)
- ([\#455](https://github.com/forbole/bdjuno/pull/455)) Added `unbonding_tokens` and `staked_not_bonded_tokens` values to staking pool table
- ([\#536](https://github.com/forbole/bdjuno/pull/536) Fix `PoolSnapshot` tokens type from `sdk.Int` to `sdkmath.Int`

#### Gov Module
- ([\#461](https://github.com/forbole/bdjuno/pull/461)) Parse `x/gov` genesis with `genesisDoc.InitialHeight` instead of the hard-coded height 1
Expand Down Expand Up @@ -130,4 +131,4 @@ This version introduces breaking changes to certain address-specific data that i
- ([\#276](https://github.com/forbole/bdjuno/pull/276)) Added `fee_grant_allowance` table (v0.44.x)

#### Modules
- ([\#353](https://github.com/forbole/bdjuno/pull/353)) Removed the support for the `history` module
- ([\#353](https://github.com/forbole/bdjuno/pull/353)) Removed the support for the `history` module
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/forbole/bdjuno/v4

go 1.19
go 1.18

require (
cosmossdk.io/math v1.0.0-beta.3
Expand Down
6 changes: 3 additions & 3 deletions types/staking_pool_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ func NewPool(bondedTokens, notBondedTokens, unbondingTokens, stakedNotBondedToke

// PoolSnapshot contains the data of the staking pool snapshot at the given height
type PoolSnapshot struct {
BondedTokens sdk.Int
NotBondedTokens sdk.Int
BondedTokens sdkmath.Int
NotBondedTokens sdkmath.Int
Height int64
}

// NewPoolSnapshot allows to build a new PoolSnapshot instance
func NewPoolSnapshot(bondedTokens, notBondedTokens sdk.Int, height int64) *PoolSnapshot {
func NewPoolSnapshot(bondedTokens, notBondedTokens sdkmath.Int, height int64) *PoolSnapshot {
return &PoolSnapshot{
BondedTokens: bondedTokens,
NotBondedTokens: notBondedTokens,
Expand Down