types

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 42 Imported by: 25

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "sp"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_sp"
)
View Source
const (
	TypeMsgCreateStorageProvider = "create_storage_provider"
	TypeMsgEditStorageProvider   = "edit_storage_provider"
	TypeMsgDeposit               = "deposit"
	TypeMsgUpdateSpStoragePrice  = "update_sp_storage_price"
)
View Source
const (
	MaxMonikerLength  = 70
	MaxIdentityLength = 3000
	MaxWebsiteLength  = 140
	MaxDetailsLength  = 280
)
View Source
const (
	// Dafault deposit denom
	DefaultDepositDenom = "BNB"
)

SP params default values

View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

View Source
const DoNotModifyDesc = "[do-not-modify]"

constant used in flags to indicate that description field should not be updated

Variables

View Source
var (
	ErrInvalidLengthAuthz        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAuthz          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAuthz = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	Amino     = codec.NewLegacyAmino()
	ModuleCdc = codec.NewAminoCodec(Amino)
)
View Source
var (
	ErrStorageProviderNotFound           = errors.Register(ModuleName, 1, "StorageProvider does not exist")
	ErrStorageProviderNotInService       = errors.Register(ModuleName, 2, "StorageProvider does not exist")
	ErrStorageProviderOwnerExists        = errors.Register(ModuleName, 3, "StorageProvider already exist for this operator address; must use new StorageProvider operator address")
	ErrInsufficientDepositAmount         = errors.Register(ModuleName, 4, "insufficient deposit amount")
	ErrDepositAccountNotAllowed          = errors.Register(ModuleName, 5, "the deposit address must be the sp address or the fund address of sp.")
	ErrInvalidDepositDenom               = errors.Register(ModuleName, 6, "the deposit address must be the sp address or the fund address of sp.")
	ErrStorageProviderFundingAddrExists  = errors.Register(ModuleName, 7, "StorageProvider already exist for this funding address; must use new StorageProvider funding address.")
	ErrStorageProviderSealAddrExists     = errors.Register(ModuleName, 8, "StorageProvider already exist for this seal address; must use new StorageProvider seal address.")
	ErrStorageProviderApprovalAddrExists = errors.Register(ModuleName, 9, "StorageProvider already exist for this approval address; must use new StorageProvider approval address.")
	ErrStorageProviderPriceExpired       = errors.Register(ModuleName, 10, "StorageProvider price expired")

	ErrSignerNotGovModule  = errors.Register(ModuleName, 40, "signer is not gov module account")
	ErrSignerEmpty         = errors.Register(ModuleName, 41, "signer is empty")
	ErrInvalidEndpointURL  = errors.Register(ModuleName, 42, "Invalid endpoint url")
	ErrSignerNotSPOperator = errors.Register(ModuleName, 43, "signer is not sp operator account")
)

x/sp module sentinel errors

View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	StorageProviderKey               = []byte{0x21} // prefix for each key to a storage provider
	StorageProviderByFundingAddrKey  = []byte{0x22} // prefix for each key to a storage provider index, by funding address
	StorageProviderBySealAddrKey     = []byte{0x23} // prefix for each key to a storage provider index, by seal address
	StorageProviderByApprovalAddrKey = []byte{0x24} // prefix for each key to a storage provider index, by approval address
	SpStoragePriceKeyPrefix          = []byte{0x25}
	SecondarySpStorePriceKeyPrefix   = []byte{0x26}
)
View Source
var (
	KeyMaxStorageProviders = []byte("MaxStorageProviders")
	KeyDepostDenom         = []byte("DepositDenom")
	KeyMinDeposit          = []byte("MinDeposit")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var DefaulMinDeposit = math.NewIntFromBigInt(new(big.Int).Mul(big.NewInt(10000), big.NewInt(1e18)))

DefaultMinDeposit defines the minimum deposit amount for all storage provider

View Source
var (
	// SecondarySpStorePriceRatio shows the ratio of the store price of the secondary sp to the primary sp, the default value is 80%
	SecondarySpStorePriceRatio = sdk.NewDecFromIntWithPrec(sdk.NewInt(8), 1)
)
View Source
var Status_name = map[int32]string{
	0: "STATUS_IN_SERVICE",
	1: "STATUS_IN_JAILED",
	2: "STATUS_GRACEFUL_EXITING",
	3: "STATUS_OUT_OF_SERVICE",
}
View Source
var Status_value = map[string]int32{
	"STATUS_IN_SERVICE":       0,
	"STATUS_IN_JAILED":        1,
	"STATUS_GRACEFUL_EXITING": 2,
	"STATUS_OUT_OF_SERVICE":   3,
}

Functions

func GetStorageProviderByApprovalAddrKey added in v0.0.7

func GetStorageProviderByApprovalAddrKey(spAddr sdk.AccAddress) []byte

GetStorageProviderByApprovalAddrKey creates the key for the storage provider with approval address VALUE: storage provider operator address ([]byte)

func GetStorageProviderByFundingAddrKey added in v0.0.7

func GetStorageProviderByFundingAddrKey(spAddr sdk.AccAddress) []byte

GetStorageProviderByFundingAddrKey creates the key for the storage provider with funding address VALUE: storage provider operator address ([]byte)

func GetStorageProviderBySealAddrKey added in v0.0.7

func GetStorageProviderBySealAddrKey(spAddr sdk.AccAddress) []byte

GetStorageProviderBySealAddrKey creates the key for the storage provider with seal address VALUE: storage provider operator address ([]byte)

func GetStorageProviderKey

func GetStorageProviderKey(spAddr sdk.AccAddress) []byte

GetStorageProviderKey creates the key for the provider with address VALUE: staking/Validator

func IsValidEndpointURL added in v0.0.7

func IsValidEndpointURL(endpointURL string) error

Verify if input endpoint URL is valid.

func KeyPrefix

func KeyPrefix(p string) []byte

func MustMarshalStorageProvider

func MustMarshalStorageProvider(cdc codec.BinaryCodec, sp *StorageProvider) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func ParseSecondarySpStorePriceKey added in v0.0.7

func ParseSecondarySpStorePriceKey(key []byte) (updateTime int64)

func ParseSpStoragePriceKey added in v0.0.7

func ParseSpStoragePriceKey(key []byte) (spAddr string, updateTime int64)

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func SecondarySpStorePriceKey added in v0.0.7

func SecondarySpStorePriceKey(
	updateTime int64,
) []byte

func SpStoragePriceKey added in v0.0.7

func SpStoragePriceKey(
	sp string,
	updateTime int64,
) []byte

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
	// Methods imported from account should be defined here
	IterateAccounts(ctx sdk.Context, process func(authtypes.AccountI) (stop bool))

	GetModuleAddress(name string) sdk.AccAddress
	GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI

	SetModuleAccount(sdk.Context, authtypes.ModuleAccountI)
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type AuthzKeeper

type AuthzKeeper interface {
	GetGrant(ctx sdk.Context, grantee sdk.AccAddress, granter sdk.AccAddress, msgType string) (grant authz.Grant, found bool)
	Update(ctx sdk.Context, grantee sdk.AccAddress, granter sdk.AccAddress, updated authz.Authorization) error
	DeleteGrant(ctx sdk.Context, grantee sdk.AccAddress, granter sdk.AccAddress, msgType string) error
}

type BankKeeper

type BankKeeper interface {
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

	// Methods imported from bank should be defined here
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
}

BankKeeper defines the expected interface needed to retrieve account balances.

type DepositAuthorization

type DepositAuthorization struct {
	// max_deposit specifies the maximum amount of tokens can be deposit to a storage provider. If it is
	// empty, there is no spend limit and any amount of coins can be deposit.
	MaxDeposit *types.Coin `protobuf:"bytes,1,opt,name=max_deposit,json=maxDeposit,proto3" json:"max_deposit,omitempty"`
	// sp_address is the operator address of storage provider.
	SpAddress string `protobuf:"bytes,2,opt,name=sp_address,json=spAddress,proto3" json:"sp_address,omitempty"`
}

DepositAuthorization defines authorization for sp deposit.

Since: cosmos-sdk 0.43

func NewDepositAuthorization

func NewDepositAuthorization(spAddress sdk.AccAddress, amount *sdk.Coin) (*DepositAuthorization, error)

NewDepositAuthorization creates a new DepositAuthorization object.

func (DepositAuthorization) Accept

Accept implements Authorization.Accept.

func (*DepositAuthorization) Descriptor

func (*DepositAuthorization) Descriptor() ([]byte, []int)

func (*DepositAuthorization) GetMaxDeposit

func (m *DepositAuthorization) GetMaxDeposit() *types.Coin

func (*DepositAuthorization) GetSpAddress

func (m *DepositAuthorization) GetSpAddress() string

func (*DepositAuthorization) Marshal

func (m *DepositAuthorization) Marshal() (dAtA []byte, err error)

func (*DepositAuthorization) MarshalTo

func (m *DepositAuthorization) MarshalTo(dAtA []byte) (int, error)

func (*DepositAuthorization) MarshalToSizedBuffer

func (m *DepositAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DepositAuthorization) MsgTypeURL

func (a DepositAuthorization) MsgTypeURL() string

MsgTypeURL implements Authorization.MsgTypeURL.

func (*DepositAuthorization) ProtoMessage

func (*DepositAuthorization) ProtoMessage()

func (*DepositAuthorization) Reset

func (m *DepositAuthorization) Reset()

func (*DepositAuthorization) Size

func (m *DepositAuthorization) Size() (n int)

func (*DepositAuthorization) String

func (m *DepositAuthorization) String() string

func (*DepositAuthorization) Unmarshal

func (m *DepositAuthorization) Unmarshal(dAtA []byte) error

func (DepositAuthorization) ValidateBasic

func (a DepositAuthorization) ValidateBasic() error

ValidateBasic implements Authorization.ValidateBasic.

func (*DepositAuthorization) XXX_DiscardUnknown

func (m *DepositAuthorization) XXX_DiscardUnknown()

func (*DepositAuthorization) XXX_Marshal

func (m *DepositAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DepositAuthorization) XXX_Merge

func (m *DepositAuthorization) XXX_Merge(src proto.Message)

func (*DepositAuthorization) XXX_Size

func (m *DepositAuthorization) XXX_Size() int

func (*DepositAuthorization) XXX_Unmarshal

func (m *DepositAuthorization) XXX_Unmarshal(b []byte) error

type Description

type Description struct {
	// moniker defines a human-readable name for the storage provider
	Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"`
	// identity defines an optional identity signature (ex. UPort or Keybase).
	Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
	// website defines an optional website link.
	Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"`
	// security_contact defines an optional email for security contact.
	SecurityContact string `protobuf:"bytes,4,opt,name=security_contact,json=securityContact,proto3" json:"security_contact,omitempty"`
	// details define other optional details.
	Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"`
}

Description defines a storage provider description.

func NewDescription

func NewDescription(moniker, identity, website, details string) Description

func (*Description) Descriptor

func (*Description) Descriptor() ([]byte, []int)

func (Description) EnsureLength

func (d Description) EnsureLength() (Description, error)

EnsureLength ensures the length of a validator's description.

func (*Description) Equal

func (this *Description) Equal(that interface{}) bool

func (*Description) GetDetails

func (m *Description) GetDetails() string

func (*Description) GetIdentity

func (m *Description) GetIdentity() string

func (*Description) GetMoniker

func (m *Description) GetMoniker() string

func (*Description) GetSecurityContact

func (m *Description) GetSecurityContact() string

func (*Description) GetWebsite

func (m *Description) GetWebsite() string

func (*Description) Marshal

func (m *Description) Marshal() (dAtA []byte, err error)

func (*Description) MarshalTo

func (m *Description) MarshalTo(dAtA []byte) (int, error)

func (*Description) MarshalToSizedBuffer

func (m *Description) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Description) ProtoMessage

