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

feat: add upgrade handler v2.2.0 #128

Merged
merged 34 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
798423e
chore: add upgrade handler `v2.2.0`
atheeshp Oct 4, 2023
20b8030
fix claim records
atheeshp Oct 4, 2023
b6808a1
update time
atheeshp Oct 4, 2023
a2d100a
fix panic
atheeshp Oct 4, 2023
381cd02
changes
atheeshp Oct 10, 2023
36e0752
add claim records from snapshots
atheeshp Oct 11, 2023
1f2a7cf
suggestions
atheeshp Oct 11, 2023
57123a1
review changes
atheeshp Oct 13, 2023
b4b5d2f
review changes
atheeshp Oct 13, 2023
c5fa842
Update app/upgrades/v2.2.0/upgrade.go
anilcse Oct 13, 2023
d8ae284
fix amount sim bug
atheeshp Oct 13, 2023
5963bc3
Merge branch 'ap/add-claim-records' of github.com:atheeshp/Passage3D …
atheeshp Oct 13, 2023
423e361
add logs
atheeshp Oct 13, 2023
c945c8f
log
atheeshp Oct 13, 2023
4063187
log
atheeshp Oct 13, 2023
63d2d90
Fix airdrop amounts
Oct 13, 2023
3b20c23
Merge branch 'main' of github.com:envadiv/Passage3D into ap/add-claim…
atheeshp Oct 13, 2023
8b89821
fix build
atheeshp Oct 13, 2023
02c6826
fix
atheeshp Oct 13, 2023
fe6ca7f
review changes
atheeshp Oct 13, 2023
3bcaf02
Update x/claim/keeper/claim.go
anilcse Oct 13, 2023
935c0f7
test calc
Oct 13, 2023
1b40e18
small fix
Oct 13, 2023
38fe83d
another handle
Oct 13, 2023
056867f
handle more coin errors
Oct 13, 2023
864a00a
revert
Oct 13, 2023
e3fb43d
add snapshot1 data directly
Oct 13, 2023
92d599f
update data
Oct 13, 2023
d2ae4f1
sub original claim allocation
Oct 13, 2023
3d41748
review changes
atheeshp Oct 16, 2023
25af78a
Update app/upgrades/v2.2.0/upgrade.go
atheeshp Oct 16, 2023
f94356b
Merge branch 'main' into ap/add-claim-records
anilcse Oct 16, 2023
1bc0342
Merge branch 'main' into ap/add-claim-records
anilcse Oct 16, 2023
1337ea1
update go.mod
Oct 16, 2023
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
9 changes: 5 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

appparams "github.com/envadiv/Passage3D/app/params"
"github.com/envadiv/Passage3D/app/upgrades"
v1 "github.com/envadiv/Passage3D/app/upgrades/v1"
"github.com/envadiv/Passage3D/app/upgrades/v2.2.0"

"github.com/envadiv/Passage3D/x/claim"

Expand Down Expand Up @@ -189,7 +189,7 @@ var (
wasm.ModuleName: {authtypes.Burner},
}

Upgrades = []upgrades.Upgrade{v1.Upgrade}
Upgrades = []upgrades.Upgrade{v2.Upgrade}
)

var (
Expand Down Expand Up @@ -639,10 +639,10 @@ func NewPassageApp(
// Register snapshot extensions to enable state-sync for wasm.
if manager := app.SnapshotManager(); manager != nil {
err = manager.RegisterExtensions(
wasmkeeper.NewWasmSnapshotter(app.CommitMultiStore(), &app.WasmKeeper),
wasmkeeper.NewWasmSnapshotter(app.CommitMultiStore(), &app.WasmKeeper),
)
if err != nil {
panic("failed to register snapshot extension: " + err.Error())
panic("failed to register snapshot extension: " + err.Error())
}
}

Expand All @@ -665,6 +665,7 @@ func (app *PassageApp) setupUpgradeHandlers() {
app.DistrKeeper,
app.BankKeeper,
app.AccountKeeper,
app.ClaimKeeper,
),
)
}
Expand Down
3 changes: 2 additions & 1 deletion app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
bank "github.com/cosmos/cosmos-sdk/x/bank/keeper"
distribution "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
claim "github.com/envadiv/Passage3D/x/claim/keeper"
)

// Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal
Expand All @@ -18,7 +19,7 @@ type Upgrade struct {
UpgradeName string

// CreateUpgradeHandler defines the function that creates an upgrade handler
CreateUpgradeHandler func(*module.Manager, module.Configurator, distribution.Keeper, bank.Keeper, auth.AccountKeeper) upgradetypes.UpgradeHandler
CreateUpgradeHandler func(*module.Manager, module.Configurator, distribution.Keeper, bank.Keeper, auth.AccountKeeper, claim.Keeper) upgradetypes.UpgradeHandler

// Store upgrades, should be used for any new modules introduced, new modules deleted, or store names renamed.
StoreUpgrades store.StoreUpgrades
Expand Down
Loading
Loading