Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adjust team accounts #45

Merged
merged 2 commits into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}