types

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName is the module name constant used in many places
	ModuleName = "xion"

	// StoreKey is the store key string for oracle
	StoreKey = ModuleName

	// RouterKey is the message route for oracle
	RouterKey = ModuleName

	// QuerierRoute is the querier route for oracle
	QuerierRoute = ModuleName
)
View Source
const (
	TypeMsgSend                  = "send"
	TypeMsgMultiSend             = "multisend"
	TypeMsgSetPlatformPercentage = "setplatformpercentage"
)

bank message types

Variables

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 (
	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 (
	ModuleCdc = codec.NewAminoCodec(amino)
)
View Source
var (
	PlatformPercentageKey = []byte{0x00}
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/bank interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAccount(ctx sdktypes.Context, moduleName string) authtypes.ModuleAccountI
}

type BankKeeper

type BankKeeper interface {
	SendCoinsFromModuleToAccount(
		ctx sdktypes.Context,
		senderModule string,
		recipientAddr sdktypes.AccAddress,
		amt sdktypes.Coins,
	) error
	SendCoinsFromModuleToModule(
		ctx sdktypes.Context,
		senderModule,
		recipientModule string,
		amt sdktypes.Coins,
	) error
	SendCoinsFromAccountToModule(
		ctx sdktypes.Context,
		senderAddr sdktypes.AccAddress,
		recipientModule string,
		amt sdktypes.Coins,
	) error
	IsSendEnabledCoins(ctx sdktypes.Context, coins ...sdktypes.Coin) error
	BlockedAddr(addr sdktypes.AccAddress) bool
	SendCoins(ctx sdktypes.Context, fromAddr sdktypes.AccAddress, toAddr sdktypes.AccAddress, amt sdktypes.Coins) error
	InputOutputCoins(ctx sdktypes.Context, inputs []banktypes.Input, outputs []banktypes.Output) error
}

BankKeeper defines the contract needed to be fulfilled for banking and supply dependencies.

type GenesisState

type GenesisState struct {
	PlatformPercentage uint32 `protobuf:"varint,1,opt,name=platform_percentage,json=platformPercentage,proto3" json:"platform_percentage,omitempty"`
}

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns a default bank module genesis state.

func GetGenesisStateFromAppState

func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState

GetGenesisStateFromAppState returns x/bank GenesisState given raw application genesis state.

func NewGenesisState

func NewGenesisState(platformPercentage uint32) *GenesisState

NewGenesisState creates a new genesis state.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetPlatformPercentage

func (m *GenesisState) GetPlatformPercentage() uint32

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 validation of supply genesis data returning an error for any failed validation criteria.

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 {
	// Send defines a method for sending coins from one account to another account.
	Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error)
	// MultiSend defines a method for sending coins from some accounts to other accounts.
	MultiSend(ctx context.Context, in *MsgMultiSend, opts ...grpc.CallOption) (*MsgMultiSendResponse, error)
	// SetPlatformPercentage defines the method for updating the platform percentage fee
	SetPlatformPercentage(ctx context.Context, in *MsgSetPlatformPercentage, opts ...grpc.CallOption) (*MsgSetPlatformPercentageResponse, 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 MsgMultiSend

type MsgMultiSend struct {
	// Inputs, despite being `repeated`, only allows one sender input. This is
	// checked in MsgMultiSend's ValidateBasic.
	Inputs  []types1.Input  `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs"`
	Outputs []types1.Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs"`
}

MsgMultiSend represents an arbitrary multi-in, multi-out send message.

func NewMsgMultiSend

func NewMsgMultiSend(in []banktypes.Input, out []banktypes.Output) *MsgMultiSend

NewMsgMultiSend - construct arbitrary multi-in, multi-out send msg.

func (*MsgMultiSend) Descriptor

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

func (*MsgMultiSend) GetInputs

func (m *MsgMultiSend) GetInputs() []types1.Input

func (*MsgMultiSend) GetOutputs

func (m *MsgMultiSend) GetOutputs() []types1.Output

func (MsgMultiSend) GetSignBytes

func (msg MsgMultiSend) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgMultiSend) GetSigners

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

GetSigners Implements Msg.

func (*MsgMultiSend) Marshal

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

func (*MsgMultiSend) MarshalTo

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

func (*MsgMultiSend) MarshalToSizedBuffer

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

func (*MsgMultiSend) ProtoMessage

func (*MsgMultiSend) ProtoMessage()

func (*MsgMultiSend) Reset

func (m *MsgMultiSend) Reset()

func (MsgMultiSend) Route

func (msg MsgMultiSend) Route() string

Route Implements Msg

func (*MsgMultiSend) Size

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

func (*MsgMultiSend) String

func (m *MsgMultiSend) String() string

func (MsgMultiSend) Type

func (msg MsgMultiSend) Type() string

Type Implements Msg

func (*MsgMultiSend) Unmarshal

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

func (MsgMultiSend) ValidateBasic

func (msg MsgMultiSend) ValidateBasic() error

ValidateBasic Implements Msg.

func (*MsgMultiSend) XXX_DiscardUnknown

func (m *MsgMultiSend) XXX_DiscardUnknown()

func (*MsgMultiSend) XXX_Marshal

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

func (*MsgMultiSend) XXX_Merge

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

func (*MsgMultiSend) XXX_Size

func (m *MsgMultiSend) XXX_Size() int

func (*MsgMultiSend) XXX_Unmarshal

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

type MsgMultiSendResponse

type MsgMultiSendResponse struct {
}

MsgMultiSendResponse defines the Msg/MultiSend response type.

func (*MsgMultiSendResponse) Descriptor

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

func (*MsgMultiSendResponse) Marshal

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

func (*MsgMultiSendResponse) MarshalTo

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

func (*MsgMultiSendResponse) MarshalToSizedBuffer

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

func (*MsgMultiSendResponse) ProtoMessage

func (*MsgMultiSendResponse) ProtoMessage()

func (*MsgMultiSendResponse) Reset

func (m *MsgMultiSendResponse) Reset()

func (*MsgMultiSendResponse) Size

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

func (*MsgMultiSendResponse) String

func (m *MsgMultiSendResponse) String() string

func (*MsgMultiSendResponse) Unmarshal

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

func (*MsgMultiSendResponse) XXX_DiscardUnknown

func (m *MsgMultiSendResponse) XXX_DiscardUnknown()

func (*MsgMultiSendResponse) XXX_Marshal

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

func (*MsgMultiSendResponse) XXX_Merge

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

func (*MsgMultiSendResponse) XXX_Size

func (m *MsgMultiSendResponse) XXX_Size() int

func (*MsgMultiSendResponse) XXX_Unmarshal

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

type MsgSend

type MsgSend struct {
	FromAddress string                                   `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"`
	ToAddress   string                                   `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
	Amount      github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}

MsgSend represents a message to send coins from one account to another.

func NewMsgSend

func NewMsgSend(fromAddr, toAddr sdk.AccAddress, amount sdk.Coins) *MsgSend

NewMsgSend - construct a msg to send coins from one account to another.

func (*MsgSend) Descriptor

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

func (MsgSend) GetSignBytes

func (msg MsgSend) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgSend) GetSigners

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

GetSigners Implements Msg.

func (*MsgSend) Marshal

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

func (*MsgSend) MarshalTo

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

func (*MsgSend) MarshalToSizedBuffer

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

func (*MsgSend) ProtoMessage

func (*MsgSend) ProtoMessage()

func (*MsgSend) Reset

func (m *MsgSend) Reset()

func (MsgSend) Route

func (msg MsgSend) Route() string

Route Implements Msg.

func (*MsgSend) Size

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

func (*MsgSend) String

func (m *MsgSend) String() string

func (MsgSend) Type

func (msg MsgSend) Type() string

Type Implements Msg.

func (*MsgSend) Unmarshal

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

func (MsgSend) ValidateBasic

func (msg MsgSend) ValidateBasic() error

ValidateBasic Implements Msg.

func (*MsgSend) XXX_DiscardUnknown

func (m *MsgSend) XXX_DiscardUnknown()

func (*MsgSend) XXX_Marshal

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

func (*MsgSend) XXX_Merge

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

func (*MsgSend) XXX_Size

func (m *MsgSend) XXX_Size() int

func (*MsgSend) XXX_Unmarshal

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

type MsgSendResponse

type MsgSendResponse struct {
}

MsgSendResponse defines the Msg/Send response type.

func (*MsgSendResponse) Descriptor

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

func (*MsgSendResponse) Marshal

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

func (*MsgSendResponse) MarshalTo

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

func (*MsgSendResponse) MarshalToSizedBuffer

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

func (*MsgSendResponse) ProtoMessage

func (*MsgSendResponse) ProtoMessage()

func (*MsgSendResponse) Reset

func (m *MsgSendResponse) Reset()

func (*MsgSendResponse) Size

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

func (*MsgSendResponse) String

func (m *MsgSendResponse) String() string

func (*MsgSendResponse) Unmarshal

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

func (*MsgSendResponse) XXX_DiscardUnknown

func (m *MsgSendResponse) XXX_DiscardUnknown()

func (*MsgSendResponse) XXX_Marshal

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

func (*MsgSendResponse) XXX_Merge

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

func (*MsgSendResponse) XXX_Size

func (m *MsgSendResponse) XXX_Size() int

func (*MsgSendResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// Send defines a method for sending coins from one account to another account.
	Send(context.Context, *MsgSend) (*MsgSendResponse, error)
	// MultiSend defines a method for sending coins from some accounts to other accounts.
	MultiSend(context.Context, *MsgMultiSend) (*MsgMultiSendResponse, error)
	// SetPlatformPercentage defines the method for updating the platform percentage fee
	SetPlatformPercentage(context.Context, *MsgSetPlatformPercentage) (*MsgSetPlatformPercentageResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSetPlatformPercentage

type MsgSetPlatformPercentage struct {
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// platform_percentage is the platform fee percentage to multiplied by 10000
	PlatformPercentage uint32 `protobuf:"varint,2,opt,name=platform_percentage,json=platformPercentage,proto3" json:"platform_percentage,omitempty"`
}

func NewMsgSetPlatformPercentage

func NewMsgSetPlatformPercentage(percentage uint32) *MsgSetPlatformPercentage

NewMsgMultiSend - construct arbitrary multi-in, multi-out send msg.

func (*MsgSetPlatformPercentage) Descriptor

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

func (*MsgSetPlatformPercentage) GetAuthority

func (m *MsgSetPlatformPercentage) GetAuthority() string

func (*MsgSetPlatformPercentage) GetPlatformPercentage

func (m *MsgSetPlatformPercentage) GetPlatformPercentage() uint32

func (MsgSetPlatformPercentage) GetSignBytes

func (msg MsgSetPlatformPercentage) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgSetPlatformPercentage) GetSigners

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

GetSigners Implements Msg.

func (*MsgSetPlatformPercentage) Marshal

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

func (*MsgSetPlatformPercentage) MarshalTo

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

func (*MsgSetPlatformPercentage) MarshalToSizedBuffer

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

func (*MsgSetPlatformPercentage) ProtoMessage

func (*MsgSetPlatformPercentage) ProtoMessage()

func (*MsgSetPlatformPercentage) Reset

func (m *MsgSetPlatformPercentage) Reset()

func (MsgSetPlatformPercentage) Route

func (msg MsgSetPlatformPercentage) Route() string

Route Implements Msg

func (*MsgSetPlatformPercentage) Size

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

func (*MsgSetPlatformPercentage) String

func (m *MsgSetPlatformPercentage) String() string

func (MsgSetPlatformPercentage) Type

func (msg MsgSetPlatformPercentage) Type() string

Type Implements Msg

func (*MsgSetPlatformPercentage) Unmarshal

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

func (MsgSetPlatformPercentage) ValidateBasic

func (msg MsgSetPlatformPercentage) ValidateBasic() error

ValidateBasic Implements Msg.

func (*MsgSetPlatformPercentage) XXX_DiscardUnknown

func (m *MsgSetPlatformPercentage) XXX_DiscardUnknown()

func (*MsgSetPlatformPercentage) XXX_Marshal

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

func (*MsgSetPlatformPercentage) XXX_Merge

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

func (*MsgSetPlatformPercentage) XXX_Size

func (m *MsgSetPlatformPercentage) XXX_Size() int

func (*MsgSetPlatformPercentage) XXX_Unmarshal

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

type MsgSetPlatformPercentageResponse

type MsgSetPlatformPercentageResponse struct {
}

func (*MsgSetPlatformPercentageResponse) Descriptor

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

func (*MsgSetPlatformPercentageResponse) Marshal

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

func (*MsgSetPlatformPercentageResponse) MarshalTo

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

func (*MsgSetPlatformPercentageResponse) MarshalToSizedBuffer

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

func (*MsgSetPlatformPercentageResponse) ProtoMessage

func (*MsgSetPlatformPercentageResponse) ProtoMessage()

func (*MsgSetPlatformPercentageResponse) Reset

func (*MsgSetPlatformPercentageResponse) Size

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

func (*MsgSetPlatformPercentageResponse) String

func (*MsgSetPlatformPercentageResponse) Unmarshal

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

func (*MsgSetPlatformPercentageResponse) XXX_DiscardUnknown

func (m *MsgSetPlatformPercentageResponse) XXX_DiscardUnknown()

func (*MsgSetPlatformPercentageResponse) XXX_Marshal

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

func (*MsgSetPlatformPercentageResponse) XXX_Merge

func (*MsgSetPlatformPercentageResponse) XXX_Size

func (m *MsgSetPlatformPercentageResponse) XXX_Size() int

func (*MsgSetPlatformPercentageResponse) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) MultiSend

func (*UnimplementedMsgServer) Send

func (*UnimplementedMsgServer) SetPlatformPercentage

Jump to

Keyboard shortcuts

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