keeper

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryResourceNodeList      = "resource_nodes"
	QueryResourceNodeByMoniker = "resource_nodes_moniker"
	QueryIndexingNodeList      = "indexing_nodes"
	QueryIndexingNodeByMoniker = "indexing_nodes_moniker"
	QueryNodesTotalStakes      = "nodes_total_stakes"
	QueryNodeStakeByNodeAddr   = "node_stakes"
	QueryNodeStakeByOwner      = "node_stakes_by_owner"
	QueryRegisterParams        = "register_params"
	QueryDefaultLimit          = 100
)
View Source
const (
	StratosBech32Prefix = "st"
)

Variables

View Source
var (
	AccountPubKeyPrefix    = StratosBech32Prefix + "pub"
	ValidatorAddressPrefix = StratosBech32Prefix + "valoper"
	ValidatorPubKeyPrefix  = StratosBech32Prefix + "valoperpub"
	ConsNodeAddressPrefix  = StratosBech32Prefix + "valcons"
	ConsNodePubKeyPrefix   = StratosBech32Prefix + "valconspub"
	SdsNodeP2PKeyPrefix    = StratosBech32Prefix + "sdsp2p"
)

Functions

func CheckAccAddr added in v0.4.0

func CheckAccAddr(w http.ResponseWriter, r *http.Request, data string) (sdk.AccAddress, bool)

func GetIndexingNodeList added in v0.4.0

func GetIndexingNodeList(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) ([]byte, error)

func GetIndexingNodes

func GetIndexingNodes(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error)

GetIndexingNodes fetches all indexing nodes by network address.

func GetIndexingNodesByMoniker

func GetIndexingNodesByMoniker(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error)

func GetNetworkSet

func GetNetworkSet(ctx sdk.Context, k Keeper) ([]byte, error)

GetNetworkSet fetches all network addresses.

func GetNodesStakingInfo added in v0.4.0

func GetNodesStakingInfo(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) ([]byte, error)

func GetRegisterParams added in v0.4.0

func GetRegisterParams(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error)

func GetResourceNodeList added in v0.4.0

func GetResourceNodeList(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) ([]byte, error)

func GetResourceNodes

func GetResourceNodes(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error)

GetResourceNodes fetches all resource nodes by network address.

func GetResourceNodesByMoniker

func GetResourceNodesByMoniker(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error)

func GetStakingInfoByNodeAddr added in v0.4.0

func GetStakingInfoByNodeAddr(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) ([]byte, error)

func GetStakingInfoByOwnerAddr added in v0.4.0

func GetStakingInfoByOwnerAddr(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) ([]byte, error)

func MakeTestCodec

func MakeTestCodec() *codec.Codec

create a codec used only for testing

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier creates a new querier for register clients.

func SetConfig

func SetConfig()

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper of the register store

func CreateTestInput

func CreateTestInput(t *testing.T, isCheckTx bool) (sdk.Context, auth.AccountKeeper, bank.Keeper, Keeper, params.Keeper)

func NewKeeper

func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramSpace params.Subspace,
	accountKeeper auth.AccountKeeper, bankKeeper bank.Keeper) Keeper

NewKeeper creates a register keeper

func (Keeper) AddIndexingNodeStake

func (k Keeper) AddIndexingNodeStake(ctx sdk.Context, indexingNode types.IndexingNode, tokenToAdd sdk.Coin,
) (ozoneLimitChange sdk.Int, err error)

AddIndexingNodeStake Update the tokens of an existing indexing node

func (Keeper) AddResourceNodeStake

func (k Keeper) AddResourceNodeStake(ctx sdk.Context, resourceNode types.ResourceNode, tokenToAdd sdk.Coin,
) (ozoneLimitChange sdk.Int, err error)

AddResourceNodeStake Update the tokens of an existing resource node

func (Keeper) AfterNodeBeginUnbonding added in v0.4.0

func (k Keeper) AfterNodeBeginUnbonding(ctx sdk.Context, networkAddr sdk.AccAddress, isIndexingNode bool)

AfterNodeBeginUnbonding - call hook if registered

func (Keeper) AfterNodeBonded added in v0.4.0

func (k Keeper) AfterNodeBonded(ctx sdk.Context, networkAddr sdk.AccAddress, isIndexingNode bool)