func (*Description) ProtoMessage()

func (*Description) Reset

func (m *Description) Reset()

func (*Description) Size

func (m *Description) Size() (n int)

func (Description) String

func (d Description) String() string

func (*Description) Unmarshal

func (m *Description) Unmarshal(dAtA []byte) error

func (Description) UpdateDescription

func (d Description) UpdateDescription(d2 Description) (Description, error)

func (*Description) XXX_DiscardUnknown

func (m *Description) XXX_DiscardUnknown()

func (*Description) XXX_Marshal

func (m *Description) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Description) XXX_Merge

func (m *Description) XXX_Merge(src proto.Message)

func (*Description) XXX_Size

func (m *Description) XXX_Size() int

func (*Description) XXX_Unmarshal

func (m *Description) XXX_Unmarshal(b []byte) error

type EventCreateStorageProvider

type EventCreateStorageProvider struct {
	// sp_address is the operator address of the storage provider
	SpAddress string `protobuf:"bytes,1,opt,name=sp_address,json=spAddress,proto3" json:"sp_address,omitempty"`
	// funding_address is the funding account address of the storage provider
	FundingAddress string `protobuf:"bytes,2,opt,name=funding_address,json=fundingAddress,proto3" json:"funding_address,omitempty"`
	// seal_address is the account address for SealObject Tx
	SealAddress string `protobuf:"bytes,3,opt,name=seal_address,json=sealAddress,proto3" json:"seal_address,omitempty"`
	// approval_address is the account address for approve create bucket/object signature
	ApprovalAddress string `protobuf:"bytes,4,opt,name=approval_address,json=approvalAddress,proto3" json:"approval_address,omitempty"`
	// endpoint is the domain name address used by SP to provide storage services
	Endpoint string `protobuf:"bytes,5,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// total_deposit is the token coin that the storage provider deposit to the storage module
	TotalDeposit string `protobuf:"bytes,6,opt,name=total_deposit,json=totalDeposit,proto3" json:"total_deposit,omitempty"`
}

EventCreateStorageProvider is emitted when there is a storage provider created

func (*EventCreateStorageProvider) Descriptor

func (*EventCreateStorageProvider) Descriptor() ([]byte, []int)

func (*EventCreateStorageProvider) GetApprovalAddress

func (m *EventCreateStorageProvider) GetApprovalAddress() string

func (*EventCreateStorageProvider) GetEndpoint

func (m *EventCreateStorageProvider) GetEndpoint() string

func (*EventCreateStorageProvider) GetFundingAddress

func (m *EventCreateStorageProvider) GetFundingAddress() string

func (*EventCreateStorageProvider) GetSealAddress

func (m *EventCreateStorageProvider) GetSealAddress() string

func (*EventCreateStorageProvider) GetSpAddress

func (m *EventCreateStorageProvider) GetSpAddress() string

func (*EventCreateStorageProvider) GetTotalDeposit

func (m *EventCreateStorageProvider) GetTotalDeposit() string

func (*EventCreateStorageProvider) Marshal

func (m *EventCreateStorageProvider) Marshal() (dAtA []byte, err error)

func (*EventCreateStorageProvider) MarshalTo

func (m *EventCreateStorageProvider) MarshalTo(dAtA []byte) (int, error)

func (*EventCreateStorageProvider) MarshalToSizedBuffer

func (m *EventCreateStorageProvider) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventCreateStorageProvider) ProtoMessage

func (*EventCreateStorageProvider) ProtoMessage()

func (*EventCreateStorageProvider) Reset

func (m *EventCreateStorageProvider) Reset()

func (*EventCreateStorageProvider) Size

func (m *EventCreateStorageProvider) Size() (n int)

func (*EventCreateStorageProvider) String

func (m *EventCreateStorageProvider) String() string

func (*EventCreateStorageProvider) Unmarshal

func (m *EventCreateStorageProvider) Unmarshal(dAtA []byte) error

func (*EventCreateStorageProvider) XXX_DiscardUnknown

func (m *EventCreateStorageProvider) XXX_DiscardUnknown()

func (*EventCreateStorageProvider) XXX_Marshal

func (m *EventCreateStorageProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventCreateStorageProvider) XXX_Merge

func (m *EventCreateStorageProvider) XXX_Merge(src proto.Message)

func (*EventCreateStorageProvider) XXX_Size

func (m *EventCreateStorageProvider) XXX_Size() int

func (*EventCreateStorageProvider) XXX_Unmarshal

func (m *EventCreateStorageProvider) XXX_Unmarshal(b []byte) error

type EventDeposit

type EventDeposit struct {
	// sp_address is the account address of storage provider
	SpAddress string `protobuf:"bytes,1,opt,name=sp_address,json=spAddress,proto3" json:"sp_address,omitempty"`
	// deposit is the token coin deposited this message
	Deposit string `protobuf:"bytes,2,opt,name=deposit,proto3" json:"deposit,omitempty"`
	// total_deposit is the total token coins this storage provider deposited
	TotalDeposit string `protobuf:"bytes,3,opt,name=total_deposit,json=totalDeposit,proto3" json:"total_deposit,omitempty"`
}

EventDeposit is emitted when sp deposit tokens.

func (*EventDeposit) Descriptor

func (*EventDeposit) Descriptor() ([]byte, []int)

func (*EventDeposit) GetDeposit

func (m *EventDeposit) GetDeposit() string

func (*EventDeposit) GetSpAddress

func (m *EventDeposit) GetSpAddress() string

func (*EventDeposit) GetTotalDeposit

func (m *EventDeposit) GetTotalDeposit() string

func (*EventDeposit) Marshal

func (m *EventDeposit) Marshal() (dAtA []byte, err error)

func (*EventDeposit) MarshalTo

func (m *EventDeposit) MarshalTo(dAtA []byte) (int, error)

func (*EventDeposit) MarshalToSizedBuffer

func (m *EventDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventDeposit) ProtoMessage

func (*EventDeposit) ProtoMessage()

func (*EventDeposit) Reset

func (m *EventDeposit) Reset()

func (*EventDeposit) Size

func (m *EventDeposit) Size() (n int)

func (*EventDeposit) String

func (m *EventDeposit) String() string

func (*EventDeposit) Unmarshal

func (m *EventDeposit) Unmarshal(dAtA []byte) error

func (*EventDeposit) XXX_DiscardUnknown

func (m *EventDeposit) XXX_DiscardUnknown()

func (*EventDeposit) XXX_Marshal

func (m *EventDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventDeposit) XXX_Merge

func (m *EventDeposit) XXX_Merge(src proto.Message)

func (*EventDeposit) XXX_Size

func (m *EventDeposit) XXX_Size() int

func (*EventDeposit) XXX_Unmarshal

func (m *EventDeposit) XXX_Unmarshal(b []byte) error

type EventEditStorageProvider

type EventEditStorageProvider struct {
	// old_endpoint is the service endpoint of the storage provider before edit
	OldEndpoint string `protobuf:"bytes,1,opt,name=old_endpoint,json=oldEndpoint,proto3" json:"old_endpoint,omitempty"`
	// new_endpoint is the service endpoint of the storage provider after edit
	NewEndpoint string `protobuf:"bytes,2,opt,name=new_endpoint,json=newEndpoint,proto3" json:"new_endpoint,omitempty"`
}

EventEditStorageProvider is emitted when SP's metadata is edited.

func (*EventEditStorageProvider) Descriptor

func (*EventEditStorageProvider) Descriptor() ([]byte, []int)

func (*EventEditStorageProvider) GetNewEndpoint

func (m *EventEditStorageProvider) GetNewEndpoint() string

func (*EventEditStorageProvider) GetOldEndpoint

func (m *EventEditStorageProvider) GetOldEndpoint() string

func (*EventEditStorageProvider) Marshal

func (m *EventEditStorageProvider) Marshal() (dAtA []byte, err error)

func (*EventEditStorageProvider) MarshalTo

func (m *EventEditStorageProvider) MarshalTo(dAtA []byte) (int, error)

func (*EventEditStorageProvider) MarshalToSizedBuffer

func (m *EventEditStorageProvider) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventEditStorageProvider) ProtoMessage

func (*EventEditStorageProvider) ProtoMessage()

func (*EventEditStorageProvider) Reset

func (m *EventEditStorageProvider) Reset()

func (*EventEditStorageProvider) Size

func (m *EventEditStorageProvider) Size() (n int)

func (*EventEditStorageProvider) String

func (m *EventEditStorageProvider) String() string

func (*EventEditStorageProvider) Unmarshal

func (m *EventEditStorageProvider) Unmarshal(dAtA []byte) error

func (*EventEditStorageProvider) XXX_DiscardUnknown

func (m *EventEditStorageProvider) XXX_DiscardUnknown()

func (*EventEditStorageProvider) XXX_Marshal

func (m *EventEditStorageProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventEditStorageProvider) XXX_Merge

func (m *EventEditStorageProvider) XXX_Merge(src proto.Message)

func (*EventEditStorageProvider) XXX_Size

func (m *EventEditStorageProvider) XXX_Size() int

func (*EventEditStorageProvider) XXX_Unmarshal

func (m *EventEditStorageProvider) XXX_Unmarshal(b []byte) error

type EventSecondarySpStorePriceUpdate added in v0.0.7

type EventSecondarySpStorePriceUpdate struct {
	// update time, in unix timestamp
	UpdateTime int64 `protobuf:"varint,1,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// store price, in bnb wei per charge byte
	StorePrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 131-byte string literal not displayed */
}

