mukan-ignite/ignite/config/chain/v0/config.go
Mukan Erkin Törük c32551b6f7
Some checks failed
Docs Deploy / build_and_deploy (push) Has been cancelled
Generate Docs / cli (push) Has been cancelled
Generate Config Doc / cli (push) Has been cancelled
Go formatting / go-formatting (push) Has been cancelled
Check links / markdown-link-check (push) Has been cancelled
Integration / pre-test (push) Has been cancelled
Integration / test on (push) Has been cancelled
Integration / status (push) Has been cancelled
Lint / Lint Go code (push) Has been cancelled
Test / test (ubuntu-latest) (push) Has been cancelled
refactor: replace all github.com upstream refs with git.cw.tr/mukan-network
2026-05-11 03:36:24 +03:00

37 lines
1.1 KiB
Go

package v0
import (
"io"
"dario.cat/mergo"
"gopkg.in/yaml.v3"
"git.cw.tr/mukan-network/mukan-ignite/ignite/config/chain/base"
"git.cw.tr/mukan-network/mukan-ignite/ignite/config/chain/version"
)
// Config is the user given configuration to do additional setup during serve.
type Config struct {
base.Config `yaml:",inline"`
Validator Validator `yaml:"validator" doc:"Contains information related to the validator and settings."`
Init base.Init `yaml:"init" doc:"Overwrites the appd's config/config.toml configurations."`
Host base.Host `yaml:"host" doc:"Keeps configuration related to started servers."`
}
// Clone returns an identical copy of the instance.
func (c *Config) Clone() (version.Converter, error) {
cfgCopy := Config{}
return &cfgCopy, mergo.Merge(&cfgCopy, c, mergo.WithAppendSlice)
}
// Decode decodes the config file values from YAML.
func (c *Config) Decode(r io.Reader) error {
return yaml.NewDecoder(r).Decode(c)
}
// Validator holds info related to validator settings.
type Validator struct {
Name string `yaml:"name" doc:"Name of the validator."`
Staked string `yaml:"staked" doc:"Amount staked by the validator."`
}