AfterNodeBonded - call hook if registered

func (Keeper) AfterNodeCreated added in v0.4.0

func (k Keeper) AfterNodeCreated(ctx sdk.Context, networkAddr sdk.AccAddress, isIndexingNode bool)

AfterNodeCreated - call hook if registered

func (Keeper) AfterNodeRemoved added in v0.4.0

func (k Keeper) AfterNodeRemoved(ctx sdk.Context, networkAddr sdk.AccAddress, isIndexingNode bool)

AfterNodeRemoved - call hook if registered

func (Keeper) BeforeNodeModified added in v0.4.0

func (k Keeper) BeforeNodeModified(ctx sdk.Context, network sdk.AccAddress, isIndexingNode bool)

BeforeNodeModified - call hook if registered

func (Keeper) BlockRegisteredNodesUpdates added in v0.4.0

func (k Keeper) BlockRegisteredNodesUpdates(ctx sdk.Context) []abci.ValidatorUpdate

Called in each EndBlock

func (Keeper) BondDenom

func (k Keeper) BondDenom(ctx sdk.Context) (res string)

BondDenom - Bondable coin denomination

func (Keeper) CompleteUnbonding added in v0.4.0

func (k Keeper) CompleteUnbonding(ctx sdk.Context, networkAddr sdk.AccAddress) error

CompleteUnbonding performs the same logic as CompleteUnbondingWithAmount except it does not return the total unbonding amount.

func (Keeper) CompleteUnbondingWithAmount added in v0.4.0

func (k Keeper) CompleteUnbondingWithAmount(ctx sdk.Context, networkAddr sdk.AccAddress) (sdk.Coins, error)

CompleteUnbondingWithAmount completes the unbonding of all mature entries in the retrieved unbonding delegation object and returns the total unbonding balance or an error upon failure.

func (Keeper) DeleteLastIndexingNodeStake

func (k Keeper) DeleteLastIndexingNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress)

DeleteLastIndexingNodeStake Delete the last indexing node stake.

func (Keeper) DeleteLastResourceNodeStake

func (k Keeper) DeleteLastResourceNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress)

DeleteLastResourceNodeStake Delete the last resource node stake.

func (Keeper) DequeueAllMatureUBDQueue added in v0.4.0

func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context,
	currTime time.Time) (matureUnbonds []sdk.AccAddress)

Returns a concatenated list of all the timeslices inclusively previous to currTime, and deletes the timeslices from the queue

func (Keeper) GetAllIndexingNodes

func (k Keeper) GetAllIndexingNodes(ctx sdk.Context) (indexingNodes []types.IndexingNode)

GetAllIndexingNodes get the set of all indexing nodes with no limits, used during genesis dump

func (Keeper) GetAllMatureUBDNodeQueue added in v0.4.0

func (k Keeper) GetAllMatureUBDNodeQueue(ctx sdk.Context, currTime time.Time) (matureNetworkAddrs []sdk.AccAddress)

Returns a concatenated list of all the timeslices before currTime, and deletes the timeslices from the queue

func (Keeper) GetAllResourceNodes

func (k Keeper) GetAllResourceNodes(ctx sdk.Context) (resourceNodes []types.ResourceNode)

GetAllResourceNodes get the set of all resource nodes with no limits, used during genesis dump

func (Keeper) GetAllUnbondingNodes added in v0.4.0

func (k Keeper) GetAllUnbondingNodes(ctx sdk.Context) (unbondingNodes []types.UnbondingNode)

GetAllUnbondingNodes get the set of all ubd nodes with no limits, used during genesis dump

func (Keeper) GetAllUnbondingNodesTotalBalance added in v0.4.0

func (k Keeper) GetAllUnbondingNodesTotalBalance(ctx sdk.Context) sdk.Int

func (Keeper) GetAllValidIndexingNodes

func (k Keeper) GetAllValidIndexingNodes(ctx sdk.Context) (indexingNodes []types.IndexingNode)

GetAllValidIndexingNodes get the set of all bonded & not suspended indexing nodes

func (Keeper) GetIndexingNetworksIterator

func (k Keeper) GetIndexingNetworksIterator(ctx sdk.Context) sdk.Iterator

GetIndexingNetworksIterator gets an iterator over all network addresses

