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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCodeSpace         ctypes.CodespaceType = ModuleName
	CodeInvalidAmount        ctypes.CodeType      = 601
	CodeInvalidString        ctypes.CodeType      = 602
	CodeInvalidInputsOutputs ctypes.CodeType      = 603
	CodeInvalidPegHash       ctypes.CodeType      = 604
)
View Source
const (
	ModuleName   = "fiat"
	StoreKey     = ModuleName
	RouterKey    = StoreKey
	QuerierRoute = RouterKey
)

Variables

View Source
var (
	EventTypeFiatFactoryAssignFiat  = "AssignFiat"
	EventTypeFiatFactoryRedeemFiat  = "RedeemFiat"
	EventTypeFiatFactorySendFiat    = "SendFiat"
	EventTypeFiatFactoryExecuteFiat = "ExecuteFiat"
)
View Source
var ModuleCdc *codec.Codec
View Source
var (
	PegHashKey = []byte{0x01}
)

Functions

func BuildExecuteFiatMsg

func BuildExecuteFiatMsg(relayerAddress ctypes.AccAddress, fromAddress ctypes.AccAddress, toAddress ctypes.AccAddress, pegHash types.PegHash, fiatPegWallet types.FiatPegWallet) ctypes.Msg

BuildExecuteFiatMsg : build the executeFiatTx

func BuildIssueFiatMsg

func BuildIssueFiatMsg(issuerAddress ctypes.AccAddress, toAddress ctypes.AccAddress, fiatPeg types.FiatPeg) ctypes.Msg

func BuildRedeemFiatMsg

func BuildRedeemFiatMsg(relayerAddress ctypes.AccAddress, redeemerAddress ctypes.AccAddress, amount int64, wallet types.FiatPegWallet) ctypes.Msg

func BuildSendFiatMsg

func BuildSendFiatMsg(relayerAddress ctypes.AccAddress, fromAddress ctypes.AccAddress, toAddress ctypes.AccAddress, pegHash types.PegHash, fiatPegWallet types.FiatPegWallet) ctypes.Msg

func ErrInvalidAmount

func ErrInvalidAmount(codespace ctypes.CodespaceType, msg string) ctypes.Error

func ErrInvalidPegHash

func ErrInvalidPegHash(codespace ctypes.CodespaceType) ctypes.Error

func ErrInvalidString

func ErrInvalidString(codespace ctypes.CodespaceType, msg string) ctypes.Error

func ErrNoInputs

func ErrNoInputs(codespace ctypes.CodespaceType) ctypes.Error

func FiatPegHashStoreKey

func FiatPegHashStoreKey(fiatPegHash types.PegHash) []byte

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 {
}

func DefaultGenesisState

func DefaultGenesisState() GenesisState

type IssueFiat

type IssueFiat struct {
	IssuerAddress ctypes.AccAddress `json:"issuer_address"`
	ToAddress     ctypes.AccAddress `json:"to_address"`
	FiatPeg       types.FiatPeg     `json:"fiat_peg"`
}

func NewIssueFiat

func NewIssueFiat(issuerAddress ctypes.AccAddress, toAddress ctypes.AccAddress, fiatPeg types.FiatPeg) IssueFiat

func (IssueFiat) GetSignBytes

func (in IssueFiat) GetSignBytes() []byte

func (IssueFiat) ValidateBasic

func (in IssueFiat) ValidateBasic() ctypes.Error

type MsgFactoryExecuteFiats

type MsgFactoryExecuteFiats struct {
	SendFiats []SendFiat `json:"sendFiats"`
}

func NewMsgFactoryExecuteFiats

func NewMsgFactoryExecuteFiats(sendFiats []SendFiat) MsgFactoryExecuteFiats

NewMsgFactoryExecuteFiats : initilizer

func (MsgFactoryExecuteFiats) GetSignBytes

func (msg MsgFactoryExecuteFiats) GetSignBytes() []byte

GetSignBytes : implements msg

func (MsgFactoryExecuteFiats) GetSigners

func (msg MsgFactoryExecuteFiats) GetSigners() []ctypes.AccAddress

GetSigners : implements msg

func (MsgFactoryExecuteFiats) Route

func (msg MsgFactoryExecuteFiats) Route() string

func (MsgFactoryExecuteFiats) Type

func (msg MsgFactoryExecuteFiats) Type() string

Type : implements msg

func (MsgFactoryExecuteFiats) ValidateBasic

func (msg MsgFactoryExecuteFiats) ValidateBasic() ctypes.Error

