Documentation ¶
Index ¶
Constants ¶
const ( // ModuleName defines the name of the module ModuleName = "configuration" // StoreKey is the key used to identify the module in the KVStore StoreKey = ModuleName // RouterKey is the key used to process transactions for the module RouterKey = ModuleName // QuerierRoute is used to process queries for the module QuerierRoute = ModuleName // DefaultParamSpace defines the key for the configuration paramspace DefaultParamSpace = ModuleName )
ModuleConst
const ( // ConfigKey defines the key used for the configuration // since the configuration is only one the key will always be one ConfigKey = "config" // FeeKey defines the key used for fees // since the fee params are only one // this is the only key we will need FeeKey = "fee" )
const QueryConfig = "configuration"
QueryConfig is the route key used to query configuration data
const QueryFees = "fees"
QueryFees is the route key used to query fees data
Variables ¶
var ModuleCdc *codec.Codec
ModuleCdc defines the module codec
Functions ¶
func RegisterCodec ¶ added in v0.2.0
RegisterCodec registers concrete types on codec
Types ¶
type Config ¶
type Config struct { // Configurer is the configuration owner, the addresses allowed to handle fees // and register domains with no superuser Configurer sdk.AccAddress `json:"configurer"` // ValidDomainName defines a regexp that determines if a domain name is valid or not ValidDomainName string `json:"valid_domain_name"` // ValidAccountName defines a regexp that determines if an account name is valid or not ValidAccountName string `json:"valid_account_name"` // ValidBlockchainID defines a regexp that determines if a blockchain id is valid or not ValidBlockchainID string `json:"valid_blockchain_id"` // ValidBlockchainAddress determines a regexp for a valid blockchain address ValidBlockchainAddress string `json:"valid_blockchain_address"` // DomainRenewalPeriod defines the duration of the domain renewal period in seconds DomainRenewalPeriod time.Duration `json:"domain_renew_period"` // DomainRenewalCountMax defines maximum number of domain renewals a user can do DomainRenewalCountMax uint32 `json:"domain_renew_count_max"` // DomainGracePeriod defines the grace period for a domain deletion in seconds DomainGracePeriod time.Duration `json:"domain_grace_period"` // AccountRenewalPeriod defines the duration of the account renewal period in seconds AccountRenewalPeriod time.Duration `json:"account_renew_period"` // AccountRenewalCountMax defines maximum number of account renewals a user can do AccountRenewalCountMax uint32 `json:"account_renew_count_max"` // DomainGracePeriod defines the grace period for a domain deletion in seconds AccountGracePeriod time.Duration `json:"account_grace_period"` // BlockchainTargetMax defines maximum number of blockchain targets could be saved under an account BlockchainTargetMax uint32 `json:"blockchain_target_max"` // CertificateSizeMax defines maximum size of a certificate that could be saved under an account CertificateSizeMax uint64 `json:"certificate_size_max"` // CertificateCountMax defines maximum number of certificates that could be saved under an account CertificateCountMax uint32 `json:"certificate_count_max"` // MetadataSizeMax defines maximum size of metadata that could be saved under an account MetadataSizeMax uint64 `json:"metadata_size_max"` }
Config is the configuration of the network
type Fees ¶ added in v0.2.0
type Fees struct { // FeeCoinDenom defines the denominator of the coin used to process fees FeeCoinDenom string FeeCoinPrice sdk.Dec // DefaultFee is the parameter defining the default fee DefaultFee sdk.Dec // account fees RegisterClosedAccount sdk.Dec RegisterOpenAccount sdk.Dec TransferClosedAccount sdk.Dec TransferOpenAccount sdk.Dec ReplaceAccountTargets sdk.Dec AddAccountCertificate sdk.Dec DelAccountCertificate sdk.Dec SetAccountMetadata sdk.Dec // domain fees // Register domain RegisterDomain sdk.Dec RegisterDomain1 sdk.Dec RegisterDomain2 sdk.Dec RegisterDomain3 sdk.Dec RegisterDomain4 sdk.Dec RegisterDomain5 sdk.Dec RegisterDomainDefault sdk.Dec RegisterOpenDomainMultiplier sdk.Dec // TransferDomain TransferDomainClosed sdk.Dec TransferDomainOpen sdk.Dec // RenewDomain RenewOpenDomain sdk.Dec }
Fees contains different type of fees to calculate coins to detract when processing different messages
func (*Fees) SetDefaults ¶ added in v0.4.0
SetDefaults sets the default fees, it takes only one parameter which is the coin name that will be used by the users who want to access the domain module functionalities
type MsgUpdateConfig ¶ added in v0.2.0
type MsgUpdateConfig struct { Configurer sdk.AccAddress NewConfiguration Config }
MsgUpdateConfig is used to update configuration using a multisig strategy
func (MsgUpdateConfig) GetSignBytes ¶ added in v0.2.0
func (m MsgUpdateConfig) GetSignBytes() []byte
GetSignBytes implements sdk.Msg
func (MsgUpdateConfig) GetSigners ¶ added in v0.2.0
func (m MsgUpdateConfig) GetSigners() []sdk.AccAddress
GetSigners implements sdk.Msg
func (MsgUpdateConfig) Route ¶ added in v0.2.0
func (m MsgUpdateConfig) Route() string
func (MsgUpdateConfig) Type ¶ added in v0.2.0
func (m MsgUpdateConfig) Type() string
func (MsgUpdateConfig) ValidateBasic ¶ added in v0.2.0
func (m MsgUpdateConfig) ValidateBasic() error
type MsgUpdateFees ¶ added in v0.4.0
type MsgUpdateFees struct { Fees *Fees Configurer sdk.AccAddress }
func (MsgUpdateFees) GetSignBytes ¶ added in v0.4.0
func (m MsgUpdateFees) GetSignBytes() []byte
func (MsgUpdateFees) GetSigners ¶ added in v0.4.0
func (m MsgUpdateFees) GetSigners() []sdk.AccAddress
func (MsgUpdateFees) Route ¶ added in v0.4.0
func (m MsgUpdateFees) Route() string
func (MsgUpdateFees) Type ¶ added in v0.4.0
func (m MsgUpdateFees) Type() string
func (MsgUpdateFees) ValidateBasic ¶ added in v0.4.0
func (m MsgUpdateFees) ValidateBasic() error
type QueryConfigResponse ¶
type QueryConfigResponse struct {
Configuration Config `json:"config"`
}
QueryConfigResponse is the result returned after a query to the chain configuration
type QueryFeesResponse ¶ added in v0.2.0
type QueryFeesResponse struct {
Fees *Fees `json:"fees"`
}