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

Release/v1.1.7 #44

Merged
merged 3 commits into from
Jun 3, 2024
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
3 changes: 2 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ import (

"github.com/onomyprotocol/onex/app/upgrades"
v1_1_6 "github.com/onomyprotocol/onex/app/upgrades/v1.1.6"
v1_1_7 "github.com/onomyprotocol/onex/app/upgrades/v1.1.7"
)

const (
Expand All @@ -128,7 +129,7 @@ const (
)

var (
Upgrades = []upgrades.Upgrade{}
Upgrades = []upgrades.Upgrade{v1_1_7.Upgrade}
Forks = []upgrades.Fork{v1_1_6.Fork}

// DefaultNodeHome default home directories for the application daemon
Expand Down
15 changes: 15 additions & 0 deletions app/upgrades/v1.1.7/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package v1_1_7

import (
"github.com/onomyprotocol/onex/app/upgrades"
)

const (
// UpgradeName defines the on-chain upgrades name.
UpgradeName = "v1.1.7"
)

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
}
42 changes: 42 additions & 0 deletions app/upgrades/v1.1.7/upgrade.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Package v1_1_7 is contains chain upgrade of the corresponding version.
package v1_1_7 //nolint:revive,stylecheck // app version

import (
"github.com/onomyprotocol/onex/app/upgrades"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
markettypes "github.com/pendulum-labs/market/x/market/types"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
keepers *upgrades.UpgradeKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info("Starting module migrations...")

onexAmount, _ := sdk.NewIntFromString("65975935131986921086784")
ibc1Amount, _ := sdk.NewIntFromString("17216827458309103931141")
ibc2Amount, _ := sdk.NewIntFromString("20100000")

onexCoin := sdk.NewCoin("aonex", onexAmount)
ibc1 := sdk.NewCoin("ibc/5BDD8875CC2AF7BC842BE44236ACD576EA4F53C36347F74903B852060D6BF29A", ibc1Amount)
ibc2 := sdk.NewCoin("ibc/CCCBD7307FEB70B0CF7ADF8503F711F6741F41623D25BAD8CB736E03BE384264", ibc2Amount)

returnCoins := sdk.NewCoins(onexCoin, ibc1, ibc2)
returner, _ := sdk.AccAddressFromBech32("onomy1yc0lg97cy5e80jyajtkz0zke2rr4734anugf9g")

keepers.BankKeeper.SendCoinsFromAccountToModule(ctx, returner, markettypes.ModuleName, returnCoins)

vm, err := mm.RunMigrations(ctx, configurator, vm)
if err != nil {
return vm, err
}

ctx.Logger().Info("Upgrade complete")
return vm, err
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -296698,8 +296698,12 @@
"historical_entries": "10000",
"unbonding_period": "1728000s",
"soft_opt_out_threshold": "0.0",
"reward_denoms": [],
"provider_reward_denoms": []
"reward_denoms": [
"aonex"
],
"provider_reward_denoms": [
"anom"
]
},
"provider_client_id": "",
"provider_channel_id": "",
Expand All @@ -296719,7 +296723,7 @@
},
"latest_height": {
"revision_number": "1",
"revision_height": "7163380"
"revision_height": "7521388"
},
"proof_specs": [
{
Expand Down Expand Up @@ -296775,61 +296779,109 @@
"allow_update_after_misbehaviour": true
},
"provider_consensus_state": {
"timestamp": "2024-03-16T17:00:01.554275435Z",
"timestamp": "2024-04-28T17:00:05.727604714Z",
"root": {
"hash": "Qm3scK/xkzZCVKvwZSl8tO0q0kpxWsCryqGhnnCYdME="
"hash": "qzI4Xz9tvkoO5OVvCsM86PqAysXbNr7sEgqZxt/zOZc="
},
"next_validators_hash": "2099AD56C603AF33205698A6A6767CC5E632784EE3B1CCC1CC156C2F0C47D7B8"
"next_validators_hash": "9B81F7ADAB3FD1AD152ED6EC45ACAC3FC15536275E0A1B4C9F896173CF769227"
},
"maturing_packets": [],
"initial_val_set": [
{
"pub_key": {
"ed25519": "48JXsFC0RQgJvP4NzvjFE8puP/tve0sZoH4iE8wb6TU="
"ed25519": "OJQ0oPDfSTWHEiplKTGQm0sjHtsmxkeAuFdGKb55UCQ="
},
"power": "936430"
},
{
"pub_key": {
"ed25519": "ruW1GeY8fy9vEls7WWoZq1kUIsYe9Z/ihK/fZ+I6iKA="
},
"power": "4067080"
},
{
"pub_key": {
"ed25519": "9kkkgSnKrbVNDjE1mBCKT13waXum2aYGX2IzsZl6bec="
},
"power": "3025795"
},
{
"pub_key": {
"ed25519": "T2EJjGcnHmR4HwJe8q16D1REuXtzzHRp9iaDwqYQPeQ="
},
"power": "7217495"
},
{
"pub_key": {
"ed25519": "I2fWbYC5Rq2dFKhw139gNuxLUzukRqhgkvE9WgE2oP0="
},
"power": "3155793"
},
{
"pub_key": {
"ed25519": "HkUDqNrZGrRGgGwOsszEmD9iwIsZCY6UwJIxKI6ycns="
},
"power": "5708292"
},
{
"pub_key": {
"ed25519": "i2WvfyngSCLMtr4vesVo/9s4lAKMAfv8hSmOHBIMRY8="
},
"power": "7219284"
},
{
"pub_key": {
"ed25519": "pfCvKs6uy+5BRC9gP2/Yjk8Altg+MsjZVt/4axNPkHk="
},
"power": "4710540"
},
{
"pub_key": {
"ed25519": "5X/Z7V5a2SOp3ntPlsd9On5MO/FgPBoFIg8cG2BV9XM="
},
"power": "527942"
"power": "1786483"
},
{
"pub_key": {
"ed25519": "LKwKvQPVTwxwW4UDpyIvGW8Sa9sUdaxhhhVdOigrEyA="
"ed25519": "OiLUo1dx20YIY+Gg14ObrA8bQo+JO+8qD+x5owdxXJc="
},
"power": "466262"
"power": "6335088"
},
{
"pub_key": {
"ed25519": "E/iqQSF00fEWivlvbYEcVRSBL0XzqQ7q7HC+nH9UUo8="
"ed25519": "3pmIWEJyXjVcprSaQsIY5pVrUMbpFSPpedu0SxrVFoY="
},
"power": "653925"
"power": "379964"
},
{
"pub_key": {
"ed25519": "Gyqukm/oZ3Vx3O/OcU/QZoUNtgKjxXO+tqy5ZzvhY10="
"ed25519": "4fcxzdv8gADS7pzeZTGCH7ikQbGxqsJVMsNBR8oaCac="
},
"power": "796155"
"power": "4533842"
},
{
"pub_key": {
"ed25519": "iLKoAUu0/woUEAFUAlZ6t5/Eyg4nj2w0LBErUlpj9gI="
"ed25519": "82TrqvWuxMI/CJlYS503LYOhSnDYxLBSW1x3KbZ2cn8="
},
"power": "260493"
"power": "6558620"
},
{
"pub_key": {
"ed25519": "lZjOSHvpbIvv1tfakopelLFTop8avnEb0V15ywXAD7k="
"ed25519": "YaIOqk7+3KMAuYEqVDnYedtZuv1/Y+7gjWRSjTR5mbc="
},
"power": "483534"
"power": "5935290"
},
{
"pub_key": {
"ed25519": "oAgD36Wrf669dsNfjYKHskr0xRYxoI3/8jDJujrz4gs="
"ed25519": "FMH8Yeyxg2U9hfVBa1JP0GtrOnZES/ZCtT8OU86kAM0="
},
"power": "711346"
"power": "4064104"
},
{
"pub_key": {
"ed25519": "QM+/TMatIUzOduIsFAS6vglsMy5TEm7v5Zji0MJFRzE="
"ed25519": "FZBAofv/DhiVYE7fh+XGwL3mKq5Excsce27qaK0HesA="
},
"power": "543559"
"power": "7675607"
}
],
"height_to_valset_update_id": [],
Expand Down Expand Up @@ -296994,4 +297046,4 @@
"upgrade": {},
"vesting": {}
}
}
}
Loading