Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper *Keeper) types.MsgServer
- func NewQuerierImpl(k *Keeper) types.QueryServer
- type Keeper
- func (k Keeper) AuthorizeNode(ctx sdk.Context, nodeID string, owner sdk.AccAddress) error
- func (k Keeper) BeginBlocker(ctx sdk.Context)
- func (k Keeper) CalcAndSetNodeCumulativeEmissionByEpoch(ctx sdk.Context, epochID uint64, nodeID string) sdk.Dec
- func (k Keeper) CalcBaseEpochEmission(ctx sdk.Context) sdk.Dec
- func (k Keeper) CalcEpochEmission(ctx sdk.Context, epochID uint64, globalOperationRatio sdk.Dec) sdk.Dec
- func (k Keeper) CalcGlobalPledgeRatio(ctx sdk.Context, epochID uint64) sdk.Dec
- func (k Keeper) CalcNodeComputingPowerOnEpoch(ctx sdk.Context, epochID uint64, nodeID string, powerOnRatio sdk.Dec) sdk.Dec
- func (k Keeper) CalcNodeCumulativeEmissionByEpoch(ctx sdk.Context, epochID uint64, nodeID string) sdk.Dec
- func (k Keeper) CalcNodeEmissionOnEpoch(ctx sdk.Context, epochID uint64, nodeID string) sdk.Dec
- func (k Keeper) CalcNodePledgeRatioOnEpoch(ctx sdk.Context, epochID uint64, nodeID string) sdk.Dec
- func (k Keeper) CalcTechProgressCoefficient(ctx sdk.Context) sdk.Dec
- func (k Keeper) CommitComputingPower(ctx sdk.Context, amount uint64, owner sdk.AccAddress) (uint64, uint64)
- func (k Keeper) CommitReport(ctx sdk.Context, report any) error
- func (k Keeper) CreateNode(ctx sdk.Context, divisionID string, owner sdk.AccAddress) (string, error)
- func (k Keeper) DecideDivision(ctx sdk.Context, power uint64) types.Division
- func (k Keeper) DelGlobalPledge(ctx sdk.Context, epochID uint64)
- func (k Keeper) DeleteAuthorizedMembers(ctx sdk.Context, members []string) error
- func (k Keeper) EndBlocker(ctx sdk.Context)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GenerateNodeID(ctx sdk.Context) string
- func (k Keeper) GetAuthorizedMembers(ctx sdk.Context) []string
- func (k Keeper) GetBaseState(ctx sdk.Context) types.BaseState
- func (k Keeper) GetCaptainsConstant(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetClaimableComputingPower(ctx sdk.Context, owner sdk.AccAddress) uint64
- func (k Keeper) GetClaimableComputingPowers(ctx sdk.Context) []types.ClaimableComputingPower
- func (k Keeper) GetCurrentEpoch(ctx sdk.Context) uint64
- func (k Keeper) GetDivision(ctx sdk.Context, divisionID string) (types.Division, bool)
- func (k Keeper) GetDivisions(ctx sdk.Context) (divisions []types.Division)
- func (k Keeper) GetEpochEmission(ctx sdk.Context, epochID uint64) sdk.Dec
- func (k Keeper) GetEpochesEmission(ctx sdk.Context) []types.EpochEmission
- func (k Keeper) GetGlobalClaimedEmission(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetGlobalComputingPowerOnEpoch(ctx sdk.Context, epochID uint64) sdk.Dec
- func (k Keeper) GetGlobalPledge(ctx sdk.Context, epochID uint64) sdk.Dec
- func (k Keeper) GetGlobalsComputingPower(ctx sdk.Context) []types.GlobalComputingPower
- func (k Keeper) GetGlobalsPledge(ctx sdk.Context) []types.GlobalPledge
- func (k Keeper) GetHalvingEraCoefficient(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetLastNodeID(ctx sdk.Context) string
- func (k Keeper) GetNode(ctx sdk.Context, nodeID string) (types.Node, bool)
- func (k Keeper) GetNodeBaseComputingPower(ctx sdk.Context, nodeID string) uint64
- func (k Keeper) GetNodeClaimedEmission(ctx sdk.Context, nodeID string) sdk.Dec
- func (k Keeper) GetNodeComputingPowerOnEpoch(ctx sdk.Context, epochID uint64, nodeID string) sdk.Dec
- func (k Keeper) GetNodeCumulativeEmissionByEpoch(ctx sdk.Context, epochID uint64, nodeID string) sdk.Dec
- func (k Keeper) GetNodeOwner(ctx sdk.Context, nodeID string) (sdk.AccAddress, bool)
- func (k Keeper) GetNodeSequence(ctx sdk.Context) uint64
- func (k Keeper) GetNodes(ctx sdk.Context) (nodes []types.Node)
- func (k Keeper) GetNodesByOwner(ctx sdk.Context, owner sdk.AccAddress) (nodes []types.Node)
- func (k Keeper) GetNodesClaimedEmission(ctx sdk.Context) []types.NodeClaimedEmission
- func (k Keeper) GetNodesComputingPower(ctx sdk.Context) []types.NodesComputingPower
- func (k Keeper) GetNodesCount(ctx sdk.Context) uint64
- func (k Keeper) GetNodesCumulativeEmission(ctx sdk.Context) []types.NodeCumulativeEmission
- func (k Keeper) GetOwnerClaimedEmission(ctx sdk.Context, owner sdk.AccAddress) sdk.Dec
- func (k Keeper) GetOwnerPledge(ctx sdk.Context, owner sdk.AccAddress, epochID uint64) sdk.Dec
- func (k Keeper) GetOwnersPledge(ctx sdk.Context) []types.OwnerPledge
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetReportBatches(ctx sdk.Context, epochID uint64) []types.BatchBase
- func (k Keeper) GetReportDigest(ctx sdk.Context, epochID uint64) (*types.ReportDigest, bool)
- func (k Keeper) GetSaleLevel(ctx sdk.Context) uint64
- func (k Keeper) HandleReportBatch(ctx sdk.Context, report *types.ReportBatch) error
- func (k Keeper) HandleReportDigest(ctx sdk.Context, report *types.ReportDigest) error
- func (k Keeper) HandleReportEnd(ctx sdk.Context, report *types.ReportEnd) error
- func (k Keeper) HasAuthorizedMember(ctx sdk.Context, member sdk.AccAddress) bool
- func (k Keeper) HasDivision(ctx sdk.Context, divisionID string) bool
- func (k Keeper) HasEndEpoch(ctx sdk.Context, epochID uint64) bool
- func (k Keeper) HasEpochEmission(ctx sdk.Context, epochID uint64) bool
- func (k Keeper) HasGlobalPledge(ctx sdk.Context, epochID uint64) bool
- func (k Keeper) HasNode(ctx sdk.Context, nodeID string) bool
- func (k Keeper) HasNodeComputingPowerOnEpoch(ctx sdk.Context, epochID uint64, nodeID string) bool
- func (k Keeper) HasNodeCumulativeEmissionByEpoch(ctx sdk.Context, epochID uint64, nodeID string) bool
- func (k Keeper) HasOwnerPledge(ctx sdk.Context, owner sdk.AccAddress, epochID uint64) bool
- func (k Keeper) HasReportBatch(ctx sdk.Context, epochID, batchID uint64) bool
- func (k Keeper) HasReportDigest(ctx sdk.Context, epochID uint64) bool
- func (k Keeper) HasStandByOverFlag(ctx sdk.Context) bool
- func (k Keeper) IncrGlobalPledge(ctx sdk.Context, epochID uint64, amount sdk.Dec)
- func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
- func (k Keeper) IsReportCompleted(ctx sdk.Context, epochId uint64) error
- func (k Keeper) IsStandByPhase(ctx sdk.Context) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SampleOwnerPledge(ctx sdk.Context, owner sdk.AccAddress) (sdk.Dec, error)
- func (k Keeper) SaveDivision(ctx sdk.Context, division types.Division) error
- func (k Keeper) SetAuthorizedMembers(ctx sdk.Context, members []string) error
- func (k Keeper) SetBaseState(ctx sdk.Context, bs *types.BaseState)
- func (k Keeper) SetGlobalClaimedEmission(ctx sdk.Context, amount sdk.Dec)
- func (k Keeper) SetGlobalPledge(ctx sdk.Context, epochID uint64, sum sdk.Dec)
- func (k Keeper) SetNodeClaimedEmission(ctx sdk.Context, nodeID string, amount sdk.Dec)
- func (k Keeper) SetNodeSequence(ctx sdk.Context, sequence uint64)
- func (k Keeper) SetOwnerPledge(ctx sdk.Context, owner sdk.AccAddress, epochID uint64, pledge sdk.Dec)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k Keeper) UpdateGlobalAndNodeClaimedEmission(ctx sdk.Context, nodeID string) error
- func (k Keeper) UpdateNode(ctx sdk.Context, nodeID string, amount uint64, owner sdk.AccAddress) error
- func (k Keeper) UpdateSaleLevel(ctx sdk.Context, newSaleLevel uint64) (uint64, error)
- func (k Keeper) ValidateReport(ctx sdk.Context, reportType types.ReportType, report *sdkcdc.Any) (any, error)
- func (k Keeper) ValidateReportBatch(ctx sdk.Context, report *types.ReportBatch) error
- func (k Keeper) ValidateReportDigest(ctx sdk.Context, report *types.ReportDigest) error
- func (k Keeper) ValidateReportEnd(ctx sdk.Context, report *types.ReportEnd) error
- func (k Keeper) ValidateReportEpoch(ctx sdk.Context, epochID uint64) error
- type Querier
- func (q Querier) AuthorizedMembers(goCtx context.Context, _ *types.QueryAuthorizedMembersRequest) (*types.QueryAuthorizedMembersResponse, error)
- func (q Querier) CurrentEpoch(goCtx context.Context, _ *types.QueryCurrentEpochRequest) (*types.QueryCurrentEpochResponse, error)
- func (q Querier) Division(goCtx context.Context, request *types.QueryDivisionRequest) (*types.QueryDivisionResponse, error)
- func (q Querier) Divisions(goCtx context.Context, request *types.QueryDivisionsRequest) (*types.QueryDivisionsResponse, error)
- func (q Querier) EpochStatus(goCtx context.Context, request *types.QueryEpochStatusRequest) (*types.QueryEpochStatusResponse, error)
- func (q Querier) Node(goCtx context.Context, request *types.QueryNodeRequest) (*types.QueryNodeResponse, error)
- func (q Querier) NodeLastEpochInfo(goCtx context.Context, request *types.QueryNodeLastEpochInfoRequest) (*types.QueryNodeLastEpochInfoResponse, error)
- func (q Querier) Nodes(goCtx context.Context, request *types.QueryNodesRequest) (*types.QueryNodesResponse, error)
- func (q Querier) Params(goCtx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (q Querier) SaleLevel(goCtx context.Context, _ *types.QuerySaleLevelRequest) (*types.QuerySaleLevelResponse, error)
- func (q Querier) Supply(goCtx context.Context, request *types.QuerySupplyRequest) (*types.QuerySupplyResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the mint MsgServer interface for the provided Keeper.
func NewQuerierImpl ¶
func NewQuerierImpl(k *Keeper) types.QueryServer
NewQuerierImpl returns an implementation of the captains QueryServer interface.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, storeKey storetypes.StoreKey, paramSpace paramtypes.Subspace, stakingKeeper types.StakingKeeper, authority sdk.AccAddress, ) Keeper
func (Keeper) AuthorizeNode ¶
AuthorizeNode defines a method for checking if the sender is the owner of the given node
func (Keeper) BeginBlocker ¶
BeginBlocker called every block, process the epoch if it's ended.
func (Keeper) CalcAndSetNodeCumulativeEmissionByEpoch ¶
func (k Keeper) CalcAndSetNodeCumulativeEmissionByEpoch(ctx sdk.Context, epochID uint64, nodeID string) sdk.Dec
CalcAndSetNodeCumulativeEmissionByEpoch returns the historical emission for a node at the end of an epoch. NOTE: this function set the historical emission by the end of epoch(t) and removes that of epoch(t-1).
func (Keeper) CalcBaseEpochEmission ¶
CalcBaseEpochEmission returns the base emission reward for an epoch.
func (Keeper) CalcEpochEmission ¶
func (k Keeper) CalcEpochEmission(ctx sdk.Context, epochID uint64, globalOperationRatio sdk.Dec) sdk.Dec
CalcEpochEmission returns the total emission reward for an epoch.
func (Keeper) CalcGlobalPledgeRatio ¶
CalcGlobalPledgeRatio calculates the pledge rate of the global on the epoch t.
func (Keeper) CalcNodeComputingPowerOnEpoch ¶
func (k Keeper) CalcNodeComputingPowerOnEpoch( ctx sdk.Context, epochID uint64, nodeID string, powerOnRatio sdk.Dec, ) sdk.Dec
CalcNodeComputingPowerOnEpoch returns the computing power of a node as per its node info.
func (Keeper) CalcNodeCumulativeEmissionByEpoch ¶
func (k Keeper) CalcNodeCumulativeEmissionByEpoch(ctx sdk.Context, epochID uint64, nodeID string) sdk.Dec
CalcNodeCumulativeEmissionByEpoch returns the historical emission for a node at the end of an epoch. NOTE: this func is only used to query and it won't set or prune state data.
func (Keeper) CalcNodeEmissionOnEpoch ¶
CalcNodeEmissionOnEpoch returns the emission for a node at the end of an epoch.
func (Keeper) CalcNodePledgeRatioOnEpoch ¶
CalcNodePledgeRatioOnEpoch calculates the pledge rate of the node on the epoch t but also prune pledge 2 epochs before.
func (Keeper) CalcTechProgressCoefficient ¶
CalcTechProgressCoefficient calculates tech progress coefficient TechProgressCoefficient = 1.6 ^ (captainNodeSaleLevel - 1)
func (Keeper) CommitComputingPower ¶
func (k Keeper) CommitComputingPower(ctx sdk.Context, amount uint64, owner sdk.AccAddress) (uint64, uint64)
CommitComputingPower commits the pending computing power.
func (Keeper) CommitReport ¶
CommitReport processes a report
func (Keeper) CreateNode ¶
func (k Keeper) CreateNode( ctx sdk.Context, divisionID string, owner sdk.AccAddress, ) (string, error)
CreateNode defines a method for create a new node for owner.
func (Keeper) DecideDivision ¶
DecideDivision decides the division of the node as per power.
func (Keeper) DelGlobalPledge ¶
DelGlobalPledge deletes the total pledge amount of captains' owners on the epoch end.
func (Keeper) DeleteAuthorizedMembers ¶
DeleteAuthorizedMembers deletes the list of authorized members
func (Keeper) EndBlocker ¶
EndBlocker called every block, process the report digest if exists.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns a GenesisState for a given context and keeper.
func (Keeper) GenerateNodeID ¶
GenerateNodeID defines a method for generating a new node id
func (Keeper) GetAuthorizedMembers ¶
GetAuthorizedMembers returns the list of authorized members
func (Keeper) GetBaseState ¶
GetBaseState returns the base state of the current epoch.
func (Keeper) GetCaptainsConstant ¶
GetCaptainsConstant returns the captains constant
func (Keeper) GetClaimableComputingPower ¶
GetClaimableComputingPower returns the claimable computing power of an owner.
func (Keeper) GetClaimableComputingPowers ¶
func (k Keeper) GetClaimableComputingPowers(ctx sdk.Context) []types.ClaimableComputingPower
GetClaimableComputingPowers returns all claimable computing powers.
func (Keeper) GetCurrentEpoch ¶
GetCurrentEpoch returns the current epoch.
func (Keeper) GetDivision ¶
GetDivision returns the division by the specified division ID
func (Keeper) GetDivisions ¶
GetDivisions returns all divisions
func (Keeper) GetEpochEmission ¶
GetEpochEmission returns the emission reward for an epoch.
func (Keeper) GetEpochesEmission ¶
func (k Keeper) GetEpochesEmission(ctx sdk.Context) []types.EpochEmission
GetEpochesEmission sets the emission reward for an epoch.
func (Keeper) GetGlobalClaimedEmission ¶
GetGlobalClaimedEmission returns global claimed emission.
func (Keeper) GetGlobalComputingPowerOnEpoch ¶
GetGlobalComputingPowerOnEpoch returns the sum of computing power of all nodes.
func (Keeper) GetGlobalPledge ¶
GetGlobalPledge returns the total pledge amount of one epoch end.
func (Keeper) GetGlobalsComputingPower ¶
func (k Keeper) GetGlobalsComputingPower(ctx sdk.Context) []types.GlobalComputingPower
GetGlobalsComputingPower returns all global computing power.
func (Keeper) GetGlobalsPledge ¶
func (k Keeper) GetGlobalsPledge(ctx sdk.Context) []types.GlobalPledge
GetGlobalsPledge returns all global pledge.
func (Keeper) GetHalvingEraCoefficient ¶
GetHalvingEraCoefficient returns the tech progress coefficient
func (Keeper) GetLastNodeID ¶
GetLastNodeID defines a method for returning the last node id
func (Keeper) GetNode ¶
GetNode defines a method for returning the node information of the specified id
func (Keeper) GetNodeBaseComputingPower ¶
GetNodeBaseComputingPower returns the base computing power of a node as per its node info.
func (Keeper) GetNodeClaimedEmission ¶
GetNodeClaimedEmission returns the claimed emission of a node.
func (Keeper) GetNodeComputingPowerOnEpoch ¶
func (k Keeper) GetNodeComputingPowerOnEpoch(ctx sdk.Context, epochID uint64, nodeID string) sdk.Dec
GetNodeComputingPowerOnEpoch returns the computing power of a node as per its node info.
func (Keeper) GetNodeCumulativeEmissionByEpoch ¶
func (k Keeper) GetNodeCumulativeEmissionByEpoch(ctx sdk.Context, epochID uint64, nodeID string) sdk.Dec
GetNodeCumulativeEmissionByEpoch returns the historical emission for a node at the end of an epoch.
func (Keeper) GetNodeOwner ¶
GetNodeOwner returns the owner of the specified node
func (Keeper) GetNodeSequence ¶
GetNodeSequence gets the next Node sequence from the store.
func (Keeper) GetNodesByOwner ¶
GetNodesByOwner return all nodes owned by the specified owner
func (Keeper) GetNodesClaimedEmission ¶
func (k Keeper) GetNodesClaimedEmission(ctx sdk.Context) []types.NodeClaimedEmission
GetNodesClaimedEmission returns the claimed emission of all nodes.
func (Keeper) GetNodesComputingPower ¶
func (k Keeper) GetNodesComputingPower(ctx sdk.Context) []types.NodesComputingPower
GetNodesComputingPower returns all nodes computing power.
func (Keeper) GetNodesCount ¶
GetNodesCount returns the total number of nodes
func (Keeper) GetNodesCumulativeEmission ¶
func (k Keeper) GetNodesCumulativeEmission(ctx sdk.Context) []types.NodeCumulativeEmission
GetNodesCumulativeEmission returns the cumulative emission of all nodes.
func (Keeper) GetOwnerClaimedEmission ¶
GetOwnerClaimedEmission returns the historical emission the last time user claimed.
func (Keeper) GetOwnerPledge ¶
GetOwnerPledge returns the sampled pledge amount of the owner on the epoch.
func (Keeper) GetOwnersPledge ¶
func (k Keeper) GetOwnersPledge(ctx sdk.Context) []types.OwnerPledge
GetOwnersPledge returns all owner pledge.
func (Keeper) GetReportBatches ¶
GetReportBatches returns the batch count.
func (Keeper) GetReportDigest ¶
GetReportDigest returns the digest.
func (Keeper) GetSaleLevel ¶
GetSaleLevel returns the current sale level.
func (Keeper) HandleReportBatch ¶
HandleReportBatch processes a report batch
func (Keeper) HandleReportDigest ¶
HandleReportDigest processes a report digest
NOTE: Part of handle logic are delayed to the end blocker. This is because we may encounter multiple params update in the same block which affect the calculation.
func (Keeper) HandleReportEnd ¶
HandleReportEnd processes a report end
func (Keeper) HasAuthorizedMember ¶
HasAuthorizedMember asserts whether an address is in authorized member lists.
func (Keeper) HasDivision ¶
HasDivision checks if the division exists in the store
func (Keeper) HasEndEpoch ¶
HasEndEpoch checks if the end epoch exists.
func (Keeper) HasEpochEmission ¶
HasEpochEmission returns if the emission reward for an epoch exists.
func (Keeper) HasGlobalPledge ¶
func (Keeper) HasNodeComputingPowerOnEpoch ¶
HasNodeComputingPowerOnEpoch checks if the node has computing power on the epoch.
func (Keeper) HasNodeCumulativeEmissionByEpoch ¶
func (k Keeper) HasNodeCumulativeEmissionByEpoch(ctx sdk.Context, epochID uint64, nodeID string) bool
HasNodeCumulativeEmissionByEpoch returns if the historical emission for a node at the end of an epoch exists.
func (Keeper) HasOwnerPledge ¶
HasOwnerPledge checks if the owner has the sampled pledge amount on the epoch.
func (Keeper) HasReportBatch ¶
HasReportBatch checks if the batch exists.
func (Keeper) HasReportDigest ¶
HasReportDigest checks if the digest exists.
func (Keeper) HasStandByOverFlag ¶
HasStandByOverFlag checks if the stand by flag exists.
func (Keeper) IncrGlobalPledge ¶
IncrGlobalPledge increments the total pledge amount of captains' owners on the epoch end.
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
InitGenesis stores the NFT genesis.
func (Keeper) IsReportCompleted ¶
IsReportCompleted checks if the report is completed
func (Keeper) IsStandByPhase ¶
IsStandByPhase checks if the stand by phrase is active.
func (Keeper) SampleOwnerPledge ¶
SampleOwnerPledge sample pledge amount of the owner on the epoch.
func (Keeper) SaveDivision ¶
SaveDivision saves a division to the store
func (Keeper) SetAuthorizedMembers ¶
SetAuthorizedMembers sets the list of authorized members
func (Keeper) SetBaseState ¶
SetBaseState sets the base state of the current epoch.
func (Keeper) SetGlobalClaimedEmission ¶
SetGlobalClaimedEmission sets global claimed emission.
func (Keeper) SetGlobalPledge ¶
SetGlobalPledge sets the total pledge amount of captains' owners on the epoch end.
func (Keeper) SetNodeClaimedEmission ¶
SetNodeClaimedEmission sets the historical emission the last time user claimed.
func (Keeper) SetNodeSequence ¶
SetNodeSequence sets the next Node sequence to the store.
func (Keeper) SetOwnerPledge ¶
func (k Keeper) SetOwnerPledge(ctx sdk.Context, owner sdk.AccAddress, epochID uint64, pledge sdk.Dec)
SetOwnerPledge sets the sampled pledge amount of the owner on the epoch.
func (Keeper) UpdateGlobalAndNodeClaimedEmission ¶
UpdateGlobalAndNodeClaimedEmission updates node's claimed emission and incr global claimed emission. NOTE: call this function only after claiming the rewards.
func (Keeper) UpdateNode ¶
func (k Keeper) UpdateNode( ctx sdk.Context, nodeID string, amount uint64, owner sdk.AccAddress, ) error
UpdateNode defines a method for updating the computing power of the specified node
func (Keeper) UpdateSaleLevel ¶
UpdateSaleLevel updates the sale level in params.
func (Keeper) ValidateReport ¶
func (k Keeper) ValidateReport(ctx sdk.Context, reportType types.ReportType, report *sdkcdc.Any) (any, error)
ValidateReport checks if the report is valid
func (Keeper) ValidateReportBatch ¶
ValidateReportBatch checks if the report batch is valid
func (Keeper) ValidateReportDigest ¶
ValidateReportDigest checks if the report digest is valid
func (Keeper) ValidateReportEnd ¶
ValidateReportEnd checks if the report end is valid
type Querier ¶
type Querier struct {
*Keeper
}
func (Querier) AuthorizedMembers ¶
func (q Querier) AuthorizedMembers( goCtx context.Context, _ *types.QueryAuthorizedMembersRequest, ) (*types.QueryAuthorizedMembersResponse, error)
AuthorizedMembers queries the list of authorized members
func (Querier) CurrentEpoch ¶
func (q Querier) CurrentEpoch( goCtx context.Context, _ *types.QueryCurrentEpochRequest, ) (*types.QueryCurrentEpochResponse, error)
CurrentEpoch queries current epoch and its block height.
func (Querier) Division ¶
func (q Querier) Division( goCtx context.Context, request *types.QueryDivisionRequest, ) (*types.QueryDivisionResponse, error)
Division queries an node division by its ID
func (Querier) Divisions ¶
func (q Querier) Divisions( goCtx context.Context, request *types.QueryDivisionsRequest, ) (*types.QueryDivisionsResponse, error)
Divisions queries all Node divisions
func (Querier) EpochStatus ¶
func (q Querier) EpochStatus( goCtx context.Context, request *types.QueryEpochStatusRequest, ) (*types.QueryEpochStatusResponse, error)
EpochStatus queries the status of an epoch.
func (Querier) Node ¶
func (q Querier) Node( goCtx context.Context, request *types.QueryNodeRequest, ) (*types.QueryNodeResponse, error)
Node queries a Node.
func (Querier) NodeLastEpochInfo ¶
func (q Querier) NodeLastEpochInfo( goCtx context.Context, request *types.QueryNodeLastEpochInfoRequest, ) (*types.QueryNodeLastEpochInfoResponse, error)
NodeLastEpochInfo queries the last epoch info of a node
func (Querier) Nodes ¶
func (q Querier) Nodes( goCtx context.Context, request *types.QueryNodesRequest, ) (*types.QueryNodesResponse, error)
Nodes queries all node of a given owner
func (Querier) Params ¶
func (q Querier) Params( goCtx context.Context, _ *types.QueryParamsRequest, ) (*types.QueryParamsResponse, error)
Params queries the captains module parameters
func (Querier) SaleLevel ¶
func (q Querier) SaleLevel( goCtx context.Context, _ *types.QuerySaleLevelRequest, ) (*types.QuerySaleLevelResponse, error)
SaleLevel queries the current sale level
func (Querier) Supply ¶
func (q Querier) Supply( goCtx context.Context, request *types.QuerySupplyRequest, ) (*types.QuerySupplyResponse, error)
Supply queries the number of Node from the given division