Repository: osmosis-labs/osmosis
Pull request #5113 (2023-05-07 21:47:58)

use os.ReadFile instead of ioutil.ReadFile
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰    
v    Before smashing the submit button please review the checkboxes.
v    If a checkbox is n/a - please still include it but + a little note why
v    If your PR doesn't close an issue, that's OK!  Just remove the Closes: #XXX line!
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->


## What is the purpose of the change

Remove ioutil because it is deprecated





## Testing and Verifying



## Documentation and Release Note

  - Does this pull request introduce a new feature or user-facing behavior changes? no
  - Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`? no
  - How is the feature or change documented? not applicable



Patch:
diff --git a/go.mod b/go.mod
index a9479ee91..74afecead 100644
--- a/go.mod
+++ b/go.mod
@@ -241,7 +241,7 @@ require (
 	github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
 	github.com/pmezard/go-difflib v1.0.0 // indirect
 	github.com/polyfloyd/go-errorlint v1.4.0 // indirect
-	github.com/prometheus/client_golang v1.15.0
+	github.com/prometheus/client_golang v1.15.1
 	github.com/prometheus/client_model v0.3.0 // indirect
 	github.com/prometheus/common v0.42.0 // indirect
 	github.com/prometheus/procfs v0.9.0 // indirect
diff --git a/go.sum b/go.sum
index 7c3e0395f..15e1539e6 100644
--- a/go.sum
+++ b/go.sum
@@ -990,8 +990,8 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O
 github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
 github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
 github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
-github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM=
-github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk=
+github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI=
+github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk=
 github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
 github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
 github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=


Test patch:
diff --git a/app/upgrades/v15/upgrade_test.go b/app/upgrades/v15/upgrade_test.go
index bd0370796..0282bafe4 100644
--- a/app/upgrades/v15/upgrade_test.go
+++ b/app/upgrades/v15/upgrade_test.go
@@ -181,7 +181,7 @@ func (suite *UpgradeTestSuite) TestRegisterOsmoIonMetadata() {
 	uosmoMetadata, found := suite.App.BankKeeper.GetDenomMetaData(ctx, "uosmo")
 	suite.Require().False(found)
 
-	uionMetadata, found := suite.App.BankKeeper.GetDenomMetaData(ctx, "uion")
+	_, found = suite.App.BankKeeper.GetDenomMetaData(ctx, "uion")
 	suite.Require().False(found)
 
 	// system under test.
@@ -190,7 +190,7 @@ func (suite *UpgradeTestSuite) TestRegisterOsmoIonMetadata() {
 	uosmoMetadata, found = suite.App.BankKeeper.GetDenomMetaData(ctx, "uosmo")
 	suite.Require().True(found)
 
-	uionMetadata, found = suite.App.BankKeeper.GetDenomMetaData(ctx, "uion")
+	uionMetadata, found := suite.App.BankKeeper.GetDenomMetaData(ctx, "uion")
 	suite.Require().True(found)
 
 	suite.Require().Equal(expectedUosmodenom, uosmoMetadata.Base)
diff --git a/app/upgrades/v16/upgrades_test.go b/app/upgrades/v16/upgrades_test.go
index ac1d41bc8..d77cfadb1 100644
--- a/app/upgrades/v16/upgrades_test.go
+++ b/app/upgrades/v16/upgrades_test.go
@@ -35,7 +35,7 @@ func dummyUpgrade(suite *UpgradeTestSuite) {
 	plan := upgradetypes.Plan{Name: "v16", Height: dummyUpgradeHeight}
 	err := suite.App.UpgradeKeeper.ScheduleUpgrade(suite.Ctx, plan)
 	suite.Require().NoError(err)
-	plan, exists := suite.App.UpgradeKeeper.GetUpgradePlan(suite.Ctx)
+	_, exists := suite.App.UpgradeKeeper.GetUpgradePlan(suite.Ctx)
 	suite.Require().True(exists)
 
 	suite.Ctx = suite.Ctx.WithBlockHeight(dummyUpgradeHeight)
diff --git a/app/upgrades/v4/upgrade_test.go b/app/upgrades/v4/upgrade_test.go
index e35424f68..a8ad0fe0c 100644
--- a/app/upgrades/v4/upgrade_test.go
+++ b/app/upgrades/v4/upgrade_test.go
@@ -66,7 +66,7 @@ func (suite *UpgradeTestSuite) TestUpgradePayments() {
 				plan := upgradetypes.Plan{Name: "v4", Height: dummyUpgradeHeight}
 				err := suite.app.UpgradeKeeper.ScheduleUpgrade(suite.ctx, plan)
 				suite.Require().NoError(err)
-				plan, exists := suite.app.UpgradeKeeper.GetUpgradePlan(suite.ctx)
+				_, exists := suite.app.UpgradeKeeper.GetUpgradePlan(suite.ctx)
 				suite.Require().True(exists)
 
 				suite.ctx = suite.ctx.WithBlockHeight(dummyUpgradeHeight)
diff --git a/app/upgrades/v9/upgrade_test.go b/app/upgrades/v9/upgrade_test.go
index 667d890b6..badf960b2 100644
--- a/app/upgrades/v9/upgrade_test.go
+++ b/app/upgrades/v9/upgrade_test.go
@@ -30,7 +30,7 @@ func (suite *UpgradeTestSuite) TestUpgradePayments() {
 				plan := upgradetypes.Plan{Name: "v9", Height: dummyUpgradeHeight}
 				err := suite.App.UpgradeKeeper.ScheduleUpgrade(suite.Ctx, plan)
 				suite.Require().NoError(err)
-				plan, exists := suite.App.UpgradeKeeper.GetUpgradePlan(suite.Ctx)
+				_, exists := suite.App.UpgradeKeeper.GetUpgradePlan(suite.Ctx)
 				suite.Require().True(exists)
 
 				suite.Ctx = suite.Ctx.WithBlockHeight(dummyUpgradeHeight)
diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go
index d746e39d6..01fa42c6e 100644
--- a/tests/e2e/e2e_test.go
+++ b/tests/e2e/e2e_test.go
@@ -74,7 +74,7 @@ func (s *IntegrationTestSuite) TestProtoRev() {
 	s.Require().Len(hotRoutes, 0)
 
 	// The module should have no trades by default.
-	numTrades, err := chainANode.QueryProtoRevNumberOfTrades()
+	_, err = chainANode.QueryProtoRevNumberOfTrades()
 	s.T().Logf("checking that the protorev module has no trades on init: %s", err)
 	s.Require().Error(err)
 
@@ -140,7 +140,7 @@ func (s *IntegrationTestSuite) TestProtoRev() {
 	s.Require().Equal(supplyBefore, supplyAfter)
 
 	// Check that the number of trades executed by the protorev module is 1.
-	numTrades, err = chainANode.QueryProtoRevNumberOfTrades()
+	numTrades, err := chainANode.QueryProtoRevNumberOfTrades()
 	s.T().Logf("checking that the protorev module has executed 1 trade")
 	s.Require().NoError(err)
 	s.Require().NotNil(numTrades)
@@ -730,7 +730,7 @@ func (s *IntegrationTestSuite) TestConcentratedLiquidity() {
 	}
 
 	// if querying proposal takes longer than timeoutPeriod, stop the goroutine and error
-	timeoutPeriod := time.Duration(2 * time.Minute)
+	timeoutPeriod := 2 * time.Minute
 	select {
 	case <-time.After(timeoutPeriod):
 		err := fmt.Errorf("go routine took longer than %s", timeoutPeriod)
@@ -1438,7 +1438,7 @@ func (s *IntegrationTestSuite) TestExpeditedProposals() {
 	}
 	// if querying proposal takes longer than timeoutPeriod, stop the goroutine and error
 	var elapsed time.Duration
-	timeoutPeriod := time.Duration(2 * time.Minute)
+	timeoutPeriod := 2 * time.Minute
 	select {
 	case elapsed = <-totalTimeChan:
 	case <-time.After(timeoutPeriod):
diff --git a/tests/e2e/helpers_e2e_test.go b/tests/e2e/helpers_e2e_test.go
index 2ab08c8b1..78b37131c 100644
--- a/tests/e2e/helpers_e2e_test.go
+++ b/tests/e2e/helpers_e2e_test.go
@@ -8,9 +8,7 @@ import (
 	"github.com/osmosis-labs/osmosis/v15/x/concentrated-liquidity/types"
 )
 
-var (
-	defaultFeePerTx = sdk.NewInt(1000)
-)
+var defaultFeePerTx = sdk.NewInt(1000)
 
 // calculateFeeGrowthGlobal calculates fee growth global per unit of virtual liquidity based on swap parameters:
 // amountIn - amount being swapped
@@ -84,6 +82,6 @@ func (s *IntegrationTestSuite) updatedPool(node *chain.NodeConfig, poolId uint64
 // Assert returned positions:
 func (s *IntegrationTestSuite) validateCLPosition(position model.Position, poolId uint64, lowerTick, upperTick int64) {
 	s.Require().Equal(position.PoolId, poolId)
-	s.Require().Equal(position.LowerTick, int64(lowerTick))
-	s.Require().Equal(position.UpperTick, int64(upperTick))
+	s.Require().Equal(position.LowerTick, lowerTick)
+	s.Require().Equal(position.UpperTick, upperTick)
 }
diff --git a/x/concentrated-liquidity/fees_test.go b/x/concentrated-liquidity/fees_test.go
index a231238c3..bbb580158 100644
--- a/x/concentrated-liquidity/fees_test.go
+++ b/x/concentrated-liquidity/fees_test.go
@@ -210,7 +210,6 @@ func (s *KeeperTestSuite) TestInitOrUpdateFeeAccumulatorPosition() {
 	for _, tc := range tests {
 		tc := tc
 		s.Run(tc.name, func() {
-
 			// System under test
 			err := clKeeper.InitOrUpdateFeeAccumulatorPosition(s.Ctx, tc.positionFields.poolId, tc.positionFields.lowerTick, tc.positionFields.upperTick, tc.positionFields.positionId, tc.positionFields.liquidity)
 			if tc.expectedPass {
@@ -1188,7 +1187,7 @@ func (s *KeeperTestSuite) TestPrepareClaimableFees() {
 			s.initializeTick(ctx, tc.currentTick, tc.lowerTick, tc.initialLiquidity, tc.lowerTickFeeGrowthOutside, emptyUptimeTrackers, false)
 			s.initializeTick(ctx, tc.currentTick, tc.upperTick, tc.initialLiquidity, tc.upperTickFeeGrowthOutside, emptyUptimeTrackers, true)
 			validPool.SetCurrentTick(sdk.NewInt(tc.currentTick))
-			clKeeper.SetPool(ctx, validPool)
+			_ = clKeeper.SetPool(ctx, validPool)
 
 			err = clKeeper.ChargeFee(ctx, validPoolId, tc.globalFeeGrowth[0])
 			s.Require().NoError(err)
diff --git a/x/concentrated-liquidity/incentives_test.go b/x/concentrated-liquidity/incentives_test.go
index f8916437d..ae7b8d54c 100644
--- a/x/concentrated-liquidity/incentives_test.go
+++ b/x/concentrated-liquidity/incentives_test.go
@@ -372,17 +372,17 @@ func (s *KeeperTestSuite) TestGetUptimeAccumulatorName() {
 		"pool id 1, uptime id 0": {
 			poolId:            defaultPoolId,
 			uptimeIndex:       uint64(0),
-			expectedAccumName: string(types.KeyUptimeAccumulator(1, 0)),
+			expectedAccumName: types.KeyUptimeAccumulator(1, 0),
 		},
 		"pool id 1, uptime id 999": {
 			poolId:            defaultPoolId,
 			uptimeIndex:       uint64(999),
-			expectedAccumName: string(types.KeyUptimeAccumulator(1, 999)),
+			expectedAccumName: types.KeyUptimeAccumulator(1, 999),
 		},
 		"pool id 999, uptime id 1": {
 			poolId:            uint64(999),
 			uptimeIndex:       uint64(1),
-			expectedAccumName: string(types.KeyUptimeAccumulator(999, 1)),
+			expectedAccumName: types.KeyUptimeAccumulator(999, 1),
 		},
 	}
 
@@ -1179,7 +1179,7 @@ func (s *KeeperTestSuite) TestGetInitialUptimeGrowthOutsidesForTick() {
 				uptimeAccum.AddToAccumulator(expectedUptimes.hundredTokensMultiDenom[uptimeId])
 			}
 
-			poolUptimeAccumulators, err = clKeeper.GetUptimeAccumulators(s.Ctx, tc.poolId)
+			_, err = clKeeper.GetUptimeAccumulators(s.Ctx, tc.poolId)
 			s.Require().NoError(err)
 
 			val, err := clKeeper.GetInitialUptimeGrowthOutsidesForTick(s.Ctx, tc.poolId, tc.tick)
@@ -2906,13 +2906,13 @@ func (s *KeeperTestSuite) TestQueryAndCollectIncentives() {
 			// Set up invalid pool ID for error-catching case(s)
 			sutPoolId := validPoolId
 			if tc.isInvalidPoolIdGiven {
-				sutPoolId = sutPoolId + 1
+				sutPoolId = sutPoolId + 1 //nolint:staticcheck,ineffassign
 			}
 
 			// System under test
 			incentivesClaimedQuery, incentivesForfeitedQuery, err := clKeeper.GetClaimableIncentives(ctx, DefaultPositionId)
 
-			poolBalanceAfterCollect := s.App.BankKeeper.GetAllBalances(ctx, validPool.GetAddress())
+			_ = s.App.BankKeeper.GetAllBalances(ctx, validPool.GetAddress())
 			incentivesBalanceAfterCollect := s.App.BankKeeper.GetAllBalances(ctx, validPool.GetIncentivesAddress())
 			ownerBalancerAfterCollect := s.App.BankKeeper.GetAllBalances(ctx, ownerWithValidPosition)
 
@@ -2933,7 +2933,7 @@ func (s *KeeperTestSuite) TestQueryAndCollectIncentives() {
 			s.Require().Equal(incentivesClaimedQuery, actualIncentivesClaimed)
 			s.Require().Equal(incentivesForfeitedQuery, actualIncetivesForfeited)
 
-			poolBalanceAfterCollect = s.App.BankKeeper.GetAllBalances(ctx, validPool.GetAddress())
+			poolBalanceAfterCollect := s.App.BankKeeper.GetAllBalances(ctx, validPool.GetAddress())
 			incentivesBalanceAfterCollect = s.App.BankKeeper.GetAllBalances(ctx, validPool.GetIncentivesAddress())
 			ownerBalancerAfterCollect = s.App.BankKeeper.GetAllBalances(ctx, ownerWithValidPosition)
 
diff --git a/x/concentrated-liquidity/lp_test.go b/x/concentrated-liquidity/lp_test.go
index 442e06dae..ce005107f 100644
--- a/x/concentrated-liquidity/lp_test.go
+++ b/x/concentrated-liquidity/lp_test.go
@@ -539,7 +539,7 @@ func (s *KeeperTestSuite) TestWithdrawPosition() {
 
 			expectedPoolBalanceDelta := expectedFeesClaimed.Add(sdk.NewCoin(ETH, config.amount0Expected.Abs())).Add(sdk.NewCoin(USDC, config.amount1Expected.Abs()))
 
-			withdrawAccount := sdk.AccAddress{}
+			var withdrawAccount sdk.AccAddress
 			if tc.withdrawWithNonOwner {
 				withdrawAccount = nonOwner
 			} else {
diff --git a/x/concentrated-liquidity/position_test.go b/x/concentrated-liquidity/position_test.go
index ad5cc92a2..aa228414c 100644
--- a/x/concentrated-liquidity/position_test.go
+++ b/x/concentrated-liquidity/position_test.go
@@ -207,7 +207,7 @@ func (s *KeeperTestSuite) TestInitOrUpdatePosition() {
 			s.Require().NoError(err)
 
 			// Setup for checks
-			actualUptimeAccumDelta, expectedUptimeAccumValueGrowth, expectedIncentiveRecords, expectedGrowthCurAccum := emptyAccumValues, emptyAccumValues, test.incentiveRecords, sdk.DecCoins{}
+			actualUptimeAccumDelta, expectedUptimeAccumValueGrowth, expectedIncentiveRecords, _ := emptyAccumValues, emptyAccumValues, test.incentiveRecords, sdk.DecCoins{}
 
 			timeElapsedSec := sdk.NewDec(int64(test.timeElapsedSinceInit)).Quo(sdk.NewDec(10e8))
 			positionName := string(types.KeyPositionId(test.param.positionId))
@@ -237,7 +237,7 @@ func (s *KeeperTestSuite) TestInitOrUpdatePosition() {
 					// Track how much the current uptime accum has grown by
 					actualUptimeAccumDelta[uptimeIndex] = newUptimeAccumValues[uptimeIndex].Sub(initUptimeAccumValues[uptimeIndex])
 					if timeElapsedSec.GT(sdk.ZeroDec()) {
-						expectedGrowthCurAccum, expectedIncentiveRecords, err = cl.CalcAccruedIncentivesForAccum(s.Ctx, uptime, test.param.liquidityDelta, timeElapsedSec, expectedIncentiveRecords)
+						expectedGrowthCurAccum, _, err := cl.CalcAccruedIncentivesForAccum(s.Ctx, uptime, test.param.liquidityDelta, timeElapsedSec, expectedIncentiveRecords)
 						s.Require().NoError(err)
 						expectedUptimeAccumValueGrowth[uptimeIndex] = expectedGrowthCurAccum
 					}
@@ -936,7 +936,7 @@ func (s *KeeperTestSuite) TestValidateAndFungifyChargedPositions() {
 				s.Require().Equal(sdk.Coins(nil), forfeitedRewards)
 
 				// Sanity check that cannot claim again.
-				claimedRewards, forfeitedRewards, err = s.App.ConcentratedLiquidityKeeper.ClaimAllIncentivesForPosition(s.Ctx, newPositionId)
+				claimedRewards, _, err = s.App.ConcentratedLiquidityKeeper.ClaimAllIncentivesForPosition(s.Ctx, newPositionId)
 				s.Require().NoError(err)
 
 				s.Require().Equal(sdk.Coins(nil), claimedRewards)
diff --git a/x/gamm/pool-models/balancer/pool_suite_test.go b/x/gamm/pool-models/balancer/pool_suite_test.go
index 13f0ad57c..0bc9051d7 100644
--- a/x/gamm/pool-models/balancer/pool_suite_test.go
+++ b/x/gamm/pool-models/balancer/pool_suite_test.go
@@ -1007,7 +1007,7 @@ func (suite *KeeperTestSuite) TestRandomizedJoinPoolExitPoolInvariants() {
 		denomIn  = "denomIn"
 	)
 
-	now := int64(time.Now().Unix())
+	now := time.Now().Unix()
 	rng := rand.NewSource(now)
 	suite.T().Logf("Using random source of %d\n", now)
 
diff --git a/x/ibc-rate-limit/ibc_middleware_test.go b/x/ibc-rate-limit/ibc_middleware_test.go
index 541e0895c..489b63782 100644
--- a/x/ibc-rate-limit/ibc_middleware_test.go
+++ b/x/ibc-rate-limit/ibc_middleware_test.go
@@ -147,9 +147,9 @@ func (suite *MiddlewareTestSuite) TestInvalidReceiver() {
 		0,
 	)
 	_, ack, _ := suite.FullSendBToA(msg)
-	suite.Require().Contains(string(ack), "error",
+	suite.Require().Contains(ack, "error",
 		"acknowledgment is not an error")
-	suite.Require().Contains(string(ack), fmt.Sprintf("ABCI code: %d", types.ErrBadMessage.ABCICode()),
+	suite.Require().Contains(ack, fmt.Sprintf("ABCI code: %d", types.ErrBadMessage.ABCICode()),
 		"acknowledgment error is not of the right type")
 }
 
@@ -218,12 +218,12 @@ func (suite *MiddlewareTestSuite) AssertReceive(success bool, msg sdk.Msg) (stri
 	_, ack, err := suite.FullSendBToA(msg)
 	if success {
 		suite.Require().NoError(err)
-		suite.Require().NotContains(string(ack), "error",
+		suite.Require().NotContains(ack, "error",
 			"acknowledgment is an error")
 	} else {
-		suite.Require().Contains(string(ack), "error",
+		suite.Require().Contains(ack, "error",
 			"acknowledgment is not an error")
-		suite.Require().Contains(string(ack), fmt.Sprintf("ABCI code: %d", types.ErrRateLimitExceeded.ABCICode()),
+		suite.Require().Contains(ack, fmt.Sprintf("ABCI code: %d", types.ErrRateLimitExceeded.ABCICode()),
 			"acknowledgment error is not of the right type")
 	}
 	return ack, err
diff --git a/x/lockup/keeper/grpc_query_test.go b/x/lockup/keeper/grpc_query_test.go
index 308a1448d..cd84867b1 100644
--- a/x/lockup/keeper/grpc_query_test.go
+++ b/x/lockup/keeper/grpc_query_test.go
@@ -343,7 +343,7 @@ func (suite *KeeperTestSuite) TestLockedByID() {
 	addr1 := sdk.AccAddress([]byte("addr1---------------"))
 
 	// lock by not available id check
-	res, err := suite.querier.LockedByID(sdk.WrapSDKContext(suite.Ctx), &types.LockedRequest{LockId: 0})
+	_, err := suite.querier.LockedByID(sdk.WrapSDKContext(suite.Ctx), &types.LockedRequest{LockId: 0})
 	suite.Require().Error(err)
 
 	// lock coins
@@ -351,7 +351,7 @@ func (suite *KeeperTestSuite) TestLockedByID() {
 	suite.LockTokens(addr1, coins, time.Second)
 
 	// lock by available available id check
-	res, err = suite.querier.LockedByID(sdk.WrapSDKContext(suite.Ctx), &types.LockedRequest{LockId: 1})
+	res, err := suite.querier.LockedByID(sdk.WrapSDKContext(suite.Ctx), &types.LockedRequest{LockId: 1})
 	suite.Require().NoError(err)
 	suite.Require().Equal(res.Lock.ID, uint64(1))
 	suite.Require().Equal(res.Lock.Owner, addr1.String())
@@ -389,11 +389,11 @@ func (suite *KeeperTestSuite) TestAccountLockedLongerDuration() {
 	addr1 := sdk.AccAddress([]byte("addr1---------------"))
 
 	// empty address locks longer than duration check
-	res, err := suite.querier.AccountLockedLongerDuration(sdk.WrapSDKContext(suite.Ctx), &types.AccountLockedLongerDurationRequest{Owner: "", Duration: time.Second})
+	_, err := suite.querier.AccountLockedLongerDuration(sdk.WrapSDKContext(suite.Ctx), &types.AccountLockedLongerDurationRequest{Owner: "", Duration: time.Second})
 	suite.Require().Error(err)
 
 	// initial check
-	res, err = suite.querier.AccountLockedLongerDuration(sdk.WrapSDKContext(suite.Ctx), &types.AccountLockedLongerDurationRequest{Owner: addr1.String(), Duration: time.Second})
+	res, err := suite.querier.AccountLockedLongerDuration(sdk.WrapSDKContext(suite.Ctx), &types.AccountLockedLongerDurationRequest{Owner: addr1.String(), Duration: time.Second})
 	suite.Require().NoError(err)
 	suite.Require().Len(res.Locks, 0)
 
@@ -423,11 +423,11 @@ func (suite *KeeperTestSuite) TestAccountLockedLongerDurationNotUnlockingOnly()
 	addr1 := sdk.AccAddress([]byte("addr1---------------"))
 
 	// empty address locks longer than duration check
-	res, err := suite.querier.AccountLockedLongerDurationNotUnlockingOnly(sdk.WrapSDKContext(suite.Ctx), &types.AccountLockedLongerDurationNotUnlockingOnlyRequest{Owner: "", Duration: time.Second})
+	_, err := suite.querier.AccountLockedLongerDurationNotUnlockingOnly(sdk.WrapSDKContext(suite.Ctx), &types.AccountLockedLongerDurationNotUnlockingOnlyRequest{Owner: "", Duration: time.Second})
 	suite.Require().Error(err)
 
 	// initial check
-	res, err = suite.querier.AccountLockedLongerDurationNotUnlockingOnly(sdk.WrapSDKContext(suite.Ctx), &types.AccountLockedLongerDurationNotUnlockingOnlyRequest{Owner: addr1.String(), Duration: time.Second})
+	res, err := suite.querier.AccountLockedLongerDurationNotUnlockingOnly(sdk.WrapSDKContext(suite.Ctx), &types.AccountLockedLongerDurationNotUnlockingOnlyRequest{Owner: addr1.String(), Duration: time.Second})
 	suite.Require().NoError(err)
 	suite.Require().Len(res.Locks, 0)
 
@@ -453,11 +453,11 @@ func (suite *KeeperTestSuite) TestAccountLockedLongerDurationDenom() {
 	addr1 := sdk.AccAddress([]byte("addr1---------------"))
 
 	// empty address locks longer than duration by denom check
-	res, err := suite.querier.AccountLockedLongerDurationDenom(sdk.WrapSDKContext(suite.Ctx), &types.AccountLockedLongerDurationDenomRequest{Owner: "", Duration: time.Second, Denom: "stake"})
+	_, err := suite.querier.AccountLockedLongerDurationDenom(sdk.WrapSDKContext(suite.Ctx), &types.AccountLockedLongerDurationDenomRequest{Owner: "", Duration: time.Second, Denom: "stake"})
 	suite.Require().Error(err)
 
 	// initial check
-	res, err = suite.querier.AccountLockedLongerDurationDenom(sdk.WrapSDKContext(suite.Ctx), &types.AccountLockedLongerDurationDenomRequest{Owner: addr1.String(), Duration: time.Second, Denom: "stake"})
+	res, err := suite.querier.AccountLockedLongerDurationDenom(sdk.WrapSDKContext(suite.Ctx), &types.AccountLockedLongerDurationDenomRequest{Owner: addr1.String(), Duration: time.Second, Denom: "stake"})
 	suite.Require().NoError(err)
 	suite.Require().Len(res.Locks, 0)
 
diff --git a/x/lockup/keeper/lock_test.go b/x/lockup/keeper/lock_test.go
index 7d923e573..6482f2452 100644
--- a/x/lockup/keeper/lock_test.go
+++ b/x/lockup/keeper/lock_test.go
@@ -235,7 +235,7 @@ func (suite *KeeperTestSuite) TestUnlock() {
 		ctx := suite.Ctx
 
 		addr1 := sdk.AccAddress([]byte("addr1---------------"))
-		lock := types.NewPeriodLock(1, addr1, time.Second, time.Time{}, tc.fundAcc)
+		_ = types.NewPeriodLock(1, addr1, time.Second, time.Time{}, tc.fundAcc)
 
 		// lock with balance
 		suite.FundAcc(addr1, tc.fundAcc)
diff --git a/x/superfluid/keeper/concentrated_liquidity_test.go b/x/superfluid/keeper/concentrated_liquidity_test.go
index 7b459bcf6..933e8a2b5 100644
--- a/x/superfluid/keeper/concentrated_liquidity_test.go
+++ b/x/superfluid/keeper/concentrated_liquidity_test.go
@@ -247,7 +247,7 @@ func (suite *KeeperTestSuite) SetupSuperfluidConcentratedPosition(ctx sdk.Contex
 	}
 
 	// Set up a single validator.
-	valAddr = suite.SetupValidator(stakingtypes.BondStatus(stakingtypes.Bonded))
+	valAddr = suite.SetupValidator(stakingtypes.Bonded)
 
 	// Create a cl pool.
 	clPool := suite.PrepareCustomConcentratedPool(poolCreateAcc, defaultPoolAssets[0].Token.Denom, defaultPoolAssets[1].Token.Denom, 1, sdk.ZeroDec())
diff --git a/x/superfluid/keeper/migrate_test.go b/x/superfluid/keeper/migrate_test.go
index 153d7adf9..15c4592a1 100644
--- a/x/superfluid/keeper/migrate_test.go
+++ b/x/superfluid/keeper/migrate_test.go
@@ -736,7 +736,7 @@ func (suite *KeeperTestSuite) SetupMigrationTest(ctx sdk.Context, superfluidDele
 	}
 
 	// Set up a single validator.
-	valAddr = suite.SetupValidator(stakingtypes.BondStatus(stakingtypes.Bonded))
+	valAddr = suite.SetupValidator(stakingtypes.Bonded)
 
 	// Create a balancer pool of "stake" and "foo".
 	msg := balancer.NewMsgCreateBalancerPool(poolCreateAcc, balancer.PoolParams{
diff --git a/x/superfluid/keeper/unpool_test.go b/x/superfluid/keeper/unpool_test.go
index 601848da8..917d515c2 100644
--- a/x/superfluid/keeper/unpool_test.go
+++ b/x/superfluid/keeper/unpool_test.go
@@ -108,7 +108,7 @@ func (suite *KeeperTestSuite) TestUnpool() {
 			}
 
 			// set up validator
-			valAddr := suite.SetupValidator(stakingtypes.BondStatus(stakingtypes.Bonded))
+			valAddr := suite.SetupValidator(stakingtypes.Bonded)
 
 			// create pool of "stake" and "foo"
 			msg := balancer.NewMsgCreateBalancerPool(poolCreateAcc, balancer.PoolParams{
diff --git a/x/tokenfactory/keeper/admins_test.go b/x/tokenfactory/keeper/admins_test.go
index f638c4765..46f1e4297 100644
--- a/x/tokenfactory/keeper/admins_test.go
+++ b/x/tokenfactory/keeper/admins_test.go
@@ -45,7 +45,6 @@ func (suite *KeeperTestSuite) TestAdminMsgs() {
 
 	// Test burning from own account
 	_, err = suite.msgServer.Burn(sdk.WrapSDKContext(suite.Ctx), types.NewMsgBurn(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 5)))
-	addr0bal -= 5
 	suite.Require().NoError(err)
 	suite.Require().True(bankKeeper.GetBalance(suite.Ctx, suite.TestAccs[1], suite.defaultDenom).Amount.Int64() == addr1bal)
 
diff --git a/x/tokenfactory/keeper/before_send_test.go b/x/tokenfactory/keeper/before_send_test.go
index 66a5c7e51..ca018cba2 100644
--- a/x/tokenfactory/keeper/before_send_test.go
+++ b/x/tokenfactory/keeper/before_send_test.go
@@ -2,7 +2,7 @@ package keeper_test
 
 import (
 	"fmt"
-	"io/ioutil"
+	"os"
 
 	sdk "github.com/cosmos/cosmos-sdk/types"
 
@@ -90,7 +90,7 @@ func (suite *KeeperTestSuite) TestBeforeSendHook() {
 			suite.SetupTest()
 
 			// upload and instantiate wasm code
-			wasmCode, err := ioutil.ReadFile(tc.wasmFile)
+			wasmCode, err := os.ReadFile(tc.wasmFile)
 			suite.Require().NoError(err, "test: %v", tc.desc)
 			codeID, _, err := suite.contractKeeper.Create(suite.Ctx, suite.TestAccs[0], wasmCode, nil)
 			suite.Require().NoError(err, "test: %v", tc.desc)