From 651e26a3fb50958c2bf84a66f3e84458b8335d83 Mon Sep 17 00:00:00 2001 From: hard-nett Date: Wed, 1 Nov 2023 23:26:35 -0400 Subject: [PATCH] gofumpt, lint --- app/keepers/keepers.go | 4 ++-- app/keepers/keys.go | 2 +- app/modules.go | 4 ++-- app/upgrades/v4/headstash-patch.go | 6 +----- app/upgrades/v4/upgrade.go | 4 +--- interchaintest/go.mod | 4 ++-- interchaintest/module_clock_test.go | 2 +- interchaintest/setup.go | 2 +- 8 files changed, 11 insertions(+), 17 deletions(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 9ff987d..a89d132 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -93,8 +93,8 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" denomburn "github.com/terpnetwork/terp-core/v4/x/burn" - // clockkeeper "github.com/terpnetwork/terp-core/v2/x/clock/keeper" - // clocktypes "github.com/terpnetwork/terp-core/v2/x/clock/types" + // clockkeeper "github.com/terpnetwork/terp-core/v4/x/clock/keeper" + // clocktypes "github.com/terpnetwork/terp-core/v4/x/clock/types" feesharekeeper "github.com/terpnetwork/terp-core/v4/x/feeshare/keeper" feesharetypes "github.com/terpnetwork/terp-core/v4/x/feeshare/types" diff --git a/app/keepers/keys.go b/app/keepers/keys.go index f3d13b7..75047a6 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -34,7 +34,7 @@ import ( icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v7/types" ibchookstypes "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - // clocktypes "github.com/terpnetwork/terp-core/v2/x/clock/types" + // clocktypes "github.com/terpnetwork/terp-core/v4/x/clock/types" ) func (appKeepers *AppKeepers) GenerateKeys() { diff --git a/app/modules.go b/app/modules.go index 9aee3bc..d65acca 100644 --- a/app/modules.go +++ b/app/modules.go @@ -20,8 +20,8 @@ import ( ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" - // "github.com/terpnetwork/terp-core/v2/x/clock" - // clocktypes "github.com/terpnetwork/terp-core/v2/x/clock/types" + // "github.com/terpnetwork/terp-core/v4/x/clock" + // clocktypes "github.com/terpnetwork/terp-core/v4/x/clock/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" diff --git a/app/upgrades/v4/headstash-patch.go b/app/upgrades/v4/headstash-patch.go index 2f6db10..6d25a96 100644 --- a/app/upgrades/v4/headstash-patch.go +++ b/app/upgrades/v4/headstash-patch.go @@ -6,7 +6,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" "github.com/terpnetwork/terp-core/v4/app/upgrades" @@ -17,9 +16,7 @@ import ( func returnFundsToCommunityPool( ctx sdk.Context, dk distrkeeper.Keeper, - bk bankkeeper.Keeper, -) error { - +) { headstashes := v3.GetHeadstashPayments() total := int64(0) @@ -50,7 +47,6 @@ func returnFundsToCommunityPool( } total += amount } - return nil } // TODO: handle headstash-patch contract upload & instantiation diff --git a/app/upgrades/v4/upgrade.go b/app/upgrades/v4/upgrade.go index 1eddf66..2de7701 100644 --- a/app/upgrades/v4/upgrade.go +++ b/app/upgrades/v4/upgrade.go @@ -40,9 +40,7 @@ func CreateV4UpgradeHandler( logger.Info(fmt.Sprintf("upgraded global fee params to %s", minGasPrices)) // revert headstash allocation - if err := returnFundsToCommunityPool(ctx, keepers.DistrKeeper, keepers.BankKeeper); err != nil { - return nil, err - } + returnFundsToCommunityPool(ctx, keepers.DistrKeeper) // print the burn module address burnModule := keepers.AccountKeeper.GetModuleAddress(burn.ModuleName) diff --git a/interchaintest/go.mod b/interchaintest/go.mod index a606f05..400df6a 100644 --- a/interchaintest/go.mod +++ b/interchaintest/go.mod @@ -10,7 +10,7 @@ replace ( github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.22.2 //indirect github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 // For this nested module, you always want to replace the parent reference with the current worktree. - github.com/terpnetwork/terp-core/v2 => ../ + github.com/terpnetwork/terp-core/v4 => ../ github.com/vedhavyas/go-subkey => github.com/strangelove-ventures/go-subkey v1.0.7 ) @@ -23,7 +23,7 @@ require ( github.com/docker/docker v24.0.4+incompatible github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230721183422-fb937bb0e165 github.com/stretchr/testify v1.8.4 - github.com/terpnetwork/terp-core/v2 v2.0.0-00010101000000-000000000000 + github.com/terpnetwork/terp-core/v4 v4.0.0-00010101000000-000000000000 go.uber.org/zap v1.24.0 ) diff --git a/interchaintest/module_clock_test.go b/interchaintest/module_clock_test.go index f0b97cf..1b2e566 100644 --- a/interchaintest/module_clock_test.go +++ b/interchaintest/module_clock_test.go @@ -11,7 +11,7 @@ package interchaintest // "github.com/strangelove-ventures/interchaintest/v7/ibc" // "github.com/strangelove-ventures/interchaintest/v7/testutil" // "github.com/stretchr/testify/require" -// clocktypes "github.com/terpnetwork/terp-core/v2/x/clock/types" +// clocktypes "github.com/terpnetwork/terp-core/v4/x/clock/types" // helpers "github.com/terpnetwork/terp-core/tests/interchaintest/helpers" // ) diff --git a/interchaintest/setup.go b/interchaintest/setup.go index 486caa3..ea479a8 100644 --- a/interchaintest/setup.go +++ b/interchaintest/setup.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" - // clocktypes "github.com/terpnetwork/terp-core/v2/x/clock/types" + // clocktypes "github.com/terpnetwork/terp-core/v4/x/clock/types" feesharetypes "github.com/terpnetwork/terp-core/v4/x/feeshare/types" tokenfactorytypes "github.com/terpnetwork/terp-core/v4/x/tokenfactory/types"