ValidateBasic : implements msg

type MsgFactoryIssueFiats

type MsgFactoryIssueFiats struct {
	IssueFiats []IssueFiat `json:"issue_fiats"`
}

func NewMsgFactoryIssueFiats

func NewMsgFactoryIssueFiats(issueFiats []IssueFiat) MsgFactoryIssueFiats

func (MsgFactoryIssueFiats) GetSignBytes

func (msg MsgFactoryIssueFiats) GetSignBytes() []byte

func (MsgFactoryIssueFiats) GetSigners

func (msg MsgFactoryIssueFiats) GetSigners() []ctypes.AccAddress

func (MsgFactoryIssueFiats) Route

func (msg MsgFactoryIssueFiats) Route() string

func (MsgFactoryIssueFiats) Type

func (msg MsgFactoryIssueFiats) Type() string

func (MsgFactoryIssueFiats) ValidateBasic

func (msg MsgFactoryIssueFiats) ValidateBasic() ctypes.Error

type MsgFactoryRedeemFiats

type MsgFactoryRedeemFiats struct {
	RedeemFiats []RedeemFiat `json:"redeem_fiats"`
}

func NewMsgFactoryRedeemFiats

func NewMsgFactoryRedeemFiats(redeemFiats []RedeemFiat) MsgFactoryRedeemFiats

func (MsgFactoryRedeemFiats) GetSignBytes

func (msg MsgFactoryRedeemFiats) GetSignBytes() []byte

func (MsgFactoryRedeemFiats) GetSigners

func (msg MsgFactoryRedeemFiats) GetSigners() []ctypes.AccAddress

func (MsgFactoryRedeemFiats) Route

func (msg MsgFactoryRedeemFiats) Route() string

func (MsgFactoryRedeemFiats) Type

func (msg MsgFactoryRedeemFiats) Type() string

func (MsgFactoryRedeemFiats) ValidateBasic

func (msg MsgFactoryRedeemFiats) ValidateBasic() ctypes.Error

type MsgFactorySendFiats

type MsgFactorySendFiats struct {
	SendFiats []SendFiat `json:"send_fiats"`
}

func NewMsgFactorySendFiats

func NewMsgFactorySendFiats(sendFiats []SendFiat) MsgFactorySendFiats

func (MsgFactorySendFiats) GetSignBytes

func (msg MsgFactorySendFiats) GetSignBytes() []byte

func (MsgFactorySendFiats) GetSigners

func (msg MsgFactorySendFiats) GetSigners() []ctypes.AccAddress

func (MsgFactorySendFiats) Route

func (msg MsgFactorySendFiats) Route() string

func (MsgFactorySendFiats) Type

func (msg MsgFactorySendFiats) Type() string

func (MsgFactorySendFiats) ValidateBasic

func (msg MsgFactorySendFiats) ValidateBasic() ctypes.Error

type RedeemFiat

type RedeemFiat struct {
	RelayerAddress  ctypes.AccAddress   `json:"relayer_address"`
	RedeemerAddress ctypes.AccAddress   `json:"redeemer_address"`
	Amount          int64               `json:"amount"`
	FiatPegWallet   types.FiatPegWallet `json:"fiat_peg_wallet"`
}

func NewRedeemFiat

func NewRedeemFiat(relayerAddress ctypes.AccAddress, redeemerAddress ctypes.AccAddress, amount int64, wallet types.FiatPegWallet) RedeemFiat

func (RedeemFiat) GetSignBytes

func (in RedeemFiat) GetSignBytes() []byte

func (RedeemFiat) ValidateBasic

func (in RedeemFiat) ValidateBasic() ctypes.Error

type SendFiat

type SendFiat struct {
	RelayerAddress ctypes.AccAddress   `json:"relayerAddress"`
	FromAddress    ctypes.AccAddress   `json:"fromAddress"`
	ToAddress      ctypes.AccAddress   `json:"toAddress"`
	PegHash        types.PegHash       `json:"pegHash"`
	FiatPegWallet  types.FiatPegWallet `json:"fiatPegWallet"`
}

func NewSendFiat

func NewSendFiat(relayerAddress ctypes.AccAddress, fromAddress ctypes.AccAddress, toAddress ctypes.AccAddress, hash types.PegHash, wallet types.FiatPegWallet) SendFiat

func (SendFiat) GetSignBytes

func (in SendFiat) GetSignBytes() []byte

func (SendFiat) ValidateBasic

func (in SendFiat) ValidateBasic() ctypes.Error

Jump to

Keyboard shortcuts

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