func (*EventSecondarySpStorePriceUpdate) Descriptor added in v0.0.7

func (*EventSecondarySpStorePriceUpdate) Descriptor() ([]byte, []int)

func (*EventSecondarySpStorePriceUpdate) GetUpdateTime added in v0.0.7

func (m *EventSecondarySpStorePriceUpdate) GetUpdateTime() int64

func (*EventSecondarySpStorePriceUpdate) Marshal added in v0.0.7

func (m *EventSecondarySpStorePriceUpdate) Marshal() (dAtA []byte, err error)

func (*EventSecondarySpStorePriceUpdate) MarshalTo added in v0.0.7

func (m *EventSecondarySpStorePriceUpdate) MarshalTo(dAtA []byte) (int, error)

func (*EventSecondarySpStorePriceUpdate) MarshalToSizedBuffer added in v0.0.7

func (m *EventSecondarySpStorePriceUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventSecondarySpStorePriceUpdate) ProtoMessage added in v0.0.7

func (*EventSecondarySpStorePriceUpdate) ProtoMessage()

func (*EventSecondarySpStorePriceUpdate) Reset added in v0.0.7

func (*EventSecondarySpStorePriceUpdate) Size added in v0.0.7

func (m *EventSecondarySpStorePriceUpdate) Size() (n int)

func (*EventSecondarySpStorePriceUpdate) String added in v0.0.7

func (*EventSecondarySpStorePriceUpdate) Unmarshal added in v0.0.7

func (m *EventSecondarySpStorePriceUpdate) Unmarshal(dAtA []byte) error

func (*EventSecondarySpStorePriceUpdate) XXX_DiscardUnknown added in v0.0.7

func (m *EventSecondarySpStorePriceUpdate) XXX_DiscardUnknown()

func (*EventSecondarySpStorePriceUpdate) XXX_Marshal added in v0.0.7

func (m *EventSecondarySpStorePriceUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventSecondarySpStorePriceUpdate) XXX_Merge added in v0.0.7

func (*EventSecondarySpStorePriceUpdate) XXX_Size added in v0.0.7

func (m *EventSecondarySpStorePriceUpdate) XXX_Size() int

func (*EventSecondarySpStorePriceUpdate) XXX_Unmarshal added in v0.0.7

func (m *EventSecondarySpStorePriceUpdate) XXX_Unmarshal(b []byte) error

type EventSpStoragePriceUpdate added in v0.0.7