func (Keeper) GetIndexingNode

func (k Keeper) GetIndexingNode(ctx sdk.Context, addr sdk.AccAddress) (indexingNode types.IndexingNode, found bool)

GetIndexingNode get a single indexing node

func (Keeper) GetIndexingNodeBondedToken added in v0.4.0

func (k Keeper) GetIndexingNodeBondedToken(ctx sdk.Context) (token sdk.Coin)

func (Keeper) GetIndexingNodeList

func (k Keeper) GetIndexingNodeList(ctx sdk.Context, networkID string) (indexingNodes []types.IndexingNode, err error)

GetIndexingNodeList get all indexing nodes by network ID

func (Keeper) GetIndexingNodeListByMoniker

func (k Keeper) GetIndexingNodeListByMoniker(ctx sdk.Context, moniker string) (resourceNodes []types.IndexingNode, err error)

func (Keeper) GetIndexingNodeNotBondedToken added in v0.4.0

func (k Keeper) GetIndexingNodeNotBondedToken(ctx sdk.Context) (token sdk.Coin)

func (Keeper) GetIndexingNodeRegistrationVotePool

func (k Keeper) GetIndexingNodeRegistrationVotePool(ctx sdk.Context, nodeAddr sdk.AccAddress) (votePool types.IndexingNodeRegistrationVotePool, found bool)

func (Keeper) GetIndexingNodesFiltered added in v0.4.0

func (k Keeper) GetIndexingNodesFiltered(ctx sdk.Context, params QueryNodesParams) []types.IndexingNode

func (Keeper) GetInitialGenesisStakeTotal

func (k Keeper) GetInitialGenesisStakeTotal(ctx sdk.Context) (stake sdk.Int)

func (Keeper) GetLastIndexingNodeStake

func (k Keeper) GetLastIndexingNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress) (stake sdk.Int)

GetLastIndexingNodeStake Load the last indexing node stake. Returns zero if the node was not a indexing node last block.

func (Keeper) GetLastResourceNodeStake

func (k Keeper) GetLastResourceNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress) (stake sdk.Int)

GetLastResourceNodeStake Load the last resource node stake. Returns zero if the node was not a resource node last block.

func (Keeper) GetNetworks

func (k Keeper) GetNetworks(ctx sdk.Context, keeper Keeper) (res []byte)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams returns the total set of register parameters.

func (Keeper) GetRemainingOzoneLimit

func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.Int)

func (Keeper) GetResourceNetworksIterator

func (k Keeper) GetResourceNetworksIterator(ctx sdk.Context) sdk.Iterator

GetResourceNetworksIterator gets an iterator over all network addresses

func (Keeper) GetResourceNode

func (k Keeper) GetResourceNode(ctx sdk.Context, addr sdk.AccAddress) (resourceNode types.ResourceNode, found bool)

GetResourceNode get a single resource node

func (Keeper) GetResourceNodeBondedToken added in v0.4.0

func (k Keeper) GetResourceNodeBondedToken(ctx sdk.Context) (token sdk.Coin)

func (Keeper) GetResourceNodeList

func (k Keeper) GetResourceNodeList(ctx sdk.Context, networkID string) (resourceNodes []types.ResourceNode, err error)

GetResourceNodeList get all resource nodes by network address

func (Keeper) GetResourceNodeListByMoniker

func (k Keeper) GetResourceNodeListByMoniker(ctx sdk.Context, moniker string) (resourceNodes []types.ResourceNode, err error)

func (Keeper) GetResourceNodeNotBondedToken added in v0.4.0

func (k Keeper) GetResourceNodeNotBondedToken(ctx sdk.Context) (token sdk.Coin)

func (Keeper) GetResourceNodesFiltered added in v0.4.0

func (k Keeper) GetResourceNodesFiltered(ctx sdk.Context, params QueryNodesParams) []types.ResourceNode

func (Keeper) GetUnbondingNode added in v0.4.0

func (k Keeper) GetUnbondingNode(ctx sdk.Context,
	networkAddr sdk.AccAddress) (ubd types.UnbondingNode, found bool)

return a unbonding UnbondingIndexingNode

func (Keeper) GetUnbondingNodeBalance added in v0.4.0

