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

feat: cosmos-sdk v0.50.x #175

Merged
merged 22 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
gofumpted..
  • Loading branch information
harish551 committed Aug 2, 2024
commit f4f9e1bdba51f7b532ec2d37b1d3882bf38b9181
10 changes: 5 additions & 5 deletions app/apptesting/test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ func (s *KeeperTestHelper) BeginNewBlock(executeNextEpoch bool) {

// BeginNewBlockWithProposer begins a new block with a proposer.
func (s *KeeperTestHelper) BeginNewBlockWithProposer(executeNextEpoch bool, proposer sdk.ValAddress) {
//validator, err := s.App.StakingKeeper.GetValidator(s.Ctx, proposer)
//s.Assert().NoError(err)
// validator, err := s.App.StakingKeeper.GetValidator(s.Ctx, proposer)
// s.Assert().NoError(err)

//valConsAddr, err := validator.GetConsAddr()
//s.Require().NoError(err)
// valConsAddr, err := validator.GetConsAddr()
// s.Require().NoError(err)

//valAddr := valConsAddr
// valAddr := valConsAddr

newBlockTime := s.Ctx.BlockTime().Add(5 * time.Second)

Expand Down
1 change: 1 addition & 0 deletions app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package app
import (
"encoding/json"
"fmt"

tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
6 changes: 4 additions & 2 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package app

import (
sdkmath "cosmossdk.io/math"
"encoding/json"
"path/filepath"
"testing"
"time"

sdkmath "cosmossdk.io/math"

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"

"cosmossdk.io/store/snapshots"
Expand Down Expand Up @@ -133,7 +134,7 @@ func setup(t *testing.T, withGenesis bool, opts ...wasmkeeper.Option) (*OmniFlix

db := dbm.NewMemDB()
nodeHome := t.TempDir()
encCdc := MakeEncodingConfig()
encCdc := GetEncodingConfig()
snapshotDir := filepath.Join(nodeHome, "data", "snapshots")

snapshotDB, err := dbm.NewDB("metadata", dbm.GoLevelDBBackend, snapshotDir)
Expand All @@ -153,6 +154,7 @@ func setup(t *testing.T, withGenesis bool, opts ...wasmkeeper.Option) (*OmniFlix
map[int64]bool{},
DefaultNodeHome,
0,
encCdc,
appOptions,
opts,
baseApp.SetChainID(SimAppChainID),
Expand Down
1 change: 1 addition & 0 deletions app/upgrades/v012/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package v012

import (
"context"

upgradetypes "cosmossdk.io/x/upgrade/types"
"github.com/OmniFlix/omniflixhub/v5/app/keepers"
"github.com/OmniFlix/omniflixhub/v5/app/upgrades"
Expand Down
1 change: 1 addition & 0 deletions app/upgrades/v2.1/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package v2_1

import (
"context"

upgradetypes "cosmossdk.io/x/upgrade/types"
"github.com/OmniFlix/omniflixhub/v5/app/keepers"
"github.com/OmniFlix/omniflixhub/v5/app/upgrades"
Expand Down
1 change: 1 addition & 0 deletions app/upgrades/v2/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package v2

import (
"context"

sdkmath "cosmossdk.io/math"
upgradetypes "cosmossdk.io/x/upgrade/types"
"github.com/OmniFlix/omniflixhub/v5/app/keepers"
Expand Down
1 change: 1 addition & 0 deletions app/upgrades/v3/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package v3

import (
"context"

upgradetypes "cosmossdk.io/x/upgrade/types"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/OmniFlix/omniflixhub/v5/app/keepers"
Expand Down
1 change: 1 addition & 0 deletions app/upgrades/v4/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package v4

import (
"context"

upgradetypes "cosmossdk.io/x/upgrade/types"
"github.com/OmniFlix/omniflixhub/v5/app/keepers"
"github.com/OmniFlix/omniflixhub/v5/app/upgrades"
Expand Down
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,24 @@ require (
cosmossdk.io/x/evidence v0.1.0
cosmossdk.io/x/feegrant v0.1.0
cosmossdk.io/x/nft v0.1.1
cosmossdk.io/x/tx v0.13.3
cosmossdk.io/x/upgrade v0.1.1
github.com/CosmWasm/wasmd v0.51.0
github.com/CosmWasm/wasmvm v1.5.2
github.com/CosmWasm/wasmvm/v2 v2.0.1
github.com/OmniFlix/streampay/v2 v2.4.2-0.20240709201324-767b263c3aa0
github.com/bianjieai/nft-transfer v1.1.3-ibc-v7.3.0.0.20240604024247-74d40a1974c2
github.com/cometbft/cometbft v0.38.7
github.com/cometbft/cometbft v0.38.9
github.com/cometbft/cometbft-db v0.11.0
github.com/cosmos/cosmos-db v1.0.2
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.50.7
github.com/cosmos/cosmos-sdk v0.50.8
github.com/cosmos/gogoproto v1.5.0
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2
github.com/cosmos/ibc-apps/modules/async-icq/v8 v8.0.0
github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20240530162148-4827cf263165
github.com/cosmos/ibc-go/modules/capability v1.0.0
github.com/cosmos/ibc-go/v8 v8.3.1
github.com/cosmos/ibc-go/v8 v8.4.0
github.com/cosmos/rosetta v0.50.7
github.com/golang/protobuf v1.5.4
github.com/google/uuid v1.6.0
Expand All @@ -47,7 +48,6 @@ require (

require (
cosmossdk.io/collections v0.4.0 // indirect
cosmossdk.io/x/tx v0.13.3 // indirect
github.com/DataDog/datadog-go v3.2.0+incompatible // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
Expand All @@ -65,6 +65,7 @@ require (
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-metrics v0.5.3 // indirect
github.com/hashicorp/go-plugin v1.5.2 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
Expand Down
14 changes: 8 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA=
github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c=
github.com/cometbft/cometbft v0.38.7 h1:ULhIOJ9+LgSy6nLekhq9ae3juX3NnQUMMPyVdhZV6Hk=
github.com/cometbft/cometbft v0.38.7/go.mod h1:HIyf811dFMI73IE0F7RrnY/Fr+d1+HuJAgtkEpQjCMY=
github.com/cometbft/cometbft v0.38.9 h1:cJBJBG0mPKz+sqelCi/hlfZjadZQGdDNnu6YQ1ZsUHQ=
github.com/cometbft/cometbft v0.38.9/go.mod h1:xOoGZrtUT+A5izWfHSJgl0gYZUE7lu7Z2XIS1vWG/QQ=
github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8=
github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc=
github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg=
Expand All @@ -369,8 +369,8 @@ github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAK
github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA=
github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA=
github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec=
github.com/cosmos/cosmos-sdk v0.50.7 h1:LsBGKxifENR/DN4E1RZaitsyL93HU44x0p8EnMHp4V4=
github.com/cosmos/cosmos-sdk v0.50.7/go.mod h1:84xDDJEHttRT7NDGwBaUOLVOMN0JNE9x7NbsYIxXs1s=
github.com/cosmos/cosmos-sdk v0.50.8 h1:2UJHssUaGHTl4/dFp8xyREKAnfiRU6VVfqtKG9n8w5g=
github.com/cosmos/cosmos-sdk v0.50.8/go.mod h1:Zb+DgHtiByNwgj71IlJBXwOq6dLhtyAq3AgqpXm/jHo=
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=
github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE=
Expand All @@ -388,8 +388,8 @@ github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20240530162148-4827cf2631
github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20240530162148-4827cf263165/go.mod h1:9+Z14xz3Y+5uEn5i1CvLcDN1aTthEhYUdI7pphySkY8=
github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE=
github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco=
github.com/cosmos/ibc-go/v8 v8.3.1 h1:cUNWvTCftKQIcpbf2y/jVzo2OY3g4GVFw6tTC/pQ+tA=
github.com/cosmos/ibc-go/v8 v8.3.1/go.mod h1:izwHZvn9lKrBn8xWj0aXWut6HKcwHMPD3uyuvOJoPSA=
github.com/cosmos/ibc-go/v8 v8.4.0 h1:K2PfX0AZ+1XKZytHGEMuSjQXG/MZshPb83RSTQt2+cE=
github.com/cosmos/ibc-go/v8 v8.4.0/go.mod h1:zh6x1osR0hNvEcFrC/lhGD08sMfQmr9wHVvZ/mRWMCs=
github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM=
github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0=
github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo=
Expand Down Expand Up @@ -710,6 +710,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
Expand Down
3 changes: 2 additions & 1 deletion x/alloc/keeper/keeper.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package keeper

import (
sdkmath "cosmossdk.io/math"
"errors"
"fmt"

sdkmath "cosmossdk.io/math"

"cosmossdk.io/log"
storetypes "cosmossdk.io/store/types"
"github.com/OmniFlix/omniflixhub/v5/x/alloc/types"
Expand Down
3 changes: 2 additions & 1 deletion x/alloc/keeper/keeper_test.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package keeper_test

import (
"testing"

sdkmath "cosmossdk.io/math"
"github.com/OmniFlix/omniflixhub/v5/app/apptesting"
"github.com/OmniFlix/omniflixhub/v5/x/alloc/types"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
"github.com/stretchr/testify/suite"
"testing"

"github.com/OmniFlix/omniflixhub/v5/app"
)
Expand Down
3 changes: 2 additions & 1 deletion x/alloc/migrations/v3/migrator_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package v3_test

import (
storetypes "cosmossdk.io/store/types"
"testing"

storetypes "cosmossdk.io/store/types"

"github.com/stretchr/testify/require"

"github.com/OmniFlix/omniflixhub/v5/x/alloc"
Expand Down
3 changes: 2 additions & 1 deletion x/alloc/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package alloc

import (
"context"
"cosmossdk.io/core/appmodule"
"encoding/json"
"fmt"

"cosmossdk.io/core/appmodule"

"github.com/OmniFlix/omniflixhub/v5/x/alloc/exported"

"github.com/gorilla/mux"
Expand Down
1 change: 1 addition & 0 deletions x/alloc/types/expected_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package types

import (
"context"

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

Expand Down
3 changes: 2 additions & 1 deletion x/alloc/types/params_legacy.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package types

import (
sdkmath "cosmossdk.io/math"
"errors"
"fmt"

sdkmath "cosmossdk.io/math"

sdk "github.com/cosmos/cosmos-sdk/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
)
Expand Down
3 changes: 2 additions & 1 deletion x/globalfee/ante/fee.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package ante

import (
sdkmath "cosmossdk.io/math"
"errors"

sdkmath "cosmossdk.io/math"

tmstrings "github.com/cometbft/cometbft/libs/strings"

errorsmod "cosmossdk.io/errors"
Expand Down
3 changes: 2 additions & 1 deletion x/globalfee/ante/fee_utils_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package ante

import (
sdkmath "cosmossdk.io/math"
"testing"

sdkmath "cosmossdk.io/math"

"github.com/stretchr/testify/require"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
3 changes: 2 additions & 1 deletion x/globalfee/genesis_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package globalfee

import (
sdkmath "cosmossdk.io/math"
"testing"
"time"

sdkmath "cosmossdk.io/math"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down
3 changes: 2 additions & 1 deletion x/globalfee/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package keeper_test

Check failure on line 1 in x/globalfee/keeper/grpc_query_test.go

View workflow job for this annotation

GitHub Actions / lint

: # github.com/OmniFlix/omniflixhub/v5/x/globalfee/keeper_test [github.com/OmniFlix/omniflixhub/v5/x/globalfee/keeper.test]

import (
sdkmath "cosmossdk.io/math"
"testing"

sdkmath "cosmossdk.io/math"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down
3 changes: 2 additions & 1 deletion x/globalfee/types/params_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package types

import (
sdkmath "cosmossdk.io/math"
"testing"

sdkmath "cosmossdk.io/math"

"github.com/stretchr/testify/require"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
1 change: 1 addition & 0 deletions x/ics721nft/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package ics721nft

import (
"context"

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

Expand Down
3 changes: 2 additions & 1 deletion x/ics721nft/keeper.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package ics721nft

import (
sdkmath "cosmossdk.io/math"
"errors"

sdkmath "cosmossdk.io/math"

errorsmod "cosmossdk.io/errors"

"cosmossdk.io/log"
Expand Down
3 changes: 2 additions & 1 deletion x/itc/keeper/campaign.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package keeper

import (
sdkmath "cosmossdk.io/math"
"crypto/sha256"
"fmt"

sdkmath "cosmossdk.io/math"

errorsmod "cosmossdk.io/errors"

"github.com/OmniFlix/omniflixhub/v5/x/itc/types"
Expand Down
3 changes: 2 additions & 1 deletion x/itc/keeper/itc.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package keeper

import (
"fmt"

sdkmath "cosmossdk.io/math"
storetypes "cosmossdk.io/store/types"
"fmt"

"cosmossdk.io/store/prefix"
"github.com/OmniFlix/omniflixhub/v5/x/itc/types"
Expand Down
3 changes: 2 additions & 1 deletion x/itc/keeper/keeper_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package keeper_test

import (
sdkmath "cosmossdk.io/math"
"fmt"
"testing"
"time"

sdkmath "cosmossdk.io/math"

onftkeeper "github.com/OmniFlix/omniflixhub/v5/x/onft/keeper"
onfttypes "github.com/OmniFlix/omniflixhub/v5/x/onft/types"

Expand Down
3 changes: 2 additions & 1 deletion x/itc/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package keeper_test

import (
sdkmath "cosmossdk.io/math"
"fmt"
"time"

sdkmath "cosmossdk.io/math"

onfttypes "github.com/OmniFlix/omniflixhub/v5/x/onft/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"

Expand Down
Loading
Loading