type EventSpStoragePriceUpdate struct {
	// sp address
	SpAddress string `protobuf:"bytes,1,opt,name=sp_address,json=spAddress,proto3" json:"sp_address,omitempty"`
	// update time, in unix timestamp
	UpdateTime int64 `protobuf:"varint,2,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// read price, in bnb wei per charge byte
	ReadPrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */
	// free read quota, in byte
	FreeReadQuota uint64 `protobuf:"varint,4,opt,name=free_read_quota,json=freeReadQuota,proto3" json:"free_read_quota,omitempty"`
	// store price, in bnb wei per charge byte
	StorePrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 131-byte string literal not displayed */
}

func (*EventSpStoragePriceUpdate) Descriptor added in v0.0.7

func (*EventSpStoragePriceUpdate) Descriptor() ([]byte, []int)

func (*EventSpStoragePriceUpdate) GetFreeReadQuota added in v0.0.7

func (m *EventSpStoragePriceUpdate) GetFreeReadQuota() uint64

func (*EventSpStoragePriceUpdate) GetSpAddress added in v0.0.7

func (m *EventSpStoragePriceUpdate) GetSpAddress() string

func (*EventSpStoragePriceUpdate) GetUpdateTime added in v0.0.7

func (m *EventSpStoragePriceUpdate) GetUpdateTime() int64

func (*EventSpStoragePriceUpdate) Marshal added in v0.0.7

func (m *EventSpStoragePriceUpdate) Marshal() (dAtA []byte, err error)

func (*EventSpStoragePriceUpdate) MarshalTo added in v0.0.7

func (m *EventSpStoragePriceUpdate) MarshalTo(dAtA []byte) (int, error)

func (*EventSpStoragePriceUpdate) MarshalToSizedBuffer added in v0.0.7

func (m *EventSpStoragePriceUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventSpStoragePriceUpdate) ProtoMessage added in v0.0.7

func (*EventSpStoragePriceUpdate) ProtoMessage()

func (*EventSpStoragePriceUpdate) Reset added in v0.0.7

func (m *EventSpStoragePriceUpdate) Reset()

func (*EventSpStoragePriceUpdate) Size added in v0.0.7

func (m *EventSpStoragePriceUpdate) Size() (n int)

func (*EventSpStoragePriceUpdate) String added in v0.0.7

func (m *EventSpStoragePriceUpdate) String() string

func (*EventSpStoragePriceUpdate) Unmarshal added in v0.0.7

func (m *EventSpStoragePriceUpdate) Unmarshal(dAtA []byte) error

func (*EventSpStoragePriceUpdate) XXX_DiscardUnknown added in v0.0.7

func (m *EventSpStoragePriceUpdate) XXX_DiscardUnknown()

func (*EventSpStoragePriceUpdate) XXX_Marshal added in v0.0.7

func (m *EventSpStoragePriceUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventSpStoragePriceUpdate) XXX_Merge added in v0.0.7

func (m *EventSpStoragePriceUpdate) XXX_Merge(src proto.Message)

func (*EventSpStoragePriceUpdate) XXX_Size added in v0.0.7

func (m *EventSpStoragePriceUpdate) XXX_Size() int

func (*EventSpStoragePriceUpdate) XXX_Unmarshal added in v0.0.7

func (m *EventSpStoragePriceUpdate) XXX_Unmarshal(b []byte) error

type GenesisState

type GenesisState struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// this used by starport scaffolding # genesis/proto/state
	StorageProviders   []StorageProvider `protobuf:"bytes,2,rep,name=storage_providers,json=storageProviders,proto3" json:"storage_providers"`
	SpStoragePriceList []SpStoragePrice  `protobuf:"bytes,3,rep,name=sp_storage_price_list,json=spStoragePriceList,proto3" json:"sp_storage_price_list"`
}

GenesisState defines the sp module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetSpStoragePriceList added in v0.0.7

func (m *GenesisState) GetSpStoragePriceList() []SpStoragePrice

func (*GenesisState) GetStorageProviders

func (m *GenesisState) GetStorageProviders() []StorageProvider

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	CreateStorageProvider(ctx context.Context, in *MsgCreateStorageProvider, opts ...grpc.CallOption) (*MsgCreateStorageProviderResponse, error)
	Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error)
	EditStorageProvider(ctx context.Context, in *MsgEditStorageProvider, opts ...grpc.CallOption) (*MsgEditStorageProviderResponse, error)
	UpdateSpStoragePrice(ctx context.Context, in *MsgUpdateSpStoragePrice, opts ...grpc.CallOption) (*MsgUpdateSpStoragePriceResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgCreateStorageProvider

type MsgCreateStorageProvider struct {
	Creator         string      `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Description     Description `protobuf:"bytes,2,opt,name=description,proto3" json:"description"`
	SpAddress       string      `protobuf:"bytes,3,opt,name=sp_address,json=spAddress,proto3" json:"sp_address,omitempty"`
	FundingAddress  string      `protobuf:"bytes,4,opt,name=funding_address,json=fundingAddress,proto3" json:"funding_address,omitempty"`
	SealAddress     string      `protobuf:"bytes,5,opt,name=seal_address,json=sealAddress,proto3" json:"seal_address,omitempty"`
	ApprovalAddress string      `protobuf:"bytes,6,opt,name=approval_address,json=approvalAddress,proto3" json:"approval_address,omitempty"`
	Endpoint        string      `protobuf:"bytes,7,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	Deposit         types.Coin  `protobuf:"bytes,8,opt,name=deposit,proto3" json:"deposit"`
	// read price, in bnb wei per charge byte
	ReadPrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */
	// free read quota, in byte
	FreeReadQuota uint64 `protobuf:"varint,10,opt,name=free_read_quota,json=freeReadQuota,proto3" json:"free_read_quota,omitempty"`
	// store price, in bnb wei per charge byte
	StorePrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 132-byte string literal not displayed */
}

MsgCreateStorageProvider defines message for creating a new storage provider.

func NewMsgCreateStorageProvider

func NewMsgCreateStorageProvider(
	creator sdk.AccAddress, SpAddress sdk.AccAddress, fundingAddress sdk.AccAddress,
	sealAddress sdk.AccAddress, approvalAddress sdk.AccAddress,
	description Description, endpoint string, deposit sdk.Coin, readPrice sdk.Dec, freeReadQuota uint64, storePrice sdk.Dec) (*MsgCreateStorageProvider, error)

NewMsgCreateStorageProvider creates a new MsgCreateStorageProvider instance. creator is the module account of gov module SpAddress is the account address of storage provider fundAddress is another accoutn address of storage provider which used to deposit or rewarding

func (*MsgCreateStorageProvider) Descriptor

func (*MsgCreateStorageProvider) Descriptor() ([]byte, []int)

func (*MsgCreateStorageProvider) GetApprovalAddress

func (m *MsgCreateStorageProvider) GetApprovalAddress() string

func (*MsgCreateStorageProvider) GetCreator

func (m *MsgCreateStorageProvider) GetCreator() string

func (*MsgCreateStorageProvider) GetDeposit

func (m *MsgCreateStorageProvider) GetDeposit() types.Coin

func (*MsgCreateStorageProvider) GetDescription

func (m *MsgCreateStorageProvider) GetDescription() Description

func (*MsgCreateStorageProvider) GetEndpoint

func (m *MsgCreateStorageProvider) GetEndpoint() string

func (*MsgCreateStorageProvider) GetFreeReadQuota added in v0.0.7

func (m *MsgCreateStorageProvider) GetFreeReadQuota() uint64

func (*MsgCreateStorageProvider) GetFundingAddress

func (m *MsgCreateStorageProvider) GetFundingAddress() string

func (*MsgCreateStorageProvider) GetSealAddress

func (m *MsgCreateStorageProvider) GetSealAddress() string

func (*MsgCreateStorageProvider) GetSignBytes

func (msg *MsgCreateStorageProvider) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (*MsgCreateStorageProvider) GetSigners

func (msg *MsgCreateStorageProvider) GetSigners() []sdk.AccAddress

GetSigners implements the sdk.Msg interface.

func (*MsgCreateStorageProvider) GetSpAddress

func (m *MsgCreateStorageProvider) GetSpAddress() string

func (*MsgCreateStorageProvider) Marshal

func (m *MsgCreateStorageProvider) Marshal() (dAtA []byte, err error)

func (*MsgCreateStorageProvider) MarshalTo

func (m *MsgCreateStorageProvider) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateStorageProvider) MarshalToSizedBuffer

func (m *MsgCreateStorageProvider) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateStorageProvider) ProtoMessage

func (*MsgCreateStorageProvider) ProtoMessage()

func (*MsgCreateStorageProvider) Reset

func (m *MsgCreateStorageProvider) Reset()

func (*MsgCreateStorageProvider) Route

func (msg *MsgCreateStorageProvider) Route() string

Route implements the sdk.Msg interface.

func (*MsgCreateStorageProvider) Size

func (m *MsgCreateStorageProvider) Size() (n int)

func (*MsgCreateStorageProvider) String

func (m *MsgCreateStorageProvider) String() string

func (*MsgCreateStorageProvider) Type

func (msg *MsgCreateStorageProvider) Type() string

Type implements the sdk.Msg interface.

func (*MsgCreateStorageProvider) Unmarshal

func (m *MsgCreateStorageProvider) Unmarshal(dAtA []byte) error

func (*MsgCreateStorageProvider) ValidateBasic

func (msg *MsgCreateStorageProvider) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface.

func (*MsgCreateStorageProvider) XXX_DiscardUnknown

func (m *MsgCreateStorageProvider) XXX_DiscardUnknown()

func (*MsgCreateStorageProvider) XXX_Marshal

func (m *MsgCreateStorageProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateStorageProvider) XXX_Merge

func (m *MsgCreateStorageProvider) XXX_Merge(src proto.Message)

func (*MsgCreateStorageProvider) XXX_Size

func (m *MsgCreateStorageProvider) XXX_Size() int

func (*MsgCreateStorageProvider) XXX_Unmarshal

func (m *MsgCreateStorageProvider) XXX_Unmarshal(b []byte) error

type MsgCreateStorageProviderResponse

type MsgCreateStorageProviderResponse struct {
}

MsgCreateStorageProviderResponse defines the Msg/CreateStorageProvider response type.

func (*MsgCreateStorageProviderResponse) Descriptor

func (*MsgCreateStorageProviderResponse) Descriptor() ([]byte, []int)

func (*MsgCreateStorageProviderResponse) Marshal

func (m *MsgCreateStorageProviderResponse) Marshal() (dAtA []byte, err error)

func (*MsgCreateStorageProviderResponse) MarshalTo

func (m *MsgCreateStorageProviderResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateStorageProviderResponse) MarshalToSizedBuffer

func (m *MsgCreateStorageProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateStorageProviderResponse) ProtoMessage

func (*MsgCreateStorageProviderResponse) ProtoMessage()

func (*MsgCreateStorageProviderResponse) Reset

func (*MsgCreateStorageProviderResponse) Size

func (m *MsgCreateStorageProviderResponse) Size() (n int)

func (*MsgCreateStorageProviderResponse) String

func (*MsgCreateStorageProviderResponse) Unmarshal

func (m *MsgCreateStorageProviderResponse) Unmarshal(dAtA []byte) error

func (*MsgCreateStorageProviderResponse) XXX_DiscardUnknown

func (m *MsgCreateStorageProviderResponse) XXX_DiscardUnknown()

func (*MsgCreateStorageProviderResponse) XXX_Marshal

func (m *MsgCreateStorageProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateStorageProviderResponse) XXX_Merge

func (*MsgCreateStorageProviderResponse) XXX_Size

func (m *MsgCreateStorageProviderResponse) XXX_Size() int

func (*MsgCreateStorageProviderResponse) XXX_Unmarshal

func (m *MsgCreateStorageProviderResponse) XXX_Unmarshal(b []byte) error

type MsgDeposit

type MsgDeposit struct {
	// creator is the msg signer, it should be sp address or sp's fund address
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// sp_address is the operator address of sp
	SpAddress string `protobuf:"bytes,2,opt,name=sp_address,json=spAddress,proto3" json:"sp_address,omitempty"`
	// deposit is a mount of token which used to deposit for SP
	Deposit types.Coin `protobuf:"bytes,3,opt,name=deposit,proto3" json:"deposit"`
}

MsgDeposit defines a SDK message for deposit token for sp.

func NewMsgDeposit

func NewMsgDeposit(creator sdk.AccAddress, spAddress sdk.AccAddress, deposit sdk.Coin) *MsgDeposit

NewMsgDeposit creates a new MsgDeposit instance

func (*MsgDeposit) Descriptor

func (*MsgDeposit) Descriptor() ([]byte, []int)

func (*MsgDeposit) GetCreator

func (m *MsgDeposit) GetCreator() string

func (*MsgDeposit) GetDeposit

func (m *MsgDeposit) GetDeposit() types.Coin

func (*MsgDeposit) GetSignBytes

func (msg *MsgDeposit) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (*MsgDeposit) GetSigners

func (msg *MsgDeposit) GetSigners() []sdk.AccAddress

GetSigners implements the sdk.Msg interface.

func (*MsgDeposit) GetSpAddress

func (m *MsgDeposit) GetSpAddress() string

func (*MsgDeposit) Marshal

func (m *MsgDeposit) Marshal() (dAtA []byte, err error)

func (*MsgDeposit) MarshalTo

func (m *MsgDeposit) MarshalTo(dAtA []byte) (int, error)

func (*MsgDeposit) MarshalToSizedBuffer

func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgDeposit) ProtoMessage

func (*MsgDeposit) ProtoMessage()

func (*MsgDeposit) Reset

func (m *MsgDeposit) Reset()

func (*MsgDeposit) Route

func (msg *MsgDeposit) Route() string

Route implements the sdk.Msg interface.

func (*MsgDeposit) Size

func (m *MsgDeposit) Size() (n int)

func (*MsgDeposit) String

func (m *MsgDeposit) String() string

func (*MsgDeposit) Type

func (msg *MsgDeposit) Type() string

Type implements the sdk.Msg interface.

func (*MsgDeposit) Unmarshal

func (m *MsgDeposit) Unmarshal(dAtA []byte) error

func (*MsgDeposit) ValidateBasic

func (msg *MsgDeposit) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface.

func (*MsgDeposit) XXX_DiscardUnknown

func (m *MsgDeposit) XXX_DiscardUnknown()

func (*MsgDeposit) XXX_Marshal

func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgDeposit) XXX_Merge

func (m *MsgDeposit) XXX_Merge(src proto.Message)

func (*MsgDeposit) XXX_Size

func (m *MsgDeposit) XXX_Size() int

func (*MsgDeposit) XXX_Unmarshal

func (m *MsgDeposit) XXX_Unmarshal(b []byte) error

type MsgDepositResponse

type MsgDepositResponse struct {
}

MsgDepositResponse defines the Msg/Deposit response type.

func (*MsgDepositResponse) Descriptor

func (*MsgDepositResponse) Descriptor() ([]byte, []int)

func (*MsgDepositResponse) Marshal

func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error)

func (*MsgDepositResponse) MarshalTo

func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgDepositResponse) MarshalToSizedBuffer

func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgDepositResponse) ProtoMessage

func (*MsgDepositResponse) ProtoMessage()

func (*MsgDepositResponse) Reset

func (m *MsgDepositResponse) Reset()

func (*MsgDepositResponse) Size

func (m *MsgDepositResponse) Size() (n int)

func (*MsgDepositResponse) String

func (m *MsgDepositResponse) String() string

func (*MsgDepositResponse) Unmarshal

func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error

func (*MsgDepositResponse) XXX_DiscardUnknown

func (m *MsgDepositResponse) XXX_DiscardUnknown()

func (*MsgDepositResponse) XXX_Marshal

func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgDepositResponse) XXX_Merge

func (m *MsgDepositResponse) XXX_Merge(src proto.Message)

func (*MsgDepositResponse) XXX_Size

func (m *MsgDepositResponse) XXX_Size() int

func (*MsgDepositResponse) XXX_Unmarshal

func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error

type MsgEditStorageProvider

type MsgEditStorageProvider struct {
	SpAddress   string      `protobuf:"bytes,1,opt,name=sp_address,json=spAddress,proto3" json:"sp_address,omitempty"`
	Endpoint    string      `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	Description Description `protobuf:"bytes,3,opt,name=description,proto3" json:"description"`
}

MsgEditStorageProvider defines a SDK message for editing an existing sp.

func NewMsgEditStorageProvider

func NewMsgEditStorageProvider(spAddress sdk.AccAddress, endpoint string, description Description) *MsgEditStorageProvider

NewMsgEditStorageProvider creates a new MsgEditStorageProvider instance TODO(fynn): add morer modifiable items if needed.

func (*MsgEditStorageProvider) Descriptor

func (*MsgEditStorageProvider) Descriptor() ([]byte, []int)

func (*MsgEditStorageProvider) GetDescription

func (m *MsgEditStorageProvider) GetDescription() Description

func (*MsgEditStorageProvider) GetEndpoint

func (m *MsgEditStorageProvider) GetEndpoint() string

func (*MsgEditStorageProvider) GetSignBytes

func (msg *MsgEditStorageProvider) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (*MsgEditStorageProvider) GetSigners

func (msg *MsgEditStorageProvider) GetSigners() []sdk.AccAddress

GetSigners implements the sdk.Msg interface.

func (*MsgEditStorageProvider) GetSpAddress

func (m *MsgEditStorageProvider) GetSpAddress() string

func (*MsgEditStorageProvider) Marshal

func (m *MsgEditStorageProvider) Marshal() (dAtA []byte, err error)

func (*MsgEditStorageProvider) MarshalTo

func (m *MsgEditStorageProvider) MarshalTo(dAtA []byte) (int, error)

func (*MsgEditStorageProvider) MarshalToSizedBuffer

func (m *MsgEditStorageProvider) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgEditStorageProvider) ProtoMessage

func (*MsgEditStorageProvider) ProtoMessage()

func (*MsgEditStorageProvider) Reset

func (m *MsgEditStorageProvider) Reset()

func (*MsgEditStorageProvider) Route

func (msg *MsgEditStorageProvider) Route() string

Route implements the sdk.Msg interface.

func (*MsgEditStorageProvider) Size

func (m *MsgEditStorageProvider) Size() (n int)

func (*MsgEditStorageProvider) String

func (m *MsgEditStorageProvider) String() string

func (*MsgEditStorageProvider) Type

func (msg *MsgEditStorageProvider) Type() string

Type implements the sdk.Msg interface.

func (*MsgEditStorageProvider) Unmarshal

func (m *MsgEditStorageProvider) Unmarshal(dAtA []byte) error

func (*MsgEditStorageProvider) ValidateBasic

func (msg *MsgEditStorageProvider) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface.

func (*MsgEditStorageProvider) XXX_DiscardUnknown

func (m *MsgEditStorageProvider) XXX_DiscardUnknown()

func (*MsgEditStorageProvider) XXX_Marshal

func (m *MsgEditStorageProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgEditStorageProvider) XXX_Merge

func (m *MsgEditStorageProvider) XXX_Merge(src proto.Message)

func (*MsgEditStorageProvider) XXX_Size

func (m *MsgEditStorageProvider) XXX_Size() int

func (*MsgEditStorageProvider) XXX_Unmarshal

func (m *MsgEditStorageProvider) XXX_Unmarshal(b []byte) error

type MsgEditStorageProviderResponse

type MsgEditStorageProviderResponse struct {
}

MsgEditStorageProviderResponse defines the Msg/EditStorageProvider response type.

func (*MsgEditStorageProviderResponse) Descriptor

func (*MsgEditStorageProviderResponse) Descriptor() ([]byte, []int)

func (*MsgEditStorageProviderResponse) Marshal

func (m *MsgEditStorageProviderResponse) Marshal() (dAtA []byte, err error)

func (*MsgEditStorageProviderResponse) MarshalTo

func (m *MsgEditStorageProviderResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgEditStorageProviderResponse) MarshalToSizedBuffer

func (m *MsgEditStorageProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgEditStorageProviderResponse) ProtoMessage

func (*MsgEditStorageProviderResponse) ProtoMessage()

func (*MsgEditStorageProviderResponse) Reset

func (m *MsgEditStorageProviderResponse) Reset()

func (*MsgEditStorageProviderResponse) Size

func (m *MsgEditStorageProviderResponse) Size() (n int)

func (*MsgEditStorageProviderResponse) String

func (*MsgEditStorageProviderResponse) Unmarshal

func (m *MsgEditStorageProviderResponse) Unmarshal(dAtA []byte) error

func (*MsgEditStorageProviderResponse) XXX_DiscardUnknown

func (m *MsgEditStorageProviderResponse) XXX_DiscardUnknown()

func (*MsgEditStorageProviderResponse) XXX_Marshal

func (m *MsgEditStorageProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgEditStorageProviderResponse) XXX_Merge

func (m *MsgEditStorageProviderResponse) XXX_Merge(src proto.Message)

func (*MsgEditStorageProviderResponse) XXX_Size

func (m *MsgEditStorageProviderResponse) XXX_Size() int

func (*MsgEditStorageProviderResponse) XXX_Unmarshal

func (m *MsgEditStorageProviderResponse) XXX_Unmarshal(b []byte) error

type MsgServer

MsgServer is the server API for Msg service.

type MsgUpdateSpStoragePrice added in v0.0.7

type MsgUpdateSpStoragePrice struct {
	// sp address
	SpAddress string `protobuf:"bytes,1,opt,name=sp_address,json=spAddress,proto3" json:"sp_address,omitempty"`
	// read price, in bnb wei per charge byte
	ReadPrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */
	// free read quota, in byte
	FreeReadQuota uint64 `protobuf:"varint,3,opt,name=free_read_quota,json=freeReadQuota,proto3" json:"free_read_quota,omitempty"`
	// store price, in bnb wei per charge byte
	StorePrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 131-byte string literal not displayed */
}

func (*MsgUpdateSpStoragePrice) Descriptor added in v0.0.7

func (*MsgUpdateSpStoragePrice) Descriptor() ([]byte, []int)

func (*MsgUpdateSpStoragePrice) GetFreeReadQuota added in v0.0.7

func (m *MsgUpdateSpStoragePrice) GetFreeReadQuota() uint64

func (*MsgUpdateSpStoragePrice) GetSignBytes added in v0.0.7

func (msg *MsgUpdateSpStoragePrice) GetSignBytes() []byte

func (*MsgUpdateSpStoragePrice) GetSigners added in v0.0.7

func (msg *MsgUpdateSpStoragePrice) GetSigners() []sdk.AccAddress

func (*MsgUpdateSpStoragePrice) GetSpAddress added in v0.0.7

func (m *MsgUpdateSpStoragePrice) GetSpAddress() string

func (*MsgUpdateSpStoragePrice) Marshal added in v0.0.7

func (m *MsgUpdateSpStoragePrice) Marshal() (dAtA []byte, err error)

func (*MsgUpdateSpStoragePrice) MarshalTo added in v0.0.7

func (m *MsgUpdateSpStoragePrice) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateSpStoragePrice) MarshalToSizedBuffer added in v0.0.7

func (m *MsgUpdateSpStoragePrice) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateSpStoragePrice) ProtoMessage added in v0.0.7

func (*MsgUpdateSpStoragePrice) ProtoMessage()

func (*MsgUpdateSpStoragePrice) Reset added in v0.0.7

func (m *MsgUpdateSpStoragePrice) Reset()

func (*MsgUpdateSpStoragePrice) Route added in v0.0.7

func (msg *MsgUpdateSpStoragePrice) Route() string

func (*MsgUpdateSpStoragePrice) Size added in v0.0.7

func (m *MsgUpdateSpStoragePrice) Size() (n int)

func (*MsgUpdateSpStoragePrice) String added in v0.0.7

func (m *MsgUpdateSpStoragePrice) String() string

func (*MsgUpdateSpStoragePrice) Type added in v0.0.7

func (msg *MsgUpdateSpStoragePrice) Type() string

func (*MsgUpdateSpStoragePrice) Unmarshal added in v0.0.7

func (m *MsgUpdateSpStoragePrice) Unmarshal(dAtA []byte) error

func (*MsgUpdateSpStoragePrice) ValidateBasic added in v0.0.7

func (msg *MsgUpdateSpStoragePrice) ValidateBasic() error

func (*MsgUpdateSpStoragePrice) XXX_DiscardUnknown added in v0.0.7

func (m *MsgUpdateSpStoragePrice) XXX_DiscardUnknown()

func (*MsgUpdateSpStoragePrice) XXX_Marshal added in v0.0.7

func (m *MsgUpdateSpStoragePrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateSpStoragePrice) XXX_Merge added in v0.0.7

func (m *MsgUpdateSpStoragePrice) XXX_Merge(src proto.Message)

func (*MsgUpdateSpStoragePrice) XXX_Size added in v0.0.7

func (m *MsgUpdateSpStoragePrice) XXX_Size() int

func (*MsgUpdateSpStoragePrice) XXX_Unmarshal added in v0.0.7

func (m *MsgUpdateSpStoragePrice) XXX_Unmarshal(b []byte) error

type MsgUpdateSpStoragePriceResponse added in v0.0.7

type MsgUpdateSpStoragePriceResponse struct {
}

func (*MsgUpdateSpStoragePriceResponse) Descriptor added in v0.0.7

func (*MsgUpdateSpStoragePriceResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateSpStoragePriceResponse) Marshal added in v0.0.7

func (m *MsgUpdateSpStoragePriceResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateSpStoragePriceResponse) MarshalTo added in v0.0.7

func (m *MsgUpdateSpStoragePriceResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateSpStoragePriceResponse) MarshalToSizedBuffer added in v0.0.7

func (m *MsgUpdateSpStoragePriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateSpStoragePriceResponse) ProtoMessage added in v0.0.7

func (*MsgUpdateSpStoragePriceResponse) ProtoMessage()

func (*MsgUpdateSpStoragePriceResponse) Reset added in v0.0.7

func (*MsgUpdateSpStoragePriceResponse) Size added in v0.0.7

func (m *MsgUpdateSpStoragePriceResponse) Size() (n int)

func (*MsgUpdateSpStoragePriceResponse) String added in v0.0.7

func (*MsgUpdateSpStoragePriceResponse) Unmarshal added in v0.0.7

func (m *MsgUpdateSpStoragePriceResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateSpStoragePriceResponse) XXX_DiscardUnknown added in v0.0.7

func (m *MsgUpdateSpStoragePriceResponse) XXX_DiscardUnknown()

func (*MsgUpdateSpStoragePriceResponse) XXX_Marshal added in v0.0.7

func (m *MsgUpdateSpStoragePriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateSpStoragePriceResponse) XXX_Merge added in v0.0.7

func (m *MsgUpdateSpStoragePriceResponse) XXX_Merge(src proto.Message)

func (*MsgUpdateSpStoragePriceResponse) XXX_Size added in v0.0.7

func (m *MsgUpdateSpStoragePriceResponse) XXX_Size() int

func (*MsgUpdateSpStoragePriceResponse) XXX_Unmarshal added in v0.0.7

func (m *MsgUpdateSpStoragePriceResponse) XXX_Unmarshal(b []byte) error

type Params

type Params struct {
	// deposit_denom defines the staking coin denomination.
	DepositDenom string `protobuf:"bytes,1,opt,name=deposit_denom,json=depositDenom,proto3" json:"deposit_denom,omitempty"`
	// min_deposit_amount defines the minimum deposit amount for storage providers.
	MinDeposit github_com_cosmos_cosmos_sdk_types.Int `` /* 131-byte string literal not displayed */
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams(depositDenom string, minDeposit math.Int) Params

NewParams creates a new Params instance

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) Equal

func (this *Params) Equal(that interface{}) bool

func (*Params) GetDepositDenom