func (k Keeper) GetUnbondingNodeBalance(ctx sdk.Context,
	networkAddr sdk.AccAddress) sdk.Int

GetUnbondingNodeBalance returns an unbonding balance and an UnbondingNode

func (Keeper) GetUnbondingNodeQueueTimeSlice added in v0.4.0

func (k Keeper) GetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (networkAddrs []sdk.AccAddress)

gets a specific unbonding queue timeslice. A timeslice is a slice of DVPairs corresponding to unbonding delegations that expire at a certain time.

func (Keeper) GetUnbondingNodes added in v0.4.0

func (k Keeper) GetUnbondingNodes(ctx sdk.Context, networkAddr sdk.AccAddress,
	maxRetrieve uint16) (unbondingIndexingNodes []types.UnbondingNode)

return a given amount of all the UnbondingIndexingNodes

func (Keeper) HandleVoteForIndexingNodeRegistration

func (k Keeper) HandleVoteForIndexingNodeRegistration(ctx sdk.Context, nodeAddr sdk.AccAddress, ownerAddr sdk.AccAddress,
	opinion types.VoteOpinion, voterAddr sdk.AccAddress) (nodeStatus sdk.BondStatus, err error)

func (Keeper) HasMaxUnbondingNodeEntries added in v0.4.0

func (k Keeper) HasMaxUnbondingNodeEntries(ctx sdk.Context, networkAddr sdk.AccAddress) bool

HasMaxUnbondingIndexingNodeEntries - check if unbonding IndexingNode has maximum number of entries

func (Keeper) InsertUnbondingNodeQueue added in v0.4.0

func (k Keeper) InsertUnbondingNodeQueue(ctx sdk.Context, ubd types.UnbondingNode,
	completionTime time.Time)

Insert an unbonding delegation to the appropriate timeslice in the unbonding queue

func (Keeper) IterateLastIndexingNodeStakes

func (k Keeper) IterateLastIndexingNodeStakes(ctx sdk.Context, handler func(nodeAddr sdk.AccAddress, stake sdk.Int) (stop bool))

IterateLastIndexingNodeStakes Iterate over last indexing node stakes.

func (Keeper) IterateLastResourceNodeStakes

func (k Keeper) IterateLastResourceNodeStakes(ctx sdk.Context, handler func(nodeAddr sdk.AccAddress, stake sdk.Int) (stop bool))

IterateLastResourceNodeStakes Iterate over last resource node stakes.

func (Keeper) IterateUnbondingNodes added in v0.4.0

func (k Keeper) IterateUnbondingNodes(ctx sdk.Context, fn func(index int64, ubd types.UnbondingNode) (stop bool))

iterate through all of the unbonding indexingNodes

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) MaxEntries added in v0.4.0

func (k Keeper) MaxEntries(ctx sdk.Context) (res uint16)

MaxEntries - Maximum number of simultaneous unbonding delegations or redelegations (per pair/trio)

func (Keeper) RegisterIndexingNode

func (k Keeper) RegisterIndexingNode(ctx sdk.Context, networkID string, pubKey crypto.PubKey, ownerAddr sdk.AccAddress,
	description types.Description, stake sdk.Coin) (ozoneLimitChange sdk.Int, err error)

func (Keeper) RegisterResourceNode

func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkID string, pubKey crypto.PubKey, ownerAddr sdk.AccAddress,
	description types.Description, nodeType string, stake sdk.Coin) (ozoneLimitChange sdk.Int, err error)

func (Keeper) RemoveTokenFromPoolWhileUnbondingIndexingNode added in v0.4.0

func (k Keeper) RemoveTokenFromPoolWhileUnbondingIndexingNode(ctx sdk.Context, indexingNode types.IndexingNode, tokenToSub sdk.Coin) error

func (Keeper) RemoveTokenFromPoolWhileUnbondingResourceNode added in v0.4.0

func (k Keeper) RemoveTokenFromPoolWhileUnbondingResourceNode(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error

func (Keeper) RemoveUnbondingNode added in v0.4.0

func (k Keeper) RemoveUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode)

remove the unbonding IndexingNode object

func (*Keeper) SetHooks added in v0.4.0

func (k *Keeper) SetHooks(sh types.RegisterHooks) *Keeper

Set the register hooks

func (Keeper) SetIndexingNode

