Skip to content

Commit

Permalink
Merge branch 'main' into adam/test
Browse files Browse the repository at this point in the history
  • Loading branch information
toteki committed Jun 30, 2023
2 parents 994d52d + c813da8 commit 85fbc77
Show file tree
Hide file tree
Showing 39 changed files with 399 additions and 1,263 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Features

- [2121](https://github.com/umee-network/umee/pull/2121) Allow `MsgLeveragedLiquidate` to auto-select repay and reward denoms if request fields left blank.
- [2114](https://github.com/umee-network/umee/pull/2114) Add borrow factor to `x/leverage`
- [2102](https://github.com/umee-network/umee/pull/2102) and [2106](https://github.com/umee-network/umee/pull/2106) Add `MsgLeveragedLiquidate` to `x/leverage`
- [2085](https://github.com/umee-network/umee/pull/2085) Add `inspect` query to leverage module, which msut be enabled on a node by running with `-l` liquidator query flag.
- [1952](https://github.com/umee-network/umee/pull/1952) Add `x/incentive` module.
Expand Down
21 changes: 20 additions & 1 deletion app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,29 @@ func (app UmeeApp) RegisterUpgradeHandlers(bool) {
app.registerUpgrade4_3(upgradeInfo)
app.registerUpgrade("v4.4", upgradeInfo)
app.registerUpgrade("v5.0", upgradeInfo, ugov.ModuleName, wasm.ModuleName)
app.registerUpgrade("v5.1-alpha1", upgradeInfo, incentive.ModuleName)
app.registerUpgrade5_1(upgradeInfo)
// TODO: set correct 5.1 name and add borrowFactor migration
}

func (app *UmeeApp) registerUpgrade5_1(upgradeInfo upgradetypes.Plan) {
planName := "v5.1"
app.UpgradeKeeper.SetUpgradeHandler(planName,
func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
app.storeUpgrade(planName, upgradeInfo, storetypes.StoreUpgrades{
Added: []string{incentive.ModuleName},
})

// TODO: set the correct drain account. This will panic if executed.
if err := app.GravityKeeper.MigrateFundsToDrainAccount(
ctx,
sdk.MustAccAddressFromBech32("the_drain_account"),
); err != nil {
return nil, err
}
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
})
}

// performs upgrade from v4.2 to v4.3
func (app *UmeeApp) registerUpgrade4_3(upgradeInfo upgradetypes.Plan) {
const planName = "v4.3"
Expand Down
9 changes: 2 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ require (
github.com/cosmos/cosmos-sdk v0.46.13
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/ibc-go/v6 v6.2.0
github.com/ethereum/go-ethereum v1.12.0
github.com/gogo/protobuf v1.3.3
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.3
Expand Down Expand Up @@ -119,6 +118,7 @@ require (
github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac // indirect
github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
github.com/esimonov/ifshort v1.0.4 // indirect
github.com/ethereum/go-ethereum v1.12.0 // indirect
github.com/ettle/strcase v0.1.1 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/fatih/structtag v1.2.0 // indirect
Expand All @@ -131,7 +131,6 @@ require (
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/go-toolsmith/astcast v1.1.0 // indirect
github.com/go-toolsmith/astcopy v1.1.0 // indirect
Expand Down Expand Up @@ -264,7 +263,6 @@ require (
github.com/sashamelentyev/usestdlibvars v1.23.0 // indirect
github.com/securego/gosec/v2 v2.16.0 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sivchari/containedctx v1.0.3 // indirect
github.com/sivchari/nosnakecase v1.7.0 // indirect
Expand All @@ -287,8 +285,6 @@ require (
github.com/tidwall/btree v1.5.0 // indirect
github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect
github.com/timonwong/loggercheck v0.9.4 // indirect
github.com/tklauser/go-sysconf v0.3.11 // indirect
github.com/tklauser/numcpus v0.6.0 // indirect
github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect
github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
Expand Down Expand Up @@ -327,7 +323,6 @@ require (
google.golang.org/api v0.122.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
honnef.co/go/tools v0.4.3 // indirect
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect
Expand All @@ -339,7 +334,7 @@ require (

replace (
github.com/CosmWasm/wasmd => github.com/notional-labs/wasmd v0.31.0-umee.46
github.com/Gravity-Bridge/Gravity-Bridge/module => github.com/umee-network/Gravity-Bridge/module v1.5.3-umee-9
github.com/Gravity-Bridge/Gravity-Bridge/module => github.com/umee-network/Gravity-Bridge/module v1.5.3-umee-10
github.com/cosmos/cosmos-sdk => github.com/umee-network/cosmos-sdk v0.46.13-umee
// dgrijalva/jwt-go is deprecated and doesn't receive security updates.
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
Expand Down
Loading

0 comments on commit 85fbc77

Please sign in to comment.