Skip to content

Instantly share code, notes, and snippets.

@thehowl
Created September 16, 2024 17:32
Show Gist options
  • Save thehowl/6ed1050f021c08f61d7767ac73d80fb1 to your computer and use it in GitHub Desktop.
Save thehowl/6ed1050f021c08f61d7767ac73d80fb1 to your computer and use it in GitHub Desktop.
package config // r/sys/config
type Key string
// keep in sync with tm2/pkg/params
// (can be checked with CI)
const (
Validators Key = "validators"
AllowedTokens Key = "allowed_tokens"
)
const EnableGnot = 100_000
// Config is called on EndBlocker to change the k/v params of the chain
func Config() map[Key]string {
return map[Key]string{
Validators: "...",
AllowedTokens: "...",
AllowedTokens: func() string {
if std.GetHeight() > EnableGnot {
return "gnot"
}
return ""
}(),
}
}
// How often to run Config
func CronTab() string {
return "* * * */5"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment