types

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventType = "ownership"

	AttributeKeyHash            = "hash"
	AttributeKeyResourceHash    = "resource_hash"
	AttributeKeyResourceType    = "ressource_type"
	AttributeKeyResourceAddress = "ressource_address"

	AttributeActionCreated = "created"
	AttributeActionDeleted = "deleted"
)

module event types and attributes

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "ownership"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey to be used for routing msgs
	RouterKey = ModuleName

	// QuerierRoute to be used for routing
	QuerierRoute = ModuleName
)
View Source
const (
	DefaultParamspace = ModuleName
)

Default parameter namespace

View Source
const (
	QueryList = "list"
)

Query endpoints supported by the ownership querier

Variables

View Source
var ModuleCdc *codec.Codec

ModuleCdc defines the module codec.

Functions

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable for instance module

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on codec.

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis validates the ownership genesis parameters

Types

type BankKeeper added in v0.20.0

type BankKeeper interface {
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
	GetCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper module interface.

type GenesisState

type GenesisState struct{}

GenesisState - all ownership state that must be provided at genesis

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState - default GenesisState used by Cosmos Hub

func NewGenesisState

func NewGenesisState() GenesisState

NewGenesisState creates a new GenesisState object

type MsgWithdraw added in v0.21.0

type MsgWithdraw struct {
	// The ownership's owner.
	Owner github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 149-byte string literal not displayed */
	// Hash of the resource to withdraw from.
	ResourceHash github_com_mesg_foundation_engine_hash.Hash `` /* 155-byte string literal not displayed */
	// amount to withdraw
	Amount               string   `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty" validate:"required,coinsPositiveZero"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The message to withdraw coins from an ownership.

func (*MsgWithdraw) Descriptor added in v0.21.0

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

func (*MsgWithdraw) GetAmount added in v0.21.0

func (m *MsgWithdraw) GetAmount() string

func (*MsgWithdraw) GetOwner added in v0.21.0

func (*MsgWithdraw) GetResourceHash added in v0.21.0

func (MsgWithdraw) GetSignBytes added in v0.21.0

func (msg MsgWithdraw) GetSignBytes() []byte

GetSignBytes encodes the message for signing.

func (MsgWithdraw) GetSigners added in v0.21.0

func (msg MsgWithdraw) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required.

func (*MsgWithdraw) ProtoMessage added in v0.21.0

func (*MsgWithdraw) ProtoMessage()

func (*MsgWithdraw) Reset added in v0.21.0

func (m *MsgWithdraw) Reset()

func (MsgWithdraw) Route added in v0.21.0

func (msg MsgWithdraw) Route() string

Route should return the name of the module.

func (*MsgWithdraw) String added in v0.21.0

func (m *MsgWithdraw) String() string

func (MsgWithdraw) Type added in v0.21.0

func (msg MsgWithdraw) Type() string

Type returns the action.

func (MsgWithdraw) ValidateBasic added in v0.21.0

func (msg MsgWithdraw) ValidateBasic() error

ValidateBasic runs stateless checks on the message.

func (*MsgWithdraw) XXX_DiscardUnknown added in v0.21.0

func (m *MsgWithdraw) XXX_DiscardUnknown()

func (*MsgWithdraw) XXX_Marshal added in v0.21.0

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

func (*MsgWithdraw) XXX_Merge added in v0.21.0

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

func (*MsgWithdraw) XXX_Size added in v0.21.0

func (m *MsgWithdraw) XXX_Size() int

func (*MsgWithdraw) XXX_Unmarshal added in v0.21.0

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

type ParamSubspace

type ParamSubspace interface {
	WithKeyTable(table params.KeyTable) params.Subspace
	Get(ctx sdk.Context, key []byte, ptr interface{})
	GetParamSet(ctx sdk.Context, ps params.ParamSet)
	SetParamSet(ctx sdk.Context, ps params.ParamSet)
}

ParamSubspace defines the expected Subspace interfacace

type Params

type Params struct{}

Params - used for initializing default parameter for instance at genesis

func DefaultParams

func DefaultParams() Params

DefaultParams defines the parameters for this module

func NewParams

func NewParams() Params

NewParams creates a new Params object

func (*Params) ParamSetPairs

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

ParamSetPairs - Implements params.ParamSet

func (Params) String

func (p Params) String() string

String implements the stringer interface for Params

Jump to

Keyboard shortcuts

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