Skip to content

Commit

Permalink
Revert "remove unnecessary functions"
Browse files Browse the repository at this point in the history
This reverts commit ba155f5.
  • Loading branch information
notJoon committed Jan 6, 2025
1 parent dc3b368 commit 1532290
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gov/governance/fn_registry.gno
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,16 @@ func createParameterHandlers() *ParameterRegistry {
return nil
})

registry.Register(consts.STAKER_PATH, "SetWarmUp", func(params []string) error {
if err := hasDesiredParams(params, 2); err != nil {
return err
}
sr.SetWarmUp(
int64(parseInt(params[0])), // percent
int64(parseInt(params[1])), // block
)
return nil
})

return registry
}
18 changes: 18 additions & 0 deletions staker/manage_pool_tiers.gno
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,24 @@ func RemovePoolTierByAdmin(poolPath string) {
)
}

func RemovePoolTier(poolPath string) {
caller := std.PrevRealm().Addr()
if err := common.GovernanceOnly(caller); err != nil {
panic(err)
}

removePoolTier(poolPath)

prevAddr, prevRealm := getPrev()

std.Emit(
"RemovePoolTier",
"prevAddr", prevAddr,
"prevRealm", prevRealm,
"poolPath", poolPath,
)
}

// removePoolTier removes the pool from poolTiers
//
// Parameters:
Expand Down

0 comments on commit 1532290

Please sign in to comment.