From 594a817aeb1501b69a08494e1e5d024576699fc4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 09:55:58 +0530 Subject: [PATCH 1/3] build(deps): Bump tj-actions/changed-files from 43 to 44 (#2476) Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 43 to 44. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](https://github.com/tj-actions/changed-files/compare/v43...v44) --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3685f4f01d..05cd5c88ea 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,7 +40,7 @@ jobs: with: fetch-depth: 0 # lint only changed files - - uses: tj-actions/changed-files@v43 + - uses: tj-actions/changed-files@v44 id: changed-files with: files: "**/*.md" From 920b37989bfa73ecbceceb7ec836ebb161411853 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 04:26:35 +0000 Subject: [PATCH 2/3] build(deps): Bump codecov/codecov-action from 4.1.0 to 4.1.1 (#2477) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f3dcc810cc..7f05aec87b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -84,7 +84,7 @@ jobs: if: env.GIT_DIFF run: | EXPERIMENTAL=true make test-unit-cover - - uses: codecov/codecov-action@v4.1.0 + - uses: codecov/codecov-action@v4.1.1 if: env.GIT_DIFF with: token: ${{ secrets.CODECOV_TOKEN }} From 1be3ed57524ef1e8b8dae8325d843cca36df73ec Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 28 Mar 2024 06:44:15 +0100 Subject: [PATCH 3/3] chore(coin): update u/umee sample coin names (#2478) --- util/coin/fixtures.go | 8 ++++++-- x/incentive/genesis_test.go | 32 ++++++++++++++++---------------- x/incentive/msgs_test.go | 2 +- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/util/coin/fixtures.go b/util/coin/fixtures.go index ac02855dff..374adba363 100644 --- a/util/coin/fixtures.go +++ b/util/coin/fixtures.go @@ -9,15 +9,17 @@ import ( const umee = appparams.BondDenom // common coins used in tests +// +//revive:disable:var-naming var ( // the uToken denom "u/uumee" - UumeeDenom = ToUTokenDenom(umee) + U_umee = ToUTokenDenom(umee) //nolint:stylecheck // 1uumee Coin Umee1 = New(umee, 1) // 10_000uumee Coin Umee10k = New(umee, 10_000) // 1u/uumee Coin - UUmee1 = Utoken(umee, 1) + U_umee1 = Utoken(umee, 1) //nolint:stylecheck // Xuumee DecCoin Umee0dec = DecF(umee, 0) @@ -37,6 +39,8 @@ var ( Dollar = "dollar" ) +//revive:enable:var-naming + // UmeeCoins creates an Umee (uumee) sdk.Coins with given amount func UmeeCoins(amount int64) sdk.Coins { return sdk.NewCoins(sdk.NewInt64Coin(umee, amount)) diff --git a/x/incentive/genesis_test.go b/x/incentive/genesis_test.go index 1e568cd9dc..3f44e0c3f9 100644 --- a/x/incentive/genesis_test.go +++ b/x/incentive/genesis_test.go @@ -38,7 +38,7 @@ func TestValidateGenesis(t *testing.T) { rt := RewardTracker{ Account: validAddr, - UToken: coin.UumeeDenom, + UToken: coin.U_umee, Rewards: sdk.NewDecCoins(), } duplicateRewardTracker := DefaultGenesis() @@ -50,7 +50,7 @@ func TestValidateGenesis(t *testing.T) { assert.ErrorContains(t, invalidRewardAccumulator.Validate(), "invalid denom") ra := RewardAccumulator{ - UToken: coin.UumeeDenom, + UToken: coin.U_umee, Rewards: sdk.NewDecCoins(), } duplicateRewardAccumulator := DefaultGenesis() @@ -58,7 +58,7 @@ func TestValidateGenesis(t *testing.T) { assert.ErrorContains(t, duplicateRewardAccumulator.Validate(), "duplicate reward accumulators") invalidProgram := IncentiveProgram{} - validProgram := NewIncentiveProgram(1, 1, 1, coin.UumeeDenom, coin.Umee1, coin.Zero(uumee), false) + validProgram := NewIncentiveProgram(1, 1, 1, coin.U_umee, coin.Umee1, coin.Zero(uumee), false) invalidUpcomingProgram := DefaultGenesis() invalidUpcomingProgram.UpcomingPrograms = []IncentiveProgram{invalidProgram} @@ -92,7 +92,7 @@ func TestValidateGenesis(t *testing.T) { b := Bond{ Account: validAddr, - UToken: sdk.NewInt64Coin(coin.UumeeDenom, 1), + UToken: sdk.NewInt64Coin(coin.U_umee, 1), } duplicateBond := DefaultGenesis() @@ -105,7 +105,7 @@ func TestValidateGenesis(t *testing.T) { au := AccountUnbondings{ Account: validAddr, - UToken: coin.UumeeDenom, + UToken: coin.U_umee, Unbondings: []Unbonding{}, } duplicateAccountUnbonding := DefaultGenesis() @@ -116,7 +116,7 @@ func TestValidateGenesis(t *testing.T) { func TestValidateIncentiveProgram(t *testing.T) { t.Parallel() - validProgram := NewIncentiveProgram(1, 1, 1, coin.UumeeDenom, coin.Umee1, coin.Zero(uumee), false) + validProgram := NewIncentiveProgram(1, 1, 1, coin.U_umee, coin.Umee1, coin.Zero(uumee), false) assert.NilError(t, validProgram.Validate()) invalidUToken := validProgram @@ -130,7 +130,7 @@ func TestValidateIncentiveProgram(t *testing.T) { invalidTotalRewards.TotalRewards = sdk.Coin{} assert.ErrorContains(t, invalidTotalRewards.Validate(), "invalid denom") - invalidTotalRewards.TotalRewards = coin.New(coin.UumeeDenom, 100) + invalidTotalRewards.TotalRewards = coin.New(coin.U_umee, 100) assert.ErrorIs(t, invalidTotalRewards.Validate(), leveragetypes.ErrUToken) invalidTotalRewards.TotalRewards = coin.Zero(uumee) @@ -181,7 +181,7 @@ func TestValidateIncentiveProgram(t *testing.T) { func TestValidateStructs(t *testing.T) { validAddr := "umee1s84d29zk3k20xk9f0hvczkax90l9t94g72n6wm" - validBond := NewBond(validAddr, coin.New(coin.UumeeDenom, 1)) + validBond := NewBond(validAddr, coin.New(coin.U_umee, 1)) assert.NilError(t, validBond.Validate()) invalidBond := validBond @@ -196,7 +196,7 @@ func TestValidateStructs(t *testing.T) { invalidBond.UToken.Denom = uumee assert.ErrorIs(t, invalidBond.Validate(), leveragetypes.ErrNotUToken) - validTracker := NewRewardTracker(validAddr, coin.UumeeDenom, sdk.NewDecCoins( + validTracker := NewRewardTracker(validAddr, coin.U_umee, sdk.NewDecCoins( sdk.NewDecCoin(uumee, sdk.OneInt()), )) assert.NilError(t, validTracker.Validate()) @@ -217,10 +217,10 @@ func TestValidateStructs(t *testing.T) { assert.ErrorContains(t, invalidTracker.Validate(), "invalid denom") invalidTracker = validTracker - invalidTracker.Rewards[0].Denom = coin.UumeeDenom + invalidTracker.Rewards[0].Denom = coin.U_umee assert.ErrorIs(t, invalidTracker.Validate(), leveragetypes.ErrUToken) - validAccumulator := NewRewardAccumulator(coin.UumeeDenom, 6, sdk.NewDecCoins( + validAccumulator := NewRewardAccumulator(coin.U_umee, 6, sdk.NewDecCoins( sdk.NewDecCoin(uumee, sdk.OneInt()), )) assert.NilError(t, validAccumulator.Validate()) @@ -237,10 +237,10 @@ func TestValidateStructs(t *testing.T) { assert.ErrorContains(t, invalidAccumulator.Validate(), "invalid denom") invalidAccumulator = validAccumulator - invalidAccumulator.Rewards[0].Denom = coin.UumeeDenom + invalidAccumulator.Rewards[0].Denom = coin.U_umee assert.ErrorIs(t, invalidAccumulator.Validate(), leveragetypes.ErrUToken) - validUnbonding := NewUnbonding(1, 1, coin.New(coin.UumeeDenom, 1)) + validUnbonding := NewUnbonding(1, 1, coin.New(coin.U_umee, 1)) assert.NilError(t, validUnbonding.Validate()) invalidUnbonding := validUnbonding @@ -252,10 +252,10 @@ func TestValidateStructs(t *testing.T) { assert.ErrorIs(t, invalidUnbonding.Validate(), leveragetypes.ErrNotUToken) invalidUnbonding = validUnbonding - invalidUnbonding.UToken = sdk.Coin{Denom: coin.UumeeDenom, Amount: sdk.NewInt(-1)} + invalidUnbonding.UToken = sdk.Coin{Denom: coin.U_umee, Amount: sdk.NewInt(-1)} assert.ErrorContains(t, invalidUnbonding.Validate(), "negative coin amount") - validAccountUnbondings := NewAccountUnbondings(validAddr, coin.UumeeDenom, []Unbonding{validUnbonding}) + validAccountUnbondings := NewAccountUnbondings(validAddr, coin.U_umee, []Unbonding{validUnbonding}) assert.NilError(t, validAccountUnbondings.Validate()) invalidAccountUnbondings := validAccountUnbondings @@ -280,6 +280,6 @@ func TestValidateStructs(t *testing.T) { invalidAccountUnbondings.Unbondings[0] = validUnbonding // the value in validAccountUnbondings was modified invalidAccountUnbondings = validAccountUnbondings - invalidAccountUnbondings.Unbondings[0].UToken = sdk.Coin{Denom: coin.UumeeDenom, Amount: sdk.NewInt(-1)} + invalidAccountUnbondings.Unbondings[0].UToken = sdk.Coin{Denom: coin.U_umee, Amount: sdk.NewInt(-1)} assert.ErrorContains(t, invalidAccountUnbondings.Validate(), "negative coin amount") } diff --git a/x/incentive/msgs_test.go b/x/incentive/msgs_test.go index 692d698b53..d059c9d931 100644 --- a/x/incentive/msgs_test.go +++ b/x/incentive/msgs_test.go @@ -20,7 +20,7 @@ const ( var ( testAddr, _ = sdk.AccAddressFromBech32("umee1s84d29zk3k20xk9f0hvczkax90l9t94g72n6wm") - uToken = sdk.NewInt64Coin(coin.UumeeDenom, 10) + uToken = sdk.NewInt64Coin(coin.U_umee, 10) token = sdk.NewInt64Coin(uumee, 10) program = incentive.NewIncentiveProgram(0, 4, 5, uToken.Denom, token, coin.Zero(token.Denom), false) )