types

package
v0.2.2-0...-13ba25a Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCodeSpace         cTypes.CodespaceType = ModuleName
	CodeInvalidAmount        cTypes.CodeType      = 201
	CodeInvalidString        cTypes.CodeType      = 203
	CodeInvalidInputsOutputs cTypes.CodeType      = 204
)
View Source
const (
	ModuleName   = "asset"
	StoreKey     = ModuleName
	RouterKey    = StoreKey
	QuerierRoute = RouterKey
)

Variables

View Source
var (
	EventTypeAssetFactoryIssueAsset   = "IssueAsset"
	EventTypeAssetFactoryRedeemAsset  = "RedeemAsset"
	EventTypeAssetFactorySendAsset    = "SendAsset"
	EventTypeAssetFactoryExecuteAsset = "ExecuteAsset"
)
View Source
var ModuleCdc *codec.Codec
View Source
var (
	PegHashKey = []byte{0x01}
)

Functions

func AssetPegHashStoreKey

func AssetPegHashStoreKey(assetPegHash types.PegHash) []byte

AssetPegHashStoreKey : converts peg hash to keystore key

func BuildExecuteAssetMsg

func BuildExecuteAssetMsg(relayerAddress cTypes.AccAddress, fromAddress cTypes.AccAddress, toAddress cTypes.AccAddress, pegHash types.PegHash) cTypes.Msg

func BuildIssueAssetMsg

func BuildIssueAssetMsg(issuerAddress cTypes.AccAddress, toAddress cTypes.AccAddress, assetPeg types.AssetPeg) cTypes.Msg

func BuildRedeemAssetMsg

func BuildRedeemAssetMsg(relayerAddress cTypes.AccAddress, ownerAddress cTypes.AccAddress, toAddress cTypes.AccAddress, pegHash types.PegHash) cTypes.Msg

func BuildSendAssetMsg

func BuildSendAssetMsg(relayerAddress cTypes.AccAddress, fromAddress cTypes.AccAddress, toAddress cTypes.AccAddress, peghash types.PegHash) cTypes.Msg

func DefaultGenesisState

func DefaultGenesisState()

func ErrInvalidAmount

func ErrInvalidAmount(codeSpace cTypes.CodespaceType, msg string) cTypes.Error

func ErrInvalidString

func ErrInvalidString(codeSpace cTypes.CodespaceType, msg string) cTypes.Error

func ErrNoInputs

func ErrNoInputs(codeSpace cTypes.CodespaceType) cTypes.Error

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx cTypes.Context, addr cTypes.AccAddress) exported.Account
}

type CodeType

type CodeType cTypes.CodeType

type GenesisState

type GenesisState struct {
}

type IssueAsset

type IssueAsset struct {
	IssuerAddress cTypes.AccAddress `json:"issuer_address"`
	ToAddress     cTypes.AccAddress `json:"to_address"`
	AssetPeg      types.AssetPeg    `json:"asset_peg"`
}

func NewIssueAsset

func NewIssueAsset(issuerAddress cTypes.AccAddress, toAddress cTypes.AccAddress, assetPeg types.AssetPeg) IssueAsset

NewIssueAsset : returns issueAsset

func (IssueAsset) GetSignBytes

func (in IssueAsset) GetSignBytes() []byte

GetSignBytes : get bytes to sign

func (IssueAsset) ValidateBasic

func (in IssueAsset) ValidateBasic() cTypes.Error

type MsgFactoryExecuteAssets

type MsgFactoryExecuteAssets struct {
	SendAssets []SendAsset `json:"send_assets"`
}

func NewMsgFactoryExecuteAssets

func NewMsgFactoryExecuteAssets(sendAssets []SendAsset) MsgFactoryExecuteAssets

func (MsgFactoryExecuteAssets) GetSignBytes

func (msg MsgFactoryExecuteAssets) GetSignBytes() []byte

func (MsgFactoryExecuteAssets) GetSigners

func (msg MsgFactoryExecuteAssets) GetSigners() []cTypes.AccAddress

func (MsgFactoryExecuteAssets) Route

func (msg MsgFactoryExecuteAssets) Route() string

func (MsgFactoryExecuteAssets) Type

func (msg MsgFactoryExecuteAssets) Type() string

func (MsgFactoryExecuteAssets) ValidateBasic

func (msg MsgFactoryExecuteAssets) ValidateBasic() cTypes.Error

type MsgFactoryIssueAssets

type MsgFactoryIssueAssets struct {
	IssueAssets []IssueAsset
}

func NewMsgFactoryIssueAssets

func NewMsgFactoryIssueAssets(issueAssets []IssueAsset) MsgFactoryIssueAssets

func (MsgFactoryIssueAssets) GetSignBytes

func (msg MsgFactoryIssueAssets) GetSignBytes() []byte

func (MsgFactoryIssueAssets) GetSigners

func (msg MsgFactoryIssueAssets) GetSigners() []cTypes.AccAddress

func (MsgFactoryIssueAssets) Route

func (msg MsgFactoryIssueAssets) Route() string

func (MsgFactoryIssueAssets) Type

func (msg MsgFactoryIssueAssets) Type() string

func (MsgFactoryIssueAssets) ValidateBasic

func (msg MsgFactoryIssueAssets) ValidateBasic() cTypes.Error

type MsgFactoryRedeemAssets

type MsgFactoryRedeemAssets struct {
	RedeemAssets []RedeemAsset `json:"redeem_assets"`
}

func NewMsgFactoryRedeemAssets

func NewMsgFactoryRedeemAssets(redeemAssets []RedeemAsset) MsgFactoryRedeemAssets

func (MsgFactoryRedeemAssets) GetSignBytes

func (msg MsgFactoryRedeemAssets) GetSignBytes() []byte

func (MsgFactoryRedeemAssets) GetSigners

func (msg MsgFactoryRedeemAssets) GetSigners() []cTypes.AccAddress

func (MsgFactoryRedeemAssets) Route

func (msg MsgFactoryRedeemAssets) Route() string

func (MsgFactoryRedeemAssets) Type

func (msg MsgFactoryRedeemAssets) Type() string

func (MsgFactoryRedeemAssets) ValidateBasic

func (msg MsgFactoryRedeemAssets) ValidateBasic() cTypes.Error

type MsgFactorySendAssets

type MsgFactorySendAssets struct {
	SendAssets []SendAsset `json:"send_assets"`
}

func NewMsgFactorySendAssets

func NewMsgFactorySendAssets(sendAssets []SendAsset) MsgFactorySendAssets

func (MsgFactorySendAssets) GetSignBytes

func (msg MsgFactorySendAssets) GetSignBytes() []byte

func (MsgFactorySendAssets) GetSigners

func (msg MsgFactorySendAssets) GetSigners() []cTypes.AccAddress

func (MsgFactorySendAssets) Route

func (msg MsgFactorySendAssets) Route() string

func (MsgFactorySendAssets) Type

func (msg MsgFactorySendAssets) Type() string

func (MsgFactorySendAssets) ValidateBasic

func (msg MsgFactorySendAssets) ValidateBasic() cTypes.Error

type RedeemAsset

type RedeemAsset struct {
	RelayerAddress cTypes.AccAddress `json:"relayer_address"`
	OwnerAddress   cTypes.AccAddress `json:"owner_address"`
	ToAddress      cTypes.AccAddress `json:"to_address"`
	PegHash        types.PegHash     `json:"peg_hash"`
}

func NewRedeemAsset

func NewRedeemAsset(relayerAddress cTypes.AccAddress, ownerAddress cTypes.AccAddress, toAddress cTypes.AccAddress, pegHash types.PegHash) RedeemAsset

func (RedeemAsset) GetSignBytes

func (in RedeemAsset) GetSignBytes() []byte

func (RedeemAsset) ValidateBasic

func (in RedeemAsset) ValidateBasic() cTypes.Error

type SendAsset

type SendAsset struct {
	RelayerAddress cTypes.AccAddress `json:"relayer_address"`
	FromAddress    cTypes.AccAddress `json:"from_address"`
	ToAddress      cTypes.AccAddress `json:"to_address"`
	PegHash        types.PegHash     `json:"peg_hash"`
}

func NewSendAsset

func NewSendAsset(relayerAddress cTypes.AccAddress, fromAddress cTypes.AccAddress, toAddress cTypes.AccAddress, peghash types.PegHash) SendAsset

func (SendAsset) GetSignBytes

func (in SendAsset) GetSignBytes() []byte

func (SendAsset) ValidateBasic

func (in SendAsset) ValidateBasic() cTypes.Error

Jump to

Keyboard shortcuts

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