Skip to content

Commit

Permalink
fix: adjust team accounts (backport #45) (#47)
Browse files Browse the repository at this point in the history
Co-authored-by: John Letey <[email protected]>
  • Loading branch information
mergify[bot] and johnletey authored May 12, 2023
1 parent e8bc062 commit a48a9b6
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

## [Unreleased]

### Bug Fixes

- (`x/team`) [#45](https://github.com/KYVENetwork/chain/pull/45) Adjust vesting schedules of multiple KYVE Core Team members.

### API Breaking

- (`x/bundles`) [#42](https://github.com/KYVENetwork/chain/pull/42) Emit `VoteEvent` after `BundleProposedEvent` when submitting a bundle.
Expand Down
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,7 @@ func NewKYVEApp(
v12.CreateUpgradeHandler(
app.mm,
app.configurator,
app.TeamKeeper,
),
)

Expand Down
26 changes: 26 additions & 0 deletions app/upgrades/v1_2/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,40 @@ package v1_2
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"

// Team
teamKeeper "github.com/KYVENetwork/chain/x/team/keeper"
// Upgrade
upgradeTypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
teamKeeper teamKeeper.Keeper,
) upgradeTypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradeTypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
if ctx.ChainID() == MainnetChainID {
AdjustTeamVesting(ctx, teamKeeper)
}

return mm.RunMigrations(ctx, configurator, vm)
}
}

// AdjustTeamVesting adjusts the commencement (vesting start) and clawback
// (vesting end) dates of multiple members belonging to the KYVE Core Team.
func AdjustTeamVesting(ctx sdk.Context, keeper teamKeeper.Keeper) {
// ----- Account ID = 8 -----
accountEight, _ := keeper.GetTeamVestingAccount(ctx, 8)
accountEight.Commencement = 1614556800 // Mar 1st, 2021.

keeper.SetTeamVestingAccount(ctx, accountEight)

// ----- Account ID = 11 -----
accountEleven, _ := keeper.GetTeamVestingAccount(ctx, 11)
accountEleven.Commencement = 1639094400 // Dec 10th, 2021.
accountEleven.Clawback = 1682899200 // May 1st, 2023.

keeper.SetTeamVestingAccount(ctx, accountEleven)
}

0 comments on commit a48a9b6

Please sign in to comment.