func (k Keeper) SetIndexingNode(ctx sdk.Context, indexingNode types.IndexingNode)

set the main record holding indexing node details

func (Keeper) SetIndexingNodeBondedToken added in v0.4.0

func (k Keeper) SetIndexingNodeBondedToken(ctx sdk.Context, token sdk.Coin)

func (Keeper) SetIndexingNodeNotBondedToken added in v0.4.0

func (k Keeper) SetIndexingNodeNotBondedToken(ctx sdk.Context, token sdk.Coin)

func (Keeper) SetIndexingNodeRegistrationVotePool

func (k Keeper) SetIndexingNodeRegistrationVotePool(ctx sdk.Context, votePool types.IndexingNodeRegistrationVotePool)

func (Keeper) SetInitialGenesisStakeTotal

func (k Keeper) SetInitialGenesisStakeTotal(ctx sdk.Context, stake sdk.Int)

func (Keeper) SetLastIndexingNodeStake

func (k Keeper) SetLastIndexingNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress, stake sdk.Int)

SetLastIndexingNodeStake Set the last indexing node stake.

func (Keeper) SetLastResourceNodeStake

func (k Keeper) SetLastResourceNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress, stake sdk.Int)

SetLastResourceNodeStake Set the last resource node stake.

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams sets the register parameters to the param space.

func (Keeper) SetRemainingOzoneLimit

func (k Keeper) SetRemainingOzoneLimit(ctx sdk.Context, value sdk.Int)

func (Keeper) SetResourceNode

func (k Keeper) SetResourceNode(ctx sdk.Context, resourceNode types.ResourceNode)

SetResourceNode sets the main record holding resource node details

func (Keeper) SetResourceNodeBondedToken added in v0.4.0

func (k Keeper) SetResourceNodeBondedToken(ctx sdk.Context, token sdk.Coin)

func (Keeper) SetResourceNodeNotBondedToken added in v0.4.0

func (k Keeper) SetResourceNodeNotBondedToken(ctx sdk.Context, token sdk.Coin)

func (Keeper) SetUnbondingNode added in v0.4.0

func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode)

set the unbonding IndexingNode

func (Keeper) SetUnbondingNodeEntry added in v0.4.0

func (k Keeper) SetUnbondingNodeEntry(ctx sdk.Context, networkAddr sdk.AccAddress, isIndexingNode bool,
	creationHeight int64, minTime time.Time, balance sdk.Int) types.UnbondingNode

SetUnbondingIndexingNodeEntry adds an entry to the unbonding IndexingNode at the given addresses. It creates the unbonding IndexingNode if it does not exist

func (Keeper) SetUnbondingNodeQueueTimeSlice added in v0.4.0

func (k Keeper) SetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time, keys []sdk.AccAddress)

Sets a specific unbonding queue timeslice.

func (Keeper) SubtractIndexingNodeStake

func (k Keeper) SubtractIndexingNodeStake(ctx sdk.Context, indexingNode types.IndexingNode, tokenToSub sdk.Coin) error

SubtractIndexingNodeStake Update the tokens of an existing indexing node

func (Keeper) SubtractResourceNodeStake