func (m *Params) GetDepositDenom() string

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs get the params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Queries a list of GetStorageProviders items.
	StorageProviders(ctx context.Context, in *QueryStorageProvidersRequest, opts ...grpc.CallOption) (*QueryStorageProvidersResponse, error)
	QueryGetSpStoragePriceByTime(ctx context.Context, in *QueryGetSpStoragePriceByTimeRequest, opts ...grpc.CallOption) (*QueryGetSpStoragePriceByTimeResponse, error)
	QueryGetSecondarySpStorePriceByTime(ctx context.Context, in *QueryGetSecondarySpStorePriceByTimeRequest, opts ...grpc.CallOption) (*QueryGetSecondarySpStorePriceByTimeResponse, error)
	// Queries a storage provider with specify address
	StorageProvider(ctx context.Context, in *QueryStorageProviderRequest, opts ...grpc.CallOption) (*QueryStorageProviderResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryGetSecondarySpStorePriceByTimeRequest added in v0.0.7

type QueryGetSecondarySpStorePriceByTimeRequest struct {
	Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}

func (*QueryGetSecondarySpStorePriceByTimeRequest) Descriptor added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeRequest) GetTimestamp added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeRequest) Marshal added in v0.0.7

func (m *QueryGetSecondarySpStorePriceByTimeRequest) Marshal() (dAtA []byte, err error)

func (*QueryGetSecondarySpStorePriceByTimeRequest) MarshalTo added in v0.0.7

func (m *QueryGetSecondarySpStorePriceByTimeRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryGetSecondarySpStorePriceByTimeRequest) MarshalToSizedBuffer added in v0.0.7

func (m *QueryGetSecondarySpStorePriceByTimeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGetSecondarySpStorePriceByTimeRequest) ProtoMessage added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeRequest) Reset added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeRequest) Size added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeRequest) String added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeRequest) Unmarshal added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeRequest) XXX_DiscardUnknown added in v0.0.7

func (m *QueryGetSecondarySpStorePriceByTimeRequest) XXX_DiscardUnknown()

func (*QueryGetSecondarySpStorePriceByTimeRequest) XXX_Marshal added in v0.0.7

func (m *QueryGetSecondarySpStorePriceByTimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGetSecondarySpStorePriceByTimeRequest) XXX_Merge added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeRequest) XXX_Size added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeRequest) XXX_Unmarshal added in v0.0.7

type QueryGetSecondarySpStorePriceByTimeResponse added in v0.0.7

type QueryGetSecondarySpStorePriceByTimeResponse struct {
	SecondarySpStorePrice SecondarySpStorePrice `protobuf:"bytes,1,opt,name=secondary_sp_store_price,json=secondarySpStorePrice,proto3" json:"secondary_sp_store_price"`
}

func (*QueryGetSecondarySpStorePriceByTimeResponse) Descriptor added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeResponse) GetSecondarySpStorePrice added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeResponse) Marshal added in v0.0.7

func (m *QueryGetSecondarySpStorePriceByTimeResponse) Marshal() (dAtA []byte, err error)

func (*QueryGetSecondarySpStorePriceByTimeResponse) MarshalTo added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeResponse) MarshalToSizedBuffer added in v0.0.7

func (m *QueryGetSecondarySpStorePriceByTimeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGetSecondarySpStorePriceByTimeResponse) ProtoMessage added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeResponse) Reset added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeResponse) Size added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeResponse) String added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeResponse) Unmarshal added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeResponse) XXX_DiscardUnknown added in v0.0.7

func (m *QueryGetSecondarySpStorePriceByTimeResponse) XXX_DiscardUnknown()

func (*QueryGetSecondarySpStorePriceByTimeResponse) XXX_Marshal added in v0.0.7

func (m *QueryGetSecondarySpStorePriceByTimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGetSecondarySpStorePriceByTimeResponse) XXX_Merge added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeResponse) XXX_Size added in v0.0.7

func (*QueryGetSecondarySpStorePriceByTimeResponse) XXX_Unmarshal added in v0.0.7

type QueryGetSpStoragePriceByTimeRequest added in v0.0.7

type QueryGetSpStoragePriceByTimeRequest struct {
	SpAddr    string `protobuf:"bytes,1,opt,name=sp_addr,json=spAddr,proto3" json:"sp_addr,omitempty"`
	Timestamp int64  `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}

func (*QueryGetSpStoragePriceByTimeRequest) Descriptor added in v0.0.7

func (*QueryGetSpStoragePriceByTimeRequest) Descriptor() ([]byte, []int)

func (*QueryGetSpStoragePriceByTimeRequest) GetSpAddr added in v0.0.7

func (*QueryGetSpStoragePriceByTimeRequest) GetTimestamp added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeRequest) GetTimestamp() int64

func (*QueryGetSpStoragePriceByTimeRequest) Marshal added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeRequest) Marshal() (dAtA []byte, err error)

func (*QueryGetSpStoragePriceByTimeRequest) MarshalTo added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryGetSpStoragePriceByTimeRequest) MarshalToSizedBuffer added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGetSpStoragePriceByTimeRequest) ProtoMessage added in v0.0.7

func (*QueryGetSpStoragePriceByTimeRequest) ProtoMessage()

func (*QueryGetSpStoragePriceByTimeRequest) Reset added in v0.0.7

func (*QueryGetSpStoragePriceByTimeRequest) Size added in v0.0.7

func (*QueryGetSpStoragePriceByTimeRequest) String added in v0.0.7

func (*QueryGetSpStoragePriceByTimeRequest) Unmarshal added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeRequest) Unmarshal(dAtA []byte) error

func (*QueryGetSpStoragePriceByTimeRequest) XXX_DiscardUnknown added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeRequest) XXX_DiscardUnknown()

func (*QueryGetSpStoragePriceByTimeRequest) XXX_Marshal added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGetSpStoragePriceByTimeRequest) XXX_Merge added in v0.0.7

func (*QueryGetSpStoragePriceByTimeRequest) XXX_Size added in v0.0.7

func (*QueryGetSpStoragePriceByTimeRequest) XXX_Unmarshal added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeRequest) XXX_Unmarshal(b []byte) error

type QueryGetSpStoragePriceByTimeResponse added in v0.0.7

type QueryGetSpStoragePriceByTimeResponse struct {
	SpStoragePrice SpStoragePrice `protobuf:"bytes,1,opt,name=sp_storage_price,json=spStoragePrice,proto3" json:"sp_storage_price"`
}

func (*QueryGetSpStoragePriceByTimeResponse) Descriptor added in v0.0.7

func (*QueryGetSpStoragePriceByTimeResponse) Descriptor() ([]byte, []int)

func (*QueryGetSpStoragePriceByTimeResponse) GetSpStoragePrice added in v0.0.7

func (*QueryGetSpStoragePriceByTimeResponse) Marshal added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeResponse) Marshal() (dAtA []byte, err error)

func (*QueryGetSpStoragePriceByTimeResponse) MarshalTo added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryGetSpStoragePriceByTimeResponse) MarshalToSizedBuffer added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGetSpStoragePriceByTimeResponse) ProtoMessage added in v0.0.7

func (*QueryGetSpStoragePriceByTimeResponse) ProtoMessage()

func (*QueryGetSpStoragePriceByTimeResponse) Reset added in v0.0.7

func (*QueryGetSpStoragePriceByTimeResponse) Size added in v0.0.7

func (*QueryGetSpStoragePriceByTimeResponse) String added in v0.0.7

func (*QueryGetSpStoragePriceByTimeResponse) Unmarshal added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeResponse) Unmarshal(dAtA []byte) error

func (*QueryGetSpStoragePriceByTimeResponse) XXX_DiscardUnknown added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeResponse) XXX_DiscardUnknown()

func (*QueryGetSpStoragePriceByTimeResponse) XXX_Marshal added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGetSpStoragePriceByTimeResponse) XXX_Merge added in v0.0.7

func (*QueryGetSpStoragePriceByTimeResponse) XXX_Size added in v0.0.7

func (*QueryGetSpStoragePriceByTimeResponse) XXX_Unmarshal added in v0.0.7

func (m *QueryGetSpStoragePriceByTimeResponse) XXX_Unmarshal(b []byte) error

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

func (*QueryParamsRequest) Descriptor() ([]byte, []int)

func (*QueryParamsRequest) Marshal

func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)

func (*QueryParamsRequest) MarshalTo

func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsRequest) MarshalToSizedBuffer

func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

func (m *QueryParamsRequest) Size() (n int)

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsRequest) XXX_Merge

func (m *QueryParamsRequest) XXX_Merge(src proto.Message)

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error

type QueryParamsResponse

type QueryParamsResponse struct {
	// params holds all the parameters of this module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

func (*QueryParamsResponse) Descriptor() ([]byte, []int)

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)

func (*QueryParamsResponse) MarshalTo

func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsResponse) MarshalToSizedBuffer

func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

func (m *QueryParamsResponse) Size() (n int)

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsResponse) XXX_Merge

func (m *QueryParamsResponse) XXX_Merge(src proto.Message)

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Parameters queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Queries a list of GetStorageProviders items.
	StorageProviders(context.Context, *QueryStorageProvidersRequest) (*QueryStorageProvidersResponse, error)
	QueryGetSpStoragePriceByTime(context.Context, *QueryGetSpStoragePriceByTimeRequest) (*QueryGetSpStoragePriceByTimeResponse, error)
	QueryGetSecondarySpStorePriceByTime(context.Context, *QueryGetSecondarySpStorePriceByTimeRequest) (*QueryGetSecondarySpStorePriceByTimeResponse, error)
	// Queries a storage provider with specify address
	StorageProvider(context.Context, *QueryStorageProviderRequest) (*QueryStorageProviderResponse, error)
}

QueryServer is the server API for Query service.

type QueryStorageProviderRequest added in v0.0.7

type QueryStorageProviderRequest struct {
	SpAddress string `protobuf:"bytes,1,opt,name=spAddress,proto3" json:"spAddress,omitempty"`
}

func (*QueryStorageProviderRequest) Descriptor added in v0.0.7

func (*QueryStorageProviderRequest) Descriptor() ([]byte, []int)

func (*QueryStorageProviderRequest) GetSpAddress added in v0.0.7

func (m *QueryStorageProviderRequest) GetSpAddress() string

func (*QueryStorageProviderRequest) Marshal added in v0.0.7

func (m *QueryStorageProviderRequest) Marshal() (dAtA []byte, err error)

func (*QueryStorageProviderRequest) MarshalTo added in v0.0.7

func (m *QueryStorageProviderRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryStorageProviderRequest) MarshalToSizedBuffer added in v0.0.7

func (m *QueryStorageProviderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryStorageProviderRequest) ProtoMessage added in v0.0.7

func (*QueryStorageProviderRequest) ProtoMessage()

func (*QueryStorageProviderRequest) Reset added in v0.0.7

func (m *QueryStorageProviderRequest) Reset()

func (*QueryStorageProviderRequest) Size added in v0.0.7

func (m *QueryStorageProviderRequest) Size() (n int)

func (*QueryStorageProviderRequest) String added in v0.0.7

func (m *QueryStorageProviderRequest) String() string

func (*QueryStorageProviderRequest) Unmarshal added in v0.0.7

func (m *QueryStorageProviderRequest) Unmarshal(dAtA []byte) error

func (*QueryStorageProviderRequest) XXX_DiscardUnknown added in v0.0.7

func (m *QueryStorageProviderRequest) XXX_DiscardUnknown()

func (*QueryStorageProviderRequest) XXX_Marshal added in v0.0.7

func (m *QueryStorageProviderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryStorageProviderRequest) XXX_Merge added in v0.0.7

func (m *QueryStorageProviderRequest) XXX_Merge(src proto.Message)

func (*QueryStorageProviderRequest) XXX_Size added in v0.0.7

func (m *QueryStorageProviderRequest) XXX_Size() int

func (*QueryStorageProviderRequest) XXX_Unmarshal added in v0.0.7

func (m *QueryStorageProviderRequest) XXX_Unmarshal(b []byte) error

type QueryStorageProviderResponse added in v0.0.7

type QueryStorageProviderResponse struct {
	StorageProvider *StorageProvider `protobuf:"bytes,1,opt,name=storageProvider,proto3" json:"storageProvider,omitempty"`
}

func (*QueryStorageProviderResponse) Descriptor added in v0.0.7

func (*QueryStorageProviderResponse) Descriptor() ([]byte, []int)

func (*QueryStorageProviderResponse) GetStorageProvider added in v0.0.7

func (m *QueryStorageProviderResponse) GetStorageProvider() *StorageProvider

func (*QueryStorageProviderResponse) Marshal added in v0.0.7

func (m *QueryStorageProviderResponse) Marshal() (dAtA []byte, err error)

func (*QueryStorageProviderResponse) MarshalTo added in v0.0.7

func (m *QueryStorageProviderResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryStorageProviderResponse) MarshalToSizedBuffer added in v0.0.7

func (m *QueryStorageProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryStorageProviderResponse) ProtoMessage added in v0.0.7

func (*QueryStorageProviderResponse) ProtoMessage()

func (*QueryStorageProviderResponse) Reset added in v0.0.7

func (m *QueryStorageProviderResponse) Reset()

func (*QueryStorageProviderResponse) Size added in v0.0.7

func (m *QueryStorageProviderResponse) Size() (n int)

func (*QueryStorageProviderResponse) String added in v0.0.7

func (*QueryStorageProviderResponse) Unmarshal added in v0.0.7

func (m *QueryStorageProviderResponse) Unmarshal(dAtA []byte) error

func (*QueryStorageProviderResponse) XXX_DiscardUnknown added in v0.0.7

func (m *QueryStorageProviderResponse) XXX_DiscardUnknown()

func (*QueryStorageProviderResponse) XXX_Marshal added in v0.0.7

func (m *QueryStorageProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryStorageProviderResponse) XXX_Merge added in v0.0.7

func (m *QueryStorageProviderResponse) XXX_Merge(src proto.Message)

func (*QueryStorageProviderResponse) XXX_Size added in v0.0.7

func (m *QueryStorageProviderResponse) XXX_Size() int

func (*QueryStorageProviderResponse) XXX_Unmarshal added in v0.0.7

func (m *QueryStorageProviderResponse) XXX_Unmarshal(b []byte) error

type QueryStorageProvidersRequest

type QueryStorageProvidersRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

this line is used by starport scaffolding # 3

func (*QueryStorageProvidersRequest) Descriptor

func (*QueryStorageProvidersRequest) Descriptor() ([]byte, []int)

func (*QueryStorageProvidersRequest) GetPagination

func (m *QueryStorageProvidersRequest) GetPagination() *query.PageRequest

func (*QueryStorageProvidersRequest) Marshal

func (m *QueryStorageProvidersRequest) Marshal() (dAtA []byte, err error)

func (*QueryStorageProvidersRequest) MarshalTo

func (m *QueryStorageProvidersRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryStorageProvidersRequest) MarshalToSizedBuffer

func (m *QueryStorageProvidersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryStorageProvidersRequest) ProtoMessage

func (*QueryStorageProvidersRequest) ProtoMessage()

func (*QueryStorageProvidersRequest) Reset

func (m *QueryStorageProvidersRequest) Reset()

func (*QueryStorageProvidersRequest) Size

func (m *QueryStorageProvidersRequest) Size() (n int)

func (*QueryStorageProvidersRequest) String

func (*QueryStorageProvidersRequest) Unmarshal

func (m *QueryStorageProvidersRequest) Unmarshal(dAtA []byte) error

func (*QueryStorageProvidersRequest) XXX_DiscardUnknown

func (m *QueryStorageProvidersRequest) XXX_DiscardUnknown()

func (*QueryStorageProvidersRequest) XXX_Marshal

func (m *QueryStorageProvidersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryStorageProvidersRequest) XXX_Merge

func (m *QueryStorageProvidersRequest) XXX_Merge(src proto.Message)

func (*QueryStorageProvidersRequest) XXX_Size

func (m *QueryStorageProvidersRequest) XXX_Size() int

func (*QueryStorageProvidersRequest) XXX_Unmarshal

func (m *QueryStorageProvidersRequest) XXX_Unmarshal(b []byte) error

type QueryStorageProvidersResponse

type QueryStorageProvidersResponse struct {
	Sps []StorageProvider `protobuf:"bytes,1,rep,name=sps,proto3" json:"sps"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryStorageProvidersResponse) Descriptor

