Documentation ¶
Overview ¶
Package configuration contains the iovns module for handling state configuration such as account
Index ¶
- Constants
- Variables
- func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)
- func NewHandler(k Keeper) sdk.Handler
- func NewQuerier(k Keeper) sdk.Querier
- func ValidateGenesis(data GenesisState) error
- type AppModule
- func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
- func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (a AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (a AppModule) NewHandler() sdk.Handler
- func (a AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
- func (AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, router *mux.Router)
- func (AppModuleBasic) ValidateGenesis(b json.RawMessage) (err error)
- type Config
- type Fees
- type GenesisState
- type Keeper
- func (k Keeper) GetConfiguration(ctx sdk.Context) types.Config
- func (k Keeper) GetDomainGracePeriod(ctx sdk.Context) time.Duration
- func (k Keeper) GetDomainRenewDuration(ctx sdk.Context) time.Duration
- func (k Keeper) GetFees(ctx sdk.Context) *types.Fees
- func (k Keeper) GetOwners(ctx sdk.Context) []sdk.AccAddress
- func (k Keeper) GetValidDomainRegexp(ctx sdk.Context) string
- func (k Keeper) IsOwner(ctx sdk.Context, addr sdk.AccAddress) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) OperationAllowed(ctx sdk.Context, msg sdk.Msg) bool
- func (k Keeper) SetConfig(ctx sdk.Context, conf types.Config)
- func (k Keeper) SetDefaultFees(ctx sdk.Context, msg sdk.Msg, coin sdk.Coin)
- func (k Keeper) SetFees(ctx sdk.Context, fees *types.Fees)
- func (k Keeper) SetLengthFees(ctx sdk.Context, msg sdk.Msg, length int, coin sdk.Coin)
Constants ¶
const DefaultParamSpace = types.DefaultParamSpace
const ModuleName = types.ModuleName
ModuleName aliases types.ModuleName
const QuerierRoute = types.QuerierRoute
QuerierRoute aliases types.QuerierRoute
const QueryConfig = types.QueryConfig
QueryConfig aliases types.QueryConfig
const RouterKey = types.RouterKey
RouterKey aliases types.RouterKey
const StoreKey = types.StoreKey
StoreKey aliases types.StoreKey
Variables ¶
var NewFees = types.NewFees
NewFees aliases types.NewFees
Functions ¶
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)
InitGenesis sets the initial state of the configuration module
func NewHandler ¶
NewHandler returns the handlers for the configuration module
func NewQuerier ¶
NewQuerier generates the queries handler for the configuration module
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis makes sure that the genesis state is valid
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
- - FILL APP MODULE - -
func NewAppModule ¶
func (AppModule) BeginBlock ¶
func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
func (AppModule) EndBlock ¶
func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
func (AppModule) ExportGenesis ¶
func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
func (AppModule) InitGenesis ¶
func (a AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
func (AppModule) NewHandler ¶
func (AppModule) NewQuerierHandler ¶
func (AppModule) QuerierRoute ¶
func (AppModule) RegisterInvariants ¶
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
type AppModuleBasic ¶
type AppModuleBasic struct{}
nolint - - - FILL APP MODULE BASIC -- // AppModuleBasic implements the AppModuleBasic interface of the cosmos-sdk
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, router *mux.Router)
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(b json.RawMessage) (err error)
type GenesisState ¶
GenesisState is used to unmarshal the genesis state when the app is initialized, and it is used to marshal the state when it needs to be exported.
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState returns the default genesis state TODO this needs to be updated, although it will be imported from iovns chain
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState
ExportGenesis saves the state of the configuration module
func NewGenesisState ¶
func NewGenesisState(conf types.Config, fees *types.Fees) GenesisState
NewGenesisState is GenesisState constructor
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper is the key value store handler for the configuration module
func (Keeper) GetConfiguration ¶
GetConfiguration returns the configuration of the blockchain
func (Keeper) GetDomainGracePeriod ¶
GetDomainGracePeriod returns the default grace period before domains can be deleted by someone other than the owner him/herself
func (Keeper) GetDomainRenewDuration ¶
GetDomainRenewDuration returns the duration of a domain renewal period
func (Keeper) GetOwners ¶ added in v0.2.0
func (k Keeper) GetOwners(ctx sdk.Context) []sdk.AccAddress
GetOwners returns the owner of domains with no superuser
func (Keeper) GetValidDomainRegexp ¶
GetValidDomainRegexp returns the regular expression used to match valid domain names
func (Keeper) OperationAllowed ¶ added in v0.2.0
OperationAllowed evaluates a message to check if it is allowed to perform actions on the configuration module. This checks if quorum is reached in the number of signatures in the message against the number of active owners in the current configuration
func (Keeper) SetDefaultFees ¶ added in v0.2.0
SetDefaultFees sets the default fees for a msg