func (k Keeper) SubtractResourceNodeStake(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error

SubtractResourceNodeStake Update the tokens of an existing resource node

func (Keeper) SubtractUBDNodeStake added in v0.4.0

func (k Keeper) SubtractUBDNodeStake(ctx sdk.Context, ubd types.UnbondingNode, tokenToSub sdk.Coin) error

func (Keeper) UBDNodeQueueIterator added in v0.4.0

func (k Keeper) UBDNodeQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator

Returns all the validator queue timeslices from time 0 until endTime

func (Keeper) UnbondAllMatureUBDNodeQueue added in v0.4.0

func (k Keeper) UnbondAllMatureUBDNodeQueue(ctx sdk.Context)

Unbonds all the unbonding validators that have finished their unbonding period

func (Keeper) UnbondIndexingNode added in v0.4.0

func (k Keeper) UnbondIndexingNode(
	ctx sdk.Context, indexingNode types.IndexingNode, amt sdk.Int,
) (ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, err error)

func (Keeper) UnbondResourceNode added in v0.4.0

func (k Keeper) UnbondResourceNode(
	ctx sdk.Context, resourceNode types.ResourceNode, amt sdk.Int,
) (ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, err error)

func (Keeper) UnbondingCompletionTime added in v0.4.0

func (k Keeper) UnbondingCompletionTime(ctx sdk.Context) (res time.Duration)

UnbondingCompletionTime

func (Keeper) UnbondingNodeQueueIterator added in v0.4.0

func (k Keeper) UnbondingNodeQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator

Returns all the unbonding queue timeslices from time 0 until endTime

func (Keeper) UnbondingThreasholdTime added in v0.4.0

func (k Keeper) UnbondingThreasholdTime(ctx sdk.Context) (res time.Duration)

UnbondingThreasholdTime

func (Keeper) UpdateIndexingNode added in v0.4.0

func (k Keeper) UpdateIndexingNode(ctx sdk.Context, networkID string, description types.Description,
	networkAddr sdk.AccAddress, ownerAddr sdk.AccAddress) error

func (Keeper) UpdateResourceNode added in v0.4.0

func (k Keeper) UpdateResourceNode(ctx sdk.Context, networkID string, description types.Description, nodeType string,
	networkAddr sdk.AccAddress, ownerAddr sdk.AccAddress) error

type NodesStakingInfo added in v0.4.0

type NodesStakingInfo struct {
	TotalStakeOfResourceNodes sdk.Coin
	TotalStakeOfIndexingNodes sdk.Coin
	TotalBondedStake          sdk.Coin
	TotalUnbondedStake        sdk.Coin
	TotalUnbondingStake       sdk.Coin
}

NodesStakingInfo Params for query 'custom/register/staking'

func NewQueryNodesStakingInfo added in v0.4.0

func NewQueryNodesStakingInfo(
	totalStakeOfResourceNodes,
	totalStakeOfIndexingNodes,
	totalBondedStake,
	totalUnbondedStake,
	totalUnbondingStake sdk.Int,
) NodesStakingInfo

NewQueryNodesStakingInfo creates a new instance of NodesStakingInfo

type QueryNodeStakingParams added in v0.4.0

type QueryNodeStakingParams struct {
	AccAddr sdk.AccAddress
}

func NewQuerynodeStakingParams added in v0.4.0

func NewQuerynodeStakingParams(nodeAddr sdk.AccAddress) QueryNodeStakingParams

NewQuerynodeStakingParams creates a new instance of QueryNodesParams

type QueryNodesParams added in v0.4.0

type QueryNodesParams struct {
	Page      int
	Limit     int
	NetworkID string
	Moniker   string
	OwnerAddr sdk.AccAddress
}

QueryNodesParams Params for query 'custom/register/resource-nodes'

func NewQueryNodesParams added in v0.4.0

func NewQueryNodesParams(page, limit int, networkID, moniker string, ownerAddr sdk.AccAddress) QueryNodesParams

NewQueryNodesParams creates a new instance of QueryNodesParams

type StakingInfoByIndexingNodeAddr added in v0.4.0

type StakingInfoByIndexingNodeAddr struct {
	types.IndexingNode
	BondedStake    sdk.Coin
	UnbondingStake sdk.Coin
	UnbondedStake  sdk.Coin
}

func NewStakingInfoByIndexingNodeAddr added in v0.4.0

func NewStakingInfoByIndexingNodeAddr(
	indexingNode types.IndexingNode,
	unbondingStake sdk.Int,
	unbondedStake sdk.Int,
	bondedStake sdk.Int,
) StakingInfoByIndexingNodeAddr

NewStakingInfoByIndexingNodeAddr creates a new instance of StakingInfoByNodeAddr

type StakingInfoByResourceNodeAddr added in v0.4.0

type StakingInfoByResourceNodeAddr struct {
	types.ResourceNode
	BondedStake    sdk.Coin
	UnbondingStake sdk.Coin
	UnbondedStake  sdk.Coin
}

func NewStakingInfoByResourceNodeAddr added in v0.4.0

func NewStakingInfoByResourceNodeAddr(
	resourceNode types.ResourceNode,
	unbondingStake sdk.Int,
	unbondedStake sdk.Int,
	bondedStake sdk.Int,

) StakingInfoByResourceNodeAddr

NewStakingInfoByResourceNodeAddr creates a new instance of StakingInfoByNodeAddr

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL