Skip to content

Commit

Permalink
Merge branch 'blv/gov' into blv-labs/optimize-calculation-deposit-gov…
Browse files Browse the repository at this point in the history
…-v8.4
  • Loading branch information
TuSoict authored Dec 8, 2024
2 parents 50770a2 + 85514a5 commit d77ea7a
Show file tree
Hide file tree
Showing 9 changed files with 575 additions and 327 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ gen-swagger-docs:
bash scripts/protoc-swagger-gen.sh

update-swagger-docs: statik
$(BINDIR)/statik -src=client/docs/swagger-ui -dest=client/docs -f -m
$(BINDIR)/statik -src=client/docs/swagger-ui -dest=client/docs -f -m -ns terrad
@if [ -n "$(git status --porcelain)" ]; then \
echo "Swagger docs are out of sync!";\
exit 1;\
Expand Down
5 changes: 2 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ var (
v8_1.Upgrade,
v8_2.Upgrade,
v8_3.Upgrade,
v10_2.Upgrade,
v10.Upgrade,
v10_2.Upgrade,
}

// Forks defines forks to be applied to the network
Expand Down Expand Up @@ -432,11 +432,10 @@ func (app *TerraApp) RegisterNodeService(clientCtx client.Context) {

// RegisterSwaggerAPI registers swagger route with API Server
func RegisterSwaggerAPI(rtr *mux.Router) {
statikFS, err := fs.New()
statikFS, err := fs.NewWithNamespace("terrad")
if err != nil {
panic(err)
}

staticServer := http.FileServer(statikFS)
rtr.PathPrefix("/swagger/").Handler(http.StripPrefix("/swagger/", staticServer))
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package v10
//nolint:revive
package v10_1

import (
"github.com/classic-terra/core/v3/app/upgrades"
Expand All @@ -7,11 +8,11 @@ import (
tax2gastypes "github.com/classic-terra/core/v3/x/tax/types"
)

const UpgradeName = "v10"
const UpgradeName = "v10_1"

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateV10UpgradeHandler,
CreateUpgradeHandler: CreateV101UpgradeHandler,
StoreUpgrades: store.StoreUpgrades{
Added: []string{
tax2gastypes.ModuleName,
Expand Down
10 changes: 7 additions & 3 deletions app/upgrades/v10/upgrades.go → app/upgrades/v10_1/upgrades.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package v10
//nolint:revive
package v10_1

import (
"github.com/classic-terra/core/v3/app/keepers"
Expand All @@ -9,15 +10,18 @@ import (
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func CreateV10UpgradeHandler(
func CreateV101UpgradeHandler(
mm *module.Manager,
cfg module.Configurator,
_ upgrades.BaseAppParamManager,
keepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
// set default oracle split
keepers.TreasuryKeeper.SetTaxRate(ctx, sdk.ZeroDec())
params := keepers.TreasuryKeeper.GetParams(ctx)
params.TaxPolicy.RateMax = sdk.ZeroDec()
params.TaxPolicy.RateMin = sdk.ZeroDec()
keepers.TreasuryKeeper.SetParams(ctx, params)

tax2gasParams := taxtypes.DefaultParams()
keepers.TaxKeeper.SetParams(ctx, tax2gasParams)
Expand Down
9 changes: 6 additions & 3 deletions client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading

0 comments on commit d77ea7a

Please sign in to comment.