func (*QueryStorageProvidersResponse) Descriptor() ([]byte, []int)

func (*QueryStorageProvidersResponse) GetPagination

func (m *QueryStorageProvidersResponse) GetPagination() *query.PageResponse

func (*QueryStorageProvidersResponse) GetSps

func (*QueryStorageProvidersResponse) Marshal

func (m *QueryStorageProvidersResponse) Marshal() (dAtA []byte, err error)

func (*QueryStorageProvidersResponse) MarshalTo

func (m *QueryStorageProvidersResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryStorageProvidersResponse) MarshalToSizedBuffer

func (m *QueryStorageProvidersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryStorageProvidersResponse) ProtoMessage

func (*QueryStorageProvidersResponse) ProtoMessage()

func (*QueryStorageProvidersResponse) Reset

func (m *QueryStorageProvidersResponse) Reset()

func (*QueryStorageProvidersResponse) Size

func (m *QueryStorageProvidersResponse) Size() (n int)

func (*QueryStorageProvidersResponse) String

func (*QueryStorageProvidersResponse) Unmarshal

func (m *QueryStorageProvidersResponse) Unmarshal(dAtA []byte) error

func (*QueryStorageProvidersResponse) XXX_DiscardUnknown

func (m *QueryStorageProvidersResponse) XXX_DiscardUnknown()

func (*QueryStorageProvidersResponse) XXX_Marshal

func (m *QueryStorageProvidersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryStorageProvidersResponse) XXX_Merge

func (m *QueryStorageProvidersResponse) XXX_Merge(src proto.Message)

func (*QueryStorageProvidersResponse) XXX_Size

func (m *QueryStorageProvidersResponse) XXX_Size() int

func (*QueryStorageProvidersResponse) XXX_Unmarshal

func (m *QueryStorageProvidersResponse) XXX_Unmarshal(b []byte) error

type RewardInfo

type RewardInfo struct {
	Address string     `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Amount  types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"`
}

func (*RewardInfo) Descriptor

func (*RewardInfo) Descriptor() ([]byte, []int)

func (*RewardInfo) GetAddress

func (m *RewardInfo) GetAddress() string

func (*RewardInfo) GetAmount

func (m *RewardInfo) GetAmount() types.Coin

func (*RewardInfo) Marshal

func (m *RewardInfo) Marshal() (dAtA []byte, err error)

func (*RewardInfo) MarshalTo

func (m *RewardInfo) MarshalTo(dAtA []byte) (int, error)

func (*RewardInfo) MarshalToSizedBuffer

func (m *RewardInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RewardInfo) ProtoMessage

func (*RewardInfo) ProtoMessage()

func (*RewardInfo) Reset

func (m *RewardInfo) Reset()

func (*RewardInfo) Size

func (m *RewardInfo) Size() (n int)

func (*RewardInfo) String

func (m *RewardInfo) String() string

func (*RewardInfo) Unmarshal

func (m *RewardInfo) Unmarshal(dAtA []byte) error

func (*RewardInfo) XXX_DiscardUnknown

func (m *RewardInfo) XXX_DiscardUnknown()

func (*RewardInfo) XXX_Marshal

func (m *RewardInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RewardInfo) XXX_Merge

func (m *RewardInfo) XXX_Merge(src proto.Message)

func (*RewardInfo) XXX_Size

func (m *RewardInfo) XXX_Size() int

func (*RewardInfo) XXX_Unmarshal

func (m *RewardInfo) XXX_Unmarshal(b []byte) error

type SecondarySpStorePrice added in v0.0.7

type SecondarySpStorePrice struct {
	// update time, in unix timestamp
	UpdateTime int64 `protobuf:"varint,1,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// store price, in bnb wei per charge byte
	StorePrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 131-byte string literal not displayed */
}

global secondary sp store price this is the price for all secondary sps

func (*SecondarySpStorePrice) Descriptor added in v0.0.7

func (*SecondarySpStorePrice) Descriptor() ([]byte, []int)

func (*SecondarySpStorePrice) GetUpdateTime added in v0.0.7

func (m *SecondarySpStorePrice) GetUpdateTime() int64

func (*SecondarySpStorePrice) Marshal added in v0.0.7

func (m *SecondarySpStorePrice) Marshal() (dAtA []byte, err error)

func (*SecondarySpStorePrice) MarshalTo added in v0.0.7

func (m *SecondarySpStorePrice) MarshalTo(dAtA []byte) (int, error)

func (*SecondarySpStorePrice) MarshalToSizedBuffer added in v0.0.7

func (m *SecondarySpStorePrice) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SecondarySpStorePrice) ProtoMessage added in v0.0.7

func (*SecondarySpStorePrice) ProtoMessage()

func (*SecondarySpStorePrice) Reset added in v0.0.7

func (m *SecondarySpStorePrice) Reset()

func (*SecondarySpStorePrice) Size added in v0.0.7

func (m *SecondarySpStorePrice) Size() (n int)

func (*SecondarySpStorePrice) String added in v0.0.7

func (m *SecondarySpStorePrice) String() string

func (*SecondarySpStorePrice) Unmarshal added in v0.0.7

func (m *SecondarySpStorePrice) Unmarshal(dAtA []byte) error

func (*SecondarySpStorePrice) XXX_DiscardUnknown added in v0.0.7

func (m *SecondarySpStorePrice) XXX_DiscardUnknown()

func (*SecondarySpStorePrice) XXX_Marshal added in v0.0.7

func (m *SecondarySpStorePrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SecondarySpStorePrice) XXX_Merge added in v0.0.7

func (m *SecondarySpStorePrice) XXX_Merge(src proto.Message)

func (*SecondarySpStorePrice) XXX_Size added in v0.0.7

func (m *SecondarySpStorePrice) XXX_Size() int

func (*SecondarySpStorePrice) XXX_Unmarshal added in v0.0.7

func (m *SecondarySpStorePrice) XXX_Unmarshal(b []byte) error

type SpStoragePrice added in v0.0.7

type SpStoragePrice struct {
	// sp address
	SpAddress string `protobuf:"bytes,1,opt,name=sp_address,json=spAddress,proto3" json:"sp_address,omitempty"`
	// update time, in unix timestamp
	UpdateTime int64 `protobuf:"varint,2,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// read price, in bnb wei per charge byte
	ReadPrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */
	// free read quota, in byte
	FreeReadQuota uint64 `protobuf:"varint,4,opt,name=free_read_quota,json=freeReadQuota,proto3" json:"free_read_quota,omitempty"`
	// store price, in bnb wei per charge byte
	StorePrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 131-byte string literal not displayed */
}

storage price of a specific sp

func (*SpStoragePrice) Descriptor added in v0.0.7

func (*SpStoragePrice) Descriptor() ([]byte, []int)

func (*SpStoragePrice) GetFreeReadQuota added in v0.0.7

func (m *SpStoragePrice) GetFreeReadQuota() uint64

func (*SpStoragePrice) GetSpAddress added in v0.0.7

func (m *SpStoragePrice) GetSpAddress() string

func (*SpStoragePrice) GetUpdateTime added in v0.0.7

func (m *SpStoragePrice) GetUpdateTime() int64

func (*SpStoragePrice) Marshal added in v0.0.7

func (m *SpStoragePrice) Marshal() (dAtA []byte, err error)

func (*SpStoragePrice) MarshalTo added in v0.0.7

func (m *SpStoragePrice) MarshalTo(dAtA []byte) (int, error)

func (*SpStoragePrice) MarshalToSizedBuffer added in v0.0.7

func (m *SpStoragePrice) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SpStoragePrice) ProtoMessage added in v0.0.7

func (*SpStoragePrice) ProtoMessage()

func (*SpStoragePrice) Reset added in v0.0.7

func (m *SpStoragePrice) Reset()

func (*SpStoragePrice) Size added in v0.0.7

func (m *SpStoragePrice) Size() (n int)

func (*SpStoragePrice) String added in v0.0.7

func (m *SpStoragePrice) String() string

func (*SpStoragePrice) Unmarshal added in v0.0.7

func (m *SpStoragePrice) Unmarshal(dAtA []byte) error

func (*SpStoragePrice) XXX_DiscardUnknown added in v0.0.7

func (m *SpStoragePrice) XXX_DiscardUnknown()

func (*SpStoragePrice) XXX_Marshal added in v0.0.7

func (m *SpStoragePrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SpStoragePrice) XXX_Merge added in v0.0.7

func (m *SpStoragePrice) XXX_Merge(src proto.Message)

func (*SpStoragePrice) XXX_Size added in v0.0.7

func (m *SpStoragePrice) XXX_Size() int

func (*SpStoragePrice) XXX_Unmarshal added in v0.0.7

func (m *SpStoragePrice) XXX_Unmarshal(b []byte) error

type Status

type Status int32

Status is the status of a storage provider.

const (
	STATUS_IN_SERVICE       Status = 0
	STATUS_IN_JAILED        Status = 1
	STATUS_GRACEFUL_EXITING Status = 2
	STATUS_OUT_OF_SERVICE   Status = 3
)

func (Status) EnumDescriptor

func (Status) EnumDescriptor() ([]byte, []int)

func (Status) String

func (x Status) String() string

type StorageProvider

type StorageProvider struct {
	// operator_address defines the account address of the storage provider's operator; It also is the unique index key of sp.
	OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"`
	// funding_address defines one of the storage provider's accounts which is used to deposit and reward.
	FundingAddress string `protobuf:"bytes,2,opt,name=funding_address,json=fundingAddress,proto3" json:"funding_address,omitempty"`
	// seal_address defines one of the storage provider's accounts which is used to SealObject
	SealAddress string `protobuf:"bytes,3,opt,name=seal_address,json=sealAddress,proto3" json:"seal_address,omitempty"`
	// approval_address defines one of the storage provider's accounts which is used to approve use's createBucket/createObject request
	ApprovalAddress string `protobuf:"bytes,4,opt,name=approval_address,json=approvalAddress,proto3" json:"approval_address,omitempty"`
	// total_deposit defines the number of tokens deposited by this storage provider for staking.
	TotalDeposit github_com_cosmos_cosmos_sdk_types.Int `` /* 137-byte string literal not displayed */
	// status defines the current service status of this storage provider
	Status Status `protobuf:"varint,6,opt,name=status,proto3,enum=bnbchain.greenfield.sp.Status" json:"status,omitempty"`
	// endpoint define the storage provider's network service address
	Endpoint string `protobuf:"bytes,7,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// description defines the description terms for the storage provider.
	Description Description `protobuf:"bytes,8,opt,name=description,proto3" json:"description"`
}

StorageProvider defines the meta info of storage provider TODO: add endpoint for RPC/HTTP/Websocket and p2p identity TODO: add more account address for different role.

func MustUnmarshalStorageProvider

func MustUnmarshalStorageProvider(cdc codec.BinaryCodec, value []byte) StorageProvider

func NewStorageProvider

func NewStorageProvider(
	operator sdk.AccAddress, fundingAddress sdk.AccAddress,
	sealAddress sdk.AccAddress, approvalAddress sdk.AccAddress,
	totalDeposit math.Int, endpoint string,
	description Description) (StorageProvider, error)

NewStorageProvider constructs a new StorageProvider

func UnmarshalStorageProvider

func UnmarshalStorageProvider(cdc codec.BinaryCodec, value []byte) (sp StorageProvider, err error)

func (*StorageProvider) Descriptor

func (*StorageProvider) Descriptor() ([]byte, []int)

func (StorageProvider) GetApprovalAccAddress added in v0.0.7

func (sp StorageProvider) GetApprovalAccAddress() sdk.AccAddress

func (*StorageProvider) GetApprovalAddress

func (m *StorageProvider) GetApprovalAddress() string

func (*StorageProvider) GetDescription

func (m *StorageProvider) GetDescription() Description

func (*StorageProvider) GetEndpoint

func (m *StorageProvider) GetEndpoint() string

func (StorageProvider) GetFundingAccAddress

func (sp StorageProvider) GetFundingAccAddress() sdk.AccAddress

func (*StorageProvider) GetFundingAddress

func (m *StorageProvider) GetFundingAddress() string

func (StorageProvider) GetOperator

func (sp StorageProvider) GetOperator() sdk.AccAddress

func (*StorageProvider) GetOperatorAddress

func (m *StorageProvider) GetOperatorAddress() string

func (StorageProvider) GetSealAccAddress added in v0.0.7

func (sp StorageProvider) GetSealAccAddress() sdk.AccAddress

func (*StorageProvider) GetSealAddress

func (m *StorageProvider) GetSealAddress() string

func (*StorageProvider) GetStatus

func (m *StorageProvider) GetStatus() Status

func (StorageProvider) GetTotalDeposit

func (sp StorageProvider) GetTotalDeposit() math.Int

func (StorageProvider) IsInService

func (sp StorageProvider) IsInService() bool

func (*StorageProvider) Marshal

func (m *StorageProvider) Marshal() (dAtA []byte, err error)

func (*StorageProvider) MarshalTo

func (m *StorageProvider) MarshalTo(dAtA []byte) (int, error)

func (*StorageProvider) MarshalToSizedBuffer

func (m *StorageProvider) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StorageProvider) ProtoMessage

func (*StorageProvider) ProtoMessage()

func (*StorageProvider) Reset

func (m *StorageProvider) Reset()

func (*StorageProvider) Size

func (m *StorageProvider) Size() (n int)

func (StorageProvider) String

func (sp StorageProvider) String() string

String implements the Stringer interface for a Validator object.

func (*StorageProvider) Unmarshal

func (m *StorageProvider) Unmarshal(dAtA []byte) error

func (*StorageProvider) XXX_DiscardUnknown

func (m *StorageProvider) XXX_DiscardUnknown()

func (*StorageProvider) XXX_Marshal

func (m *StorageProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StorageProvider) XXX_Merge

func (m *StorageProvider) XXX_Merge(src proto.Message)

func (*StorageProvider) XXX_Size

func (m *StorageProvider) XXX_Size() int

func (*StorageProvider) XXX_Unmarshal

func (m *StorageProvider) XXX_Unmarshal(b []byte) error

type StorageProviders

type StorageProviders []StorageProvider

Validators is a collection of Validator

func (StorageProviders) Len

func (v StorageProviders) Len() int

Implements sort interface

func (StorageProviders) Less

func (v StorageProviders) Less(i, j int) bool

Implements sort interface

func (StorageProviders) Sort

func (v StorageProviders) Sort()

Sort Validators sorts validator array in ascending operator address order

func (StorageProviders) String

func (v StorageProviders) String() (out string)

func (StorageProviders) Swap

func (v StorageProviders) Swap(i, j int)

Implements sort interface

func (StorageProviders) ToSDKValidators

func (v StorageProviders) ToSDKValidators() (sps []StorageProvider)

ToSDKValidators - convenience function convert []Validator to []sdk.ValidatorI

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CreateStorageProvider

func (*UnimplementedMsgServer) Deposit

func (*UnimplementedMsgServer) EditStorageProvider

func (*UnimplementedMsgServer) UpdateSpStoragePrice added in v0.0.7

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) QueryGetSecondarySpStorePriceByTime added in v0.0.7

func (*UnimplementedQueryServer) QueryGetSpStoragePriceByTime added in v0.0.7

func (*UnimplementedQueryServer) StorageProvider added in v0.0.7

func (*UnimplementedQueryServer) StorageProviders

Jump to

Keyboard shortcuts

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