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: added pob queries to swagger and init module with default params #175

Merged
merged 2 commits into from
Sep 19, 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
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,7 @@ func (app *TerraApp) RegisterUpgradeHandlers(cfg module.Configurator) {
app.ParamsKeeper,
app.ConsensusParamsKeeper,
app.ICAControllerKeeper,
app.BuilderKeeper,
),
)
}
Expand Down
21 changes: 20 additions & 1 deletion app/upgrades/v2.5/upgrade.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package v2_5

import (
pobkeeper "github.com/skip-mev/pob/x/builder/keeper"
pobtypes "github.com/skip-mev/pob/x/builder/types"
"time"

sdkerrors "cosmossdk.io/errors"
Expand Down Expand Up @@ -28,6 +30,7 @@ func CreateUpgradeHandler(
paramsKeeper paramskeeper.Keeper,
consensusParamsKeeper consensuskeeper.Keeper,
icacontrollerKeeper icacontrollerkeeper.Keeper,
pobKeeper pobkeeper.Keeper,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
// READ: https://github.com/cosmos/cosmos-sdk/blob/v0.47.4/UPGRADING.md#xconsensus
Expand All @@ -52,8 +55,24 @@ func CreateUpgradeHandler(

// READ: https://github.com/terra-money/core/issues/166
icacontrollerKeeper.SetParams(ctx, icacontrollertypes.DefaultParams())
vm, err := mm.RunMigrations(ctx, cfg, fromVM)
if err != nil {
return nil, err
}

return mm.RunMigrations(ctx, cfg, fromVM)
// Setting pob params to disable by default until a proposal is passed to enable it
err = pobKeeper.SetParams(ctx, pobtypes.Params{
MaxBundleSize: 0,
EscrowAccountAddress: pobtypes.DefaultEscrowAccountAddress,
ReserveFee: sdk.NewCoin("uluna", sdk.NewInt(1)),
MinBidIncrement: sdk.NewCoin("uluna", sdk.NewInt(1)),
FrontRunningProtection: pobtypes.DefaultFrontRunningProtection,
ProposerFee: pobtypes.DefaultProposerFee,
})
if err != nil {
return nil, err
}
return vm, nil
}
}

Expand Down
10 changes: 9 additions & 1 deletion client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"apis": [
{
"url": "./tmp-swagger-gen/alliance/query.swagger.json",
"url": "./tmp-swagger-gen/alliance/alliance/query.swagger.json",
"operationIds": {
"rename": {
"Params": "AllianceParams"
Expand Down Expand Up @@ -236,6 +236,14 @@
"Params": "IBCRouterParams"
}
}
},
{
"url": "./tmp-swagger-gen/pob/builder/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "PobParams"
}
}
}
]
}
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading
Loading