Skip to content

Commit

Permalink
chore: bump dependencies (#872)
Browse files Browse the repository at this point in the history
* bump deps

* fix test suite

Co-authored-by: Lucas Bertrand <lucas.bertrand.22@gmail.com>
  • Loading branch information
Alex Johnson and lumtis authored Jun 16, 2022
1 parent 493526b commit f3f4098
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/tendermint/spn
go 1.18

require (
github.com/cosmos/cosmos-sdk v0.45.4
github.com/cosmos/ibc-go/v3 v3.0.0
github.com/cosmos/cosmos-sdk v0.45.5
github.com/cosmos/ibc-go/v3 v3.0.1
github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.5.2
github.com/gorilla/mux v1.8.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44=
github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU=
github.com/cosmos/cosmos-sdk v0.44.2/go.mod h1:fwQJdw+aECatpTvQTo1tSfHEsxACdZYU80QCZUPnHr4=
github.com/cosmos/cosmos-sdk v0.44.3/go.mod h1:bA3+VenaR/l/vDiYzaiwbWvRPWHMBX2jG0ygiFtiBp0=
github.com/cosmos/cosmos-sdk v0.45.4 h1:eStDAhJdMY8n5arbBRe+OwpNeBSunxSBHp1g55ulfdA=
github.com/cosmos/cosmos-sdk v0.45.4/go.mod h1:WOqtDxN3eCCmnYLVla10xG7lEXkFjpTaqm2a2WasgCc=
github.com/cosmos/cosmos-sdk v0.45.5 h1:GVrZM+lss6y626Pq6loxh/3KLRgK/J6/alTkcKkYmGU=
github.com/cosmos/cosmos-sdk v0.45.5/go.mod h1:WOqtDxN3eCCmnYLVla10xG7lEXkFjpTaqm2a2WasgCc=
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=
Expand All @@ -432,8 +432,8 @@ github.com/cosmos/iavl v0.17.1/go.mod h1:7aisPZK8yCpQdy3PMvKeO+bhq1NwDjUwjzxwwRO
github.com/cosmos/iavl v0.17.3 h1:s2N819a2olOmiauVa0WAhoIJq9EhSXE9HDBAoR9k+8Y=
github.com/cosmos/iavl v0.17.3/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w=
github.com/cosmos/ibc-go v1.2.2/go.mod h1:XmYjsRFOs6Q9Cz+CSsX21icNoH27vQKb3squgnCOCbs=
github.com/cosmos/ibc-go/v3 v3.0.0 h1:XUNplHVS51Q2gMnTFsFsH9QJ7flsovMamnltKbEgPQ4=
github.com/cosmos/ibc-go/v3 v3.0.0/go.mod h1:Mb+1NXiPOLd+CPFlOC6BKeAUaxXlhuWenMmRiUiSmwY=
github.com/cosmos/ibc-go/v3 v3.0.1 h1:JMQhAHYt/chIm240kIXeFIJfQr8m6FR3sE/eDqbpxWA=
github.com/cosmos/ibc-go/v3 v3.0.1/go.mod h1:DbOlOa4yKumaHGKApKkJN90L88PCjSD9ZBdAfL9tT40=
github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4=
github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY=
github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI=
Expand Down
23 changes: 22 additions & 1 deletion testutil/keeper/initializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import (
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper"
Expand Down Expand Up @@ -129,6 +131,24 @@ func (i initializer) Capability() *capabilitykeeper.Keeper {
return capabilitykeeper.NewKeeper(i.Codec, storeKey, memStoreKey)
}

// create mock ProtocolVersionSetter for UpgradeKeeper

type ProtocolVersionSetter struct{}

func (vs ProtocolVersionSetter) SetProtocolVersion(uint64) {
return
}

func (i initializer) Upgrade() upgradekeeper.Keeper {
storeKey := sdk.NewKVStoreKey(upgradetypes.StoreKey)
i.StateStore.MountStoreWithDB(storeKey, sdk.StoreTypeIAVL, i.DB)

skipUpgradeHeights := make(map[int64]bool)
vs := ProtocolVersionSetter{}

return upgradekeeper.NewKeeper(skipUpgradeHeights, storeKey, i.Codec, "", vs)
}

func (i initializer) Staking(
authKeeper authkeeper.AccountKeeper,
bankKeeper bankkeeper.Keeper,
Expand All @@ -147,6 +167,7 @@ func (i initializer) IBC(
paramKeeper paramskeeper.Keeper,
stakingKeeper stakingkeeper.Keeper,
capabilityKeeper capabilitykeeper.Keeper,
upgradeKeeper upgradekeeper.Keeper,
) *ibckeeper.Keeper {
storeKey := sdk.NewKVStoreKey(ibchost.StoreKey)

Expand All @@ -157,7 +178,7 @@ func (i initializer) IBC(
storeKey,
paramKeeper.Subspace(ibchost.ModuleName),
stakingKeeper,
nil,
upgradeKeeper,
capabilityKeeper.ScopeToModule(ibchost.ModuleName),
)
}
Expand Down
6 changes: 4 additions & 2 deletions testutil/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ func NewTestSetup(t testing.TB) (sdk.Context, TestKeepers, TestMsgServers) {
bankKeeper := initializer.Bank(paramKeeper, authKeeper)
stakingKeeper := initializer.Staking(authKeeper, bankKeeper, paramKeeper)
distrKeeper := initializer.Distribution(authKeeper, bankKeeper, stakingKeeper, paramKeeper)
ibcKeeper := initializer.IBC(paramKeeper, stakingKeeper, *capabilityKeeper)
upgradeKeeper := initializer.Upgrade()
ibcKeeper := initializer.IBC(paramKeeper, stakingKeeper, *capabilityKeeper, upgradeKeeper)
fundraisingKeeper := initializer.Fundraising(paramKeeper, authKeeper, bankKeeper, distrKeeper)
profileKeeper := initializer.Profile()
launchKeeper := initializer.Launch(profileKeeper, distrKeeper, paramKeeper)
Expand Down Expand Up @@ -178,7 +179,8 @@ func NewTestSetupWithIBCMocks(
bankKeeper := initializer.Bank(paramKeeper, authKeeper)
stakingKeeper := initializer.Staking(authKeeper, bankKeeper, paramKeeper)
distrKeeper := initializer.Distribution(authKeeper, bankKeeper, stakingKeeper, paramKeeper)
ibcKeeper := initializer.IBC(paramKeeper, stakingKeeper, *capabilityKeeper)
upgradeKeeper := initializer.Upgrade()
ibcKeeper := initializer.IBC(paramKeeper, stakingKeeper, *capabilityKeeper, upgradeKeeper)
fundraisingKeeper := initializer.Fundraising(paramKeeper, authKeeper, bankKeeper, distrKeeper)
profileKeeper := initializer.Profile()
launchKeeper := initializer.Launch(profileKeeper, distrKeeper, paramKeeper)
Expand Down
3 changes: 2 additions & 1 deletion testutil/keeper/monitoring_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ func NewTestSetupWithIBCMocksMonitoringp(
bankKeeper := initializer.Bank(paramKeeper, authKeeper)
stakingKeeper := initializer.Staking(authKeeper, bankKeeper, paramKeeper)
distrKeeper := initializer.Distribution(authKeeper, bankKeeper, stakingKeeper, paramKeeper)
ibcKeeper := initializer.IBC(paramKeeper, stakingKeeper, *capabilityKeeper)
upgradeKeeper := initializer.Upgrade()
ibcKeeper := initializer.IBC(paramKeeper, stakingKeeper, *capabilityKeeper, upgradeKeeper)
monitoringProviderKeeper := initializer.Monitoringp(
stakingKeeper,
*ibcKeeper,
Expand Down

0 comments on commit f3f4098

Please sign in to comment.