Documentation ¶
Index ¶
- func IsLastDaysOfTheMonth(now time.Time, days int) bool
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) CheckDepositAuthorization(ctx sdk.Context, grantee sdk.AccAddress, granter sdk.AccAddress, msg sdk.Msg) error
- func (k Keeper) DepositDenomForSP(ctx sdk.Context) (res string)
- func (k Keeper) Exit(ctx sdk.Context, sp *types.StorageProvider) error
- func (k Keeper) ForceUpdateMaintenanceRecords(ctx sdk.Context)
- func (k Keeper) GetAllSpStoragePrice(ctx sdk.Context) (list []types.SpStoragePrice)
- func (k Keeper) GetAllStorageProviders(ctx sdk.Context) (sps []types.StorageProvider)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetGlobalSpStorePriceByTime(ctx sdk.Context, time int64) (val types.GlobalSpStorePrice, err error)
- func (k Keeper) GetNextSpID(ctx sdk.Context) uint32
- func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)
- func (k Keeper) GetSpStoragePrice(ctx sdk.Context, spId uint32) (val types.SpStoragePrice, found bool)
- func (k Keeper) GetStorageProvider(ctx sdk.Context, id uint32) (sp *types.StorageProvider, found bool)
- func (k Keeper) GetStorageProviderByApprovalAddr(ctx sdk.Context, approvalAddr sdk.AccAddress) (sp *types.StorageProvider, found bool)
- func (k Keeper) GetStorageProviderByBlsKey(ctx sdk.Context, blsPk []byte) (sp *types.StorageProvider, found bool)
- func (k Keeper) GetStorageProviderByFundingAddr(ctx sdk.Context, fundAddr sdk.AccAddress) (sp *types.StorageProvider, found bool)
- func (k Keeper) GetStorageProviderByGcAddr(ctx sdk.Context, gcAddr sdk.AccAddress) (sp *types.StorageProvider, found bool)
- func (k Keeper) GetStorageProviderByOperatorAddr(ctx sdk.Context, opAddr sdk.AccAddress) (sp *types.StorageProvider, found bool)
- func (k Keeper) GetStorageProviderBySealAddr(ctx sdk.Context, sealAddr sdk.AccAddress) (sp *types.StorageProvider, found bool)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MinDeposit(ctx sdk.Context) (res math.Int)
- func (k Keeper) MustGetStorageProvider(ctx sdk.Context, id uint32) *types.StorageProvider
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) QueryGlobalSpStorePriceByTime(goCtx context.Context, req *types.QueryGlobalSpStorePriceByTimeRequest) (*types.QueryGlobalSpStorePriceByTimeResponse, error)
- func (k Keeper) QuerySpStoragePrice(goCtx context.Context, req *types.QuerySpStoragePriceRequest) (*types.QuerySpStoragePriceResponse, error)
- func (k Keeper) SecondarySpStorePriceRatio(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) SetGlobalSpStorePrice(ctx sdk.Context, globalSpStorePrice types.GlobalSpStorePrice)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k Keeper) SetSpStoragePrice(ctx sdk.Context, spStoragePrice types.SpStoragePrice)
- func (k Keeper) SetStorageProvider(ctx sdk.Context, sp *types.StorageProvider)
- func (k Keeper) SetStorageProviderByApprovalAddr(ctx sdk.Context, sp *types.StorageProvider)
- func (k Keeper) SetStorageProviderByBlsKey(ctx sdk.Context, sp *types.StorageProvider)
- func (k Keeper) SetStorageProviderByFundingAddr(ctx sdk.Context, sp *types.StorageProvider)
- func (k Keeper) SetStorageProviderByGcAddr(ctx sdk.Context, sp *types.StorageProvider)
- func (k Keeper) SetStorageProviderByOperatorAddr(ctx sdk.Context, sp *types.StorageProvider)
- func (k Keeper) SetStorageProviderBySealAddr(ctx sdk.Context, sp *types.StorageProvider)
- func (k Keeper) Slash(ctx sdk.Context, spID uint32, rewardInfos []types.RewardInfo) error
- func (k Keeper) StorageProvider(goCtx context.Context, req *types.QueryStorageProviderRequest) (*types.QueryStorageProviderResponse, error)
- func (k Keeper) StorageProviderByOperatorAddress(goCtx context.Context, req *types.QueryStorageProviderByOperatorAddressRequest) (*types.QueryStorageProviderByOperatorAddressResponse, error)
- func (k Keeper) StorageProviderMaintenanceRecordsByOperatorAddress(goCtx context.Context, ...) (*types.QueryStorageProviderMaintenanceRecordsResponse, error)
- func (k Keeper) StorageProviders(goCtx context.Context, req *types.QueryStorageProvidersRequest) (*types.QueryStorageProvidersResponse, error)
- func (k Keeper) UpdateGlobalSpStorePrice(ctx sdk.Context) error
- func (k Keeper) UpdateToInMaintenance(ctx sdk.Context, sp *types.StorageProvider, requestDuration int64) error
- func (k Keeper) UpdateToInService(ctx sdk.Context, sp *types.StorageProvider)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, ak types.AccountKeeper, bk types.BankKeeper, azk types.AuthzKeeper, authority string, ) *Keeper
func (Keeper) CheckDepositAuthorization ¶
func (k Keeper) CheckDepositAuthorization(ctx sdk.Context, grantee sdk.AccAddress, granter sdk.AccAddress, msg sdk.Msg) error
func (Keeper) ForceUpdateMaintenanceRecords ¶ added in v0.2.4
func (Keeper) GetAllSpStoragePrice ¶ added in v0.0.7
func (k Keeper) GetAllSpStoragePrice(ctx sdk.Context) (list []types.SpStoragePrice)
GetAllSpStoragePrice returns all SpStoragePrice
func (Keeper) GetAllStorageProviders ¶
func (k Keeper) GetAllStorageProviders(ctx sdk.Context) (sps []types.StorageProvider)
func (Keeper) GetAuthority ¶ added in v0.2.0
func (Keeper) GetGlobalSpStorePriceByTime ¶ added in v0.2.4
func (Keeper) GetSpStoragePrice ¶ added in v0.0.7
func (k Keeper) GetSpStoragePrice( ctx sdk.Context, spId uint32, ) (val types.SpStoragePrice, found bool)
GetSpStoragePrice returns a SpStoragePrice from its index
func (Keeper) GetStorageProvider ¶
func (Keeper) GetStorageProviderByApprovalAddr ¶ added in v0.0.7
func (k Keeper) GetStorageProviderByApprovalAddr(ctx sdk.Context, approvalAddr sdk.AccAddress) (sp *types.StorageProvider, found bool)
func (Keeper) GetStorageProviderByBlsKey ¶ added in v0.2.3
func (Keeper) GetStorageProviderByFundingAddr ¶ added in v0.0.7
func (k Keeper) GetStorageProviderByFundingAddr(ctx sdk.Context, fundAddr sdk.AccAddress) (sp *types.StorageProvider, found bool)
func (Keeper) GetStorageProviderByGcAddr ¶ added in v0.1.2
func (k Keeper) GetStorageProviderByGcAddr(ctx sdk.Context, gcAddr sdk.AccAddress) (sp *types.StorageProvider, found bool)
func (Keeper) GetStorageProviderByOperatorAddr ¶ added in v0.2.3
func (k Keeper) GetStorageProviderByOperatorAddr(ctx sdk.Context, opAddr sdk.AccAddress) (sp *types.StorageProvider, found bool)
func (Keeper) GetStorageProviderBySealAddr ¶ added in v0.0.7
func (k Keeper) GetStorageProviderBySealAddr(ctx sdk.Context, sealAddr sdk.AccAddress) (sp *types.StorageProvider, found bool)
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
func (Keeper) MustGetStorageProvider ¶ added in v0.2.3
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) QueryGlobalSpStorePriceByTime ¶ added in v0.2.4
func (k Keeper) QueryGlobalSpStorePriceByTime(goCtx context.Context, req *types.QueryGlobalSpStorePriceByTimeRequest) (*types.QueryGlobalSpStorePriceByTimeResponse, error)
func (Keeper) QuerySpStoragePrice ¶ added in v0.2.4
func (k Keeper) QuerySpStoragePrice(goCtx context.Context, req *types.QuerySpStoragePriceRequest) (*types.QuerySpStoragePriceResponse, error)
func (Keeper) SecondarySpStorePriceRatio ¶ added in v0.0.10
func (Keeper) SetGlobalSpStorePrice ¶ added in v0.2.4
func (k Keeper) SetGlobalSpStorePrice(ctx sdk.Context, globalSpStorePrice types.GlobalSpStorePrice)
func (Keeper) SetSpStoragePrice ¶ added in v0.0.7
func (k Keeper) SetSpStoragePrice(ctx sdk.Context, spStoragePrice types.SpStoragePrice)
SetSpStoragePrice set a specific SpStoragePrice in the store from its index
func (Keeper) SetStorageProvider ¶
func (k Keeper) SetStorageProvider(ctx sdk.Context, sp *types.StorageProvider)
func (Keeper) SetStorageProviderByApprovalAddr ¶ added in v0.0.7
func (k Keeper) SetStorageProviderByApprovalAddr(ctx sdk.Context, sp *types.StorageProvider)
func (Keeper) SetStorageProviderByBlsKey ¶ added in v0.2.3
func (k Keeper) SetStorageProviderByBlsKey(ctx sdk.Context, sp *types.StorageProvider)
func (Keeper) SetStorageProviderByFundingAddr ¶ added in v0.0.7
func (k Keeper) SetStorageProviderByFundingAddr(ctx sdk.Context, sp *types.StorageProvider)
func (Keeper) SetStorageProviderByGcAddr ¶ added in v0.1.2
func (k Keeper) SetStorageProviderByGcAddr(ctx sdk.Context, sp *types.StorageProvider)
func (Keeper) SetStorageProviderByOperatorAddr ¶ added in v0.2.3
func (k Keeper) SetStorageProviderByOperatorAddr(ctx sdk.Context, sp *types.StorageProvider)
func (Keeper) SetStorageProviderBySealAddr ¶ added in v0.0.7
func (k Keeper) SetStorageProviderBySealAddr(ctx sdk.Context, sp *types.StorageProvider)
func (Keeper) StorageProvider ¶ added in v0.0.7
func (k Keeper) StorageProvider(goCtx context.Context, req *types.QueryStorageProviderRequest) (*types.QueryStorageProviderResponse, error)
func (Keeper) StorageProviderByOperatorAddress ¶ added in v0.2.3
func (k Keeper) StorageProviderByOperatorAddress(goCtx context.Context, req *types.QueryStorageProviderByOperatorAddressRequest) (*types.QueryStorageProviderByOperatorAddressResponse, error)
func (Keeper) StorageProviderMaintenanceRecordsByOperatorAddress ¶ added in v0.2.4
func (k Keeper) StorageProviderMaintenanceRecordsByOperatorAddress(goCtx context.Context, req *types.QueryStorageProviderMaintenanceRecordsRequest) (*types.QueryStorageProviderMaintenanceRecordsResponse, error)
func (Keeper) StorageProviders ¶
func (k Keeper) StorageProviders(goCtx context.Context, req *types.QueryStorageProvidersRequest) (*types.QueryStorageProvidersResponse, error)
func (Keeper) UpdateGlobalSpStorePrice ¶ added in v0.2.4
UpdateGlobalSpStorePrice calculate the global prices by the median price of all sp store price
func (Keeper) UpdateToInMaintenance ¶ added in v0.2.4
func (Keeper) UpdateToInService ¶ added in v0.2.4
func (k Keeper) UpdateToInService(ctx sdk.Context, sp *types.StorageProvider)
Click to show internal directories.
Click to hide internal directories.