types

package
v0.0.0-...-25b3476 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCodespace sdk.CodespaceType = ModuleName

	CodeInvalidInput         CodeType     = 101
	CodeSendDisabled         sdk.CodeType = 102
	CodeInvalidInputsOutputs sdk.CodeType = 13

	CodeInvalidAddress CodeType = sdk.CodeInvalidAddress
)
View Source
const (
	EventTypeTransfer               = "transfer"
	EventTypeMultiTransfer          = "multi_transfer"
	EventTypeDeposit                = "deposit"
	EventTypeDepositConfirm         = "deposit_confirm"
	EventTypeCollectWaitSign        = "collect_wait_sign"
	EventTypeCollectSignFinish      = "collect_sign_finish"
	EventTypeCollectFinish          = "collect_finish"
	EventTypeRecollect              = "recollect"
	EventTypeWithdrawal             = "withdrawal"
	EventTypeWithdrawalConfirm      = "withdrawal_confirm"
	EventTypeWithdrawalWaitSign     = "withdrawal_wait_sign"
	EventTypeWithdrawalSignFinish   = "withdrawal_sign_finish"
	EventTypeWithdrawalFinish       = "withdrawal_finish"
	EventTypeCancelWithdrawal       = "cancel_withdrawal"
	EventTypeForceCancelWithdrawal  = "force_cancel_withdrawal"
	EventTypeSysTransfer            = "sys_transfer"
	EventTypeSysTransferWaitSign    = "sys_transfer_wait_sign"
	EventTypeSysTransferSignFinish  = "sys_transfer_sign_finish"
	EventTypeSysTransferFinish      = "sys_transfer_finish"
	EventTypeOpcuTransfer           = "opcu_transfer"
	EventTypeOpcuTransferWaitSign   = "opcu_transfer_wait_sign"
	EventTypeOpcuTransferSignFinish = "opcu_transfer_sign_finish"
	EventTypeOpcuTransferFinish     = "opcu_transfer_finish"
	EventTypeOrderRetry             = "order_retry"
	EventTypeForceUpdateCUNonce     = "update_cu_nonce"

	AttributeKeyRecipient       = "recipient"
	AttributeKeySender          = "sender"
	AttributeKeySymbol          = "symbol"
	AttributeKeyAmount          = "amount"
	AttributeKeyHash            = "hash"
	AttributeKeyIndex           = "index"
	AttributeKeyMemo            = "memo"
	AttributeKeyOrderIDs        = "order_ids"
	AttributeKeyOrderID         = "order_id"
	AttributeKeyValidOrderIDs   = "valid_order_ids"
	AttributeKeyInvalidOrderIDs = "invalid_order_ids"

	AttributeValueCategory = ModuleName
)

bank module event types

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

	// StoreKey is the string store representation
	StoreKey = ModuleName

	// TStoreKey is the string transient store representation
	TStoreKey = "transient_" + ModuleName

	// QuerierRoute is the querier route for the staking module
	QuerierRoute = ModuleName

	// RouterKey is the msg router key for the staking module
	RouterKey = ModuleName

	MaxKeyNodeHeartbeat = 1000
)
View Source
const (
	// DefaultParamspace for params keeper
	DefaultParamspace = ModuleName
	// DefaultSendEnabled enabled
	DefaultSendEnabled = true

	MaxSystransferNum = 10
)
View Source
const (
	// query balance path
	QueryBalance    = "balance"
	QueryAllBalance = "balances"
)

Variables

View Source
var (
	OrderRetryTimesPrefix           = []byte{0x01}
	OrderRetryEvidenceHandledPrefix = []byte{0x02}
)
View Source
var ModuleCdc *codec.Codec

ModuleCdc - module codec

View Source
var ParamStoreKeySendEnabled = []byte("sendenabled")

ParamStoreKeySendEnabled is store's key for SendEnabled

Functions

func BalanceKey

func BalanceKey(addr sdk.CUAddress, symbol string) []byte

func BalanceKeyPrefix

func BalanceKeyPrefix(addr sdk.CUAddress) []byte

func ErrBadAddress

func ErrBadAddress(codespace sdk.CodespaceType) sdk.Error

func ErrBadCostFee

func ErrBadCostFee(codespace sdk.CodespaceType) sdk.Error

func ErrInputOutputMismatch

func ErrInputOutputMismatch(codespace sdk.CodespaceType) sdk.Error

ErrInputOutputMismatch is an error

func ErrInvalidParam

func ErrInvalidParam(codespace sdk.CodespaceType) sdk.Error

func ErrNilOrderID

func ErrNilOrderID(codespace sdk.CodespaceType) sdk.Error

func ErrNilRawData

func ErrNilRawData(codespace sdk.CodespaceType) sdk.Error

func ErrNilSignHash

func ErrNilSignHash(codespace sdk.CodespaceType) sdk.Error

func ErrNilSignedTx

func ErrNilSignedTx(codespace sdk.CodespaceType) sdk.Error

func ErrNoInputs

func ErrNoInputs(codespace sdk.CodespaceType) sdk.Error

ErrNoInputs is an error

func ErrNoOutputs

func ErrNoOutputs(codespace sdk.CodespaceType) sdk.Error

ErrNoOutputs is an error

func ErrSendDisabled

func ErrSendDisabled(codespace sdk.CodespaceType) sdk.Error

ErrSendDisabled is an error

func GetOrderRetryEvidenceHandledKey

func GetOrderRetryEvidenceHandledKey(txID string, retryTimes uint32) []byte

func GetSymbolFromBalanceKey

func GetSymbolFromBalanceKey(key []byte) string

func GetSymbolFromHoldBalanceKey

func GetSymbolFromHoldBalanceKey(key []byte) string

func HoldBalanceKey

func HoldBalanceKey(addr sdk.CUAddress, symbol string) []byte

func HoldBalanceKeyPrefix

func HoldBalanceKeyPrefix(addr sdk.CUAddress) []byte

func NewOrderRetryVoteBox

func NewOrderRetryVoteBox(confirmThreshold int) evidence.VoteBox

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable type declaration for parameters

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Register concrete types on codec codec

func ValidateInputsOutputs

func ValidateInputsOutputs(inputs []Input, outputs []Output) sdk.Error

ValidateInputsOutputs validates that each respective input and output is valid and that the sum of inputs is equal to the sum of outputs.

Types

type CUKeeper

type CUKeeper interface {
	NewCUWithAddress(ctx sdk.Context, cuType sdk.CUType, addr sdk.CUAddress) exported.CustodianUnit

	GetCU(ctx sdk.Context, addr sdk.CUAddress) exported.CustodianUnit
	GetOrNewCU(context sdk.Context, cuType sdk.CUType, addresses sdk.CUAddress) exported.CustodianUnit
	GetAllCUs(ctx sdk.Context) []exported.CustodianUnit
	SetCU(ctx sdk.Context, acc exported.CustodianUnit)
	IterateCUs(ctx sdk.Context, process func(exported.CustodianUnit) bool)

	GetOpCUs(ctx sdk.Context, symbol string) []exported.CustodianUnit
	GetCUFromExtAddress(ctx sdk.Context, symbol, extAddress string) (sdk.CUAddress, error)
}

CUKeeper defines the CustodianUnit contract that must be fulfilled when creating a x/bank keeper.

type Chainnode

type Chainnode interface {
	SupportChain(chain string) bool
	ValidAddress(chain, symbol, address string) (bool, string)
	QueryBalance(chain, symbol, address, contractAddress string, blockHeight uint64) (sdk.Int, error)
	QueryUtxo(chain, symbol string, vin *sdk.UtxoIn) (bool, error)
	QueryGasPrice(chain string) (sdk.Int, error)
	QueryUtxoTransaction(chain, symbol, hash string, asynMode bool) (*chainnode.ExtUtxoTransaction, error)
	QueryAccountTransaction(chain, symbol, hash string, asynMode bool) (*chainnode.ExtAccountTransaction, error)
	VerifyUtxoSignedTransaction(chain, symbol string, address []string, signedTxData []byte, vins []*sdk.UtxoIn) (bool, error)
	VerifyAccountSignedTransaction(chain, symbol string, address string, signedTxData []byte) (bool, error)
	QueryAccountTransactionFromSignedData(chain, symbol string, signedTxData []byte) (*chainnode.ExtAccountTransaction, error)
	QueryUtxoTransactionFromSignedData(chain, symbol string, signedTxData []byte, vins []*sdk.UtxoIn) (*chainnode.ExtUtxoTransaction, error)
	QueryAccountTransactionFromData(chain, symbol string, rawData []byte) (*chainnode.ExtAccountTransaction, []byte, error)
	QueryUtxoTransactionFromData(chain, symbol string, rawData []byte, vins []*sdk.UtxoIn) (*chainnode.ExtUtxoTransaction, [][]byte, error)
	QueryUtxoInsFromData(chain, symbol string, data []byte) ([]*sdk.UtxoIn, error)
}

type CodeType

type CodeType = sdk.CodeType

type EvidenceKeeper

type EvidenceKeeper interface {
	HandleBehaviour(ctx sdk.Context, behaviourKey string, validator sdk.ValAddress, height uint64, normal bool)
	Vote(sdk.Context, string, sdk.CUAddress, evidencetypes.Vote, uint64) (bool, bool, []*evidencetypes.VoteItem)
	VoteWithCustomBox(ctx sdk.Context, voteID string, voter sdk.CUAddress, vote evidencetypes.Vote, height uint64, newVoteBox evidencetypes.NewVoteBox) (bool, bool, []*evidencetypes.VoteItem)
}

type EvidenceValidator

type EvidenceValidator struct {
	EvidenceType int    `json:"evidence_type"`
	Validator    string `json:"validator"`
}

type IBCAssetKeeper

type IBCAssetKeeper interface {
	GetCUIBCAsset(context sdk.Context, addresses sdk.CUAddress) ibcexported.CUIBCAsset
	NewCUIBCAssetWithAddress(ctx sdk.Context, cuType sdk.CUType, cuaddr sdk.CUAddress) ibcexported.CUIBCAsset
	SetCUIBCAsset(ctx sdk.Context, cuAst ibcexported.CUIBCAsset)

	//Deposit operation
	GetDepositList(ctx sdk.Context, symbol string, address sdk.CUAddress) sdk.DepositList
	GetDepositListByHash(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string) sdk.DepositList
	SetDepositList(ctx sdk.Context, symbol string, address sdk.CUAddress, list sdk.DepositList)
	SaveDeposit(ctx sdk.Context, symbol string, address sdk.CUAddress, deposit sdk.DepositItem) error
	DelDeposit(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, index uint64)
	SetDepositStatus(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, index uint64, status sdk.DepositItemStatus) error
	GetDeposit(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, index uint64) sdk.DepositItem
	IsDepositExist(ctx sdk.Context, symbol string, address sdk.CUAddress, hash string, index uint64) bool
}

type Input

type Input struct {
	Address sdk.CUAddress `json:"address" yaml:"address"`
	Coins   sdk.Coins     `json:"coins" yaml:"coins"`
}

Input models transaction input

func NewInput

func NewInput(addr sdk.CUAddress, coins sdk.Coins) Input

NewInput - create a transaction input, used with MsgMultiSend

func (Input) ValidateBasic

func (in Input) ValidateBasic() sdk.Error

ValidateBasic - validate transaction input

type MsgCancelWithdrawal

type MsgCancelWithdrawal struct {
	FromCU  string `json:"from_cu"`
	OrderID string `json:"order_id"`
}

func NewMsgCancelWithdrawal

func NewMsgCancelWithdrawal(fromCU string, orderID string) MsgCancelWithdrawal

func (MsgCancelWithdrawal) GetSignBytes

func (msg MsgCancelWithdrawal) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgCancelWithdrawal) GetSigners

func (msg MsgCancelWithdrawal) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgCancelWithdrawal) Route

func (msg MsgCancelWithdrawal) Route() string

nolint

func (MsgCancelWithdrawal) Type

func (msg MsgCancelWithdrawal) Type() string

func (MsgCancelWithdrawal) ValidateBasic

func (msg MsgCancelWithdrawal) ValidateBasic() sdk.Error

quick validity check

type MsgCollectFinish

type MsgCollectFinish struct {
	OrderIDs  []string `json:"order_ids"`
	CostFee   sdk.Int  `json:"cost_fee"`
	Validator string   `json:"validator"`
	Success   bool     `json:"success"`
}

________________________________

func NewMsgCollectFinish

func NewMsgCollectFinish(valAddr string, ids []string, fee sdk.Int, success bool) MsgCollectFinish

func (MsgCollectFinish) GetSignBytes

func (msg MsgCollectFinish) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgCollectFinish) GetSigners

func (msg MsgCollectFinish) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgCollectFinish) IsSettleOnlyMsg

func (msg MsgCollectFinish) IsSettleOnlyMsg() bool

func (MsgCollectFinish) Route

func (msg MsgCollectFinish) Route() string

nolint

func (MsgCollectFinish) Type

func (msg MsgCollectFinish) Type() string

func (MsgCollectFinish) ValidateBasic

func (msg MsgCollectFinish) ValidateBasic() sdk.Error

quick validity check

type MsgCollectSignFinish

type MsgCollectSignFinish struct {
	OrderIDs  []string `json:"order_ids"`
	SignedTx  []byte   `json:"signed_tx"`
	Validator string   `json:"validator"`
}

________________________________

func NewMsgCollectSignFinish

func NewMsgCollectSignFinish(valAddr string, ids []string, signedTx []byte) MsgCollectSignFinish

func (MsgCollectSignFinish) GetSignBytes

func (msg MsgCollectSignFinish) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgCollectSignFinish) GetSigners

func (msg MsgCollectSignFinish) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgCollectSignFinish) IsSettleOnlyMsg

func (msg MsgCollectSignFinish) IsSettleOnlyMsg() bool

func (MsgCollectSignFinish) Route

func (msg MsgCollectSignFinish) Route() string

nolint

func (MsgCollectSignFinish) Type

func (msg MsgCollectSignFinish) Type() string

func (MsgCollectSignFinish) ValidateBasic

func (msg MsgCollectSignFinish) ValidateBasic() sdk.Error

quick validity check

type MsgCollectWaitSign

type MsgCollectWaitSign struct {
	OrderIDs    []string `json:"order_ids"`
	RawData     []byte   `json:"raw_data"`
	CollectToCU string   `json:"collect_to_cu"`
	Validator   string   `json:"validator"` //是谁在归集
}

________________________________

func NewMsgCollectWaitSign

func NewMsgCollectWaitSign(collectToCU, valAddr string, ids []string, rawdata []byte) MsgCollectWaitSign

func (MsgCollectWaitSign) GetSignBytes

func (msg MsgCollectWaitSign) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgCollectWaitSign) GetSigners

func (msg MsgCollectWaitSign) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgCollectWaitSign) IsSettleOnlyMsg

func (msg MsgCollectWaitSign) IsSettleOnlyMsg() bool

func (MsgCollectWaitSign) Route

func (msg MsgCollectWaitSign) Route() string

nolint

func (MsgCollectWaitSign) Type

func (msg MsgCollectWaitSign) Type() string

func (MsgCollectWaitSign) ValidateBasic

func (msg MsgCollectWaitSign) ValidateBasic() sdk.Error

quick validity check

type MsgConfirmedDeposit

type MsgConfirmedDeposit struct {
	From            sdk.CUAddress `json:"from_cu"`
	ValidOrderIDs   []string      `json:"validorderids"`
	InvalidOrderIDs []string      `json:"invalidorderids"`
}

func NewMsgConfirmedDeposit

func NewMsgConfirmedDeposit(from sdk.CUAddress, validaOrderIDs, invalidOrderIDs []string) MsgConfirmedDeposit

func (MsgConfirmedDeposit) GetSignBytes

func (msg MsgConfirmedDeposit) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgConfirmedDeposit) GetSigners

func (msg MsgConfirmedDeposit) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgConfirmedDeposit) IsSettleOnlyMsg

func (msg MsgConfirmedDeposit) IsSettleOnlyMsg() bool

func (MsgConfirmedDeposit) Route

func (msg MsgConfirmedDeposit) Route() string

nolint

func (MsgConfirmedDeposit) Type

func (msg MsgConfirmedDeposit) Type() string

func (MsgConfirmedDeposit) ValidateBasic

func (msg MsgConfirmedDeposit) ValidateBasic() sdk.Error

quick validity check

type MsgDeposit

type MsgDeposit struct {
	FromCU    sdk.CUAddress `json:"from_cu"`
	ToCU      sdk.CUAddress `json:"to_cu"`
	ToAddress string        `json:"to_adddress"`
	Symbol    sdk.Symbol    `json:"symbol"`
	Amount    sdk.Int       `json:"amount"`
	Index     uint16        `json:"index"`
	Txhash    string        `json:"txhash"`
	OrderID   string        `json:"order_id"`
	Memo      string        `json:"memo"`
}

________________________________

func NewMsgDeposit

func NewMsgDeposit(fromCU, toCU sdk.CUAddress, symbol sdk.Symbol, toAddr, hash, orderID, memo string, amount sdk.Int, index uint16) MsgDeposit

func (MsgDeposit) GetSignBytes

func (msg MsgDeposit) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgDeposit) GetSigners

func (msg MsgDeposit) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgDeposit) IsSettleOnlyMsg

func (msg MsgDeposit) IsSettleOnlyMsg() bool

func (MsgDeposit) Route

func (msg MsgDeposit) Route() string

nolint

func (MsgDeposit) Type

func (msg MsgDeposit) Type() string

func (MsgDeposit) ValidateBasic

func (msg MsgDeposit) ValidateBasic() sdk.Error

quick validity check

type MsgForceCancelWithdrawal

type MsgForceCancelWithdrawal struct {
	FromCU  string `json:"from_cu"`
	OrderID string `json:"order_id"`
}

func NewMsgForceCancelWithdrawal

func NewMsgForceCancelWithdrawal(fromCU string, orderID string) MsgForceCancelWithdrawal

func (MsgForceCancelWithdrawal) GetSignBytes

func (msg MsgForceCancelWithdrawal) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgForceCancelWithdrawal) GetSigners

func (msg MsgForceCancelWithdrawal) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgForceCancelWithdrawal) Route

func (msg MsgForceCancelWithdrawal) Route() string

nolint

func (MsgForceCancelWithdrawal) Type

func (msg MsgForceCancelWithdrawal) Type() string

func (MsgForceCancelWithdrawal) ValidateBasic

func (msg MsgForceCancelWithdrawal) ValidateBasic() sdk.Error

quick validity check

type MsgForceUpdateCUNonce

type MsgForceUpdateCUNonce struct {
	FromCU    string `json:"from_cu"`
	CUAddr    string `json:"opcu_addr"`
	Nonce     uint64 `json:"nonce"`
	Chain     string `json:"chain"`
	AssetAddr string `json:"asset_addr"`
}

fix bug--opcu statu locked

func NewMsgForceUpdateCUNonce

func NewMsgForceUpdateCUNonce(fromCU string, cuAddr string, chain string, assetAddr string, nonce uint64) MsgForceUpdateCUNonce

func (MsgForceUpdateCUNonce) GetSignBytes

func (msg MsgForceUpdateCUNonce) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgForceUpdateCUNonce) GetSigners

func (msg MsgForceUpdateCUNonce) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgForceUpdateCUNonce) Route

func (msg MsgForceUpdateCUNonce) Route() string

nolint

func (MsgForceUpdateCUNonce) Type

func (msg MsgForceUpdateCUNonce) Type() string

func (MsgForceUpdateCUNonce) ValidateBasic

func (msg MsgForceUpdateCUNonce) ValidateBasic() sdk.Error

quick validity check

type MsgMultiSend

type MsgMultiSend struct {
	Inputs    []Input  `json:"inputs" yaml:"inputs"`
	Outputs   []Output `json:"outputs" yaml:"outputs"`
	MaxHeight uint64   `json:"max_height" yaml:"max_height"`
}

MsgMultiSend - high level transaction of the coin module

func NewMsgMultiSend

func NewMsgMultiSend(in []Input, out []Output, maxHeight uint64) MsgMultiSend

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

func (MsgMultiSend) GetSignBytes

func (msg MsgMultiSend) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgMultiSend) GetSigners

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

GetSigners Implements Msg.

func (MsgMultiSend) Route

func (msg MsgMultiSend) Route() string

Route Implements Msg

func (MsgMultiSend) Type

func (msg MsgMultiSend) Type() string

Type Implements Msg

func (MsgMultiSend) ValidateBasic

func (msg MsgMultiSend) ValidateBasic() sdk.Error

ValidateBasic Implements Msg.

type MsgOpcuAssetTransfer

type MsgOpcuAssetTransfer struct {
	FromCU        string             `json:"from_cu"`
	OpCU          string             `json:"opcu"`
	ToAddr        string             `json:"to_addr"`
	Symbol        string             `json:"symbol"`
	TransferItems []sdk.TransferItem `json:"transfer_items,omitempty"`
	OrderID       string             `json:"order_id"`
}

________________________________

func NewMsgOpcuAssetTransfer

func NewMsgOpcuAssetTransfer(fromCU, opCU, toAddr, symbol, orderID string, items []sdk.TransferItem) MsgOpcuAssetTransfer

func (MsgOpcuAssetTransfer) GetSignBytes

func (msg MsgOpcuAssetTransfer) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgOpcuAssetTransfer) GetSigners

func (msg MsgOpcuAssetTransfer) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgOpcuAssetTransfer) IsSettleOnlyMsg

func (msg MsgOpcuAssetTransfer) IsSettleOnlyMsg() bool

func (MsgOpcuAssetTransfer) Route

func (msg MsgOpcuAssetTransfer) Route() string

nolint

func (MsgOpcuAssetTransfer) Type

func (msg MsgOpcuAssetTransfer) Type() string

func (MsgOpcuAssetTransfer) ValidateBasic

func (msg MsgOpcuAssetTransfer) ValidateBasic() sdk.Error

quick validity check

type MsgOpcuAssetTransferFinish

type MsgOpcuAssetTransferFinish struct {
	OrderID   string  `json:"order_id"`
	CostFee   sdk.Int `json:"cost_fee"`
	Validator string  `json:"validator"`
}

________________________________

func NewMsgOpcuAssetTransferFinish

func NewMsgOpcuAssetTransferFinish(valAddr string, id string, fee sdk.Int) MsgOpcuAssetTransferFinish

func (MsgOpcuAssetTransferFinish) GetSignBytes

func (msg MsgOpcuAssetTransferFinish) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgOpcuAssetTransferFinish) GetSigners

func (msg MsgOpcuAssetTransferFinish) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgOpcuAssetTransferFinish) IsSettleOnlyMsg

func (msg MsgOpcuAssetTransferFinish) IsSettleOnlyMsg() bool

func (MsgOpcuAssetTransferFinish) Route

func (msg MsgOpcuAssetTransferFinish) Route() string

nolint

func (MsgOpcuAssetTransferFinish) Type

func (MsgOpcuAssetTransferFinish) ValidateBasic

func (msg MsgOpcuAssetTransferFinish) ValidateBasic() sdk.Error

quick validity check

type MsgOpcuAssetTransferSignFinish

type MsgOpcuAssetTransferSignFinish struct {
	OrderID   string `json:"order_id"`
	SignedTx  []byte `json:"signed_tx"`
	Validator string `json:"validator"`
}

________________________________

func NewMsgOpcuAssetTransferSignFinish

func NewMsgOpcuAssetTransferSignFinish(valAddr, id string, signedTx []byte) MsgOpcuAssetTransferSignFinish

func (MsgOpcuAssetTransferSignFinish) GetSignBytes

func (msg MsgOpcuAssetTransferSignFinish) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgOpcuAssetTransferSignFinish) GetSigners

func (msg MsgOpcuAssetTransferSignFinish) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgOpcuAssetTransferSignFinish) IsSettleOnlyMsg

func (msg MsgOpcuAssetTransferSignFinish) IsSettleOnlyMsg() bool

func (MsgOpcuAssetTransferSignFinish) Route

nolint

func (MsgOpcuAssetTransferSignFinish) Type

func (MsgOpcuAssetTransferSignFinish) ValidateBasic

func (msg MsgOpcuAssetTransferSignFinish) ValidateBasic() sdk.Error

quick validity check

type MsgOpcuAssetTransferWaitSign

type MsgOpcuAssetTransferWaitSign struct {
	OrderID    string   `json:"order_id"`
	SignHashes [][]byte `json:"sign_hashes"`
	RawData    []byte   `json:"raw_data"`
	Validator  string   `json:"validator"`
}

________________________________

func NewMsgOpcuAssetTransferWaitSign

func NewMsgOpcuAssetTransferWaitSign(valAddr, id string, signHashes [][]byte, rawdata []byte) MsgOpcuAssetTransferWaitSign

func (MsgOpcuAssetTransferWaitSign) GetSignBytes

func (msg MsgOpcuAssetTransferWaitSign) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgOpcuAssetTransferWaitSign) GetSigners

func (msg MsgOpcuAssetTransferWaitSign) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgOpcuAssetTransferWaitSign) IsSettleOnlyMsg

func (msg MsgOpcuAssetTransferWaitSign) IsSettleOnlyMsg() bool

func (MsgOpcuAssetTransferWaitSign) Route

nolint

func (MsgOpcuAssetTransferWaitSign) Type

func (MsgOpcuAssetTransferWaitSign) ValidateBasic

func (msg MsgOpcuAssetTransferWaitSign) ValidateBasic() sdk.Error

quick validity check

type MsgOrderRetry

type MsgOrderRetry struct {
	OrderIDs   []string            `json:"order_ids"`
	RetryTimes uint32              `json:"retry_times"`
	Evidences  []EvidenceValidator `json:"evidences,omitempty"`
	From       string              `json:"from"`
}

________________________________

func NewMsgOrderRetry

func NewMsgOrderRetry(from string, ids []string, retrytimes uint32, evidences []EvidenceValidator) MsgOrderRetry

func (MsgOrderRetry) GetSignBytes

func (msg MsgOrderRetry) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgOrderRetry) GetSigners

func (msg MsgOrderRetry) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgOrderRetry) IsSettleOnlyMsg

func (msg MsgOrderRetry) IsSettleOnlyMsg() bool

func (MsgOrderRetry) Route

func (msg MsgOrderRetry) Route() string

nolint

func (MsgOrderRetry) Type

func (msg MsgOrderRetry) Type() string

func (MsgOrderRetry) ValidateBasic

func (msg MsgOrderRetry) ValidateBasic() sdk.Error

quick validity check

type MsgRecollect

type MsgRecollect struct {
	OrderIDs  []string `json:"order_ids"`
	Validator string   `json:"validator"`
}

func NewMsgRecollect

func NewMsgRecollect(valAddr string, ids []string) MsgRecollect

func (MsgRecollect) GetSignBytes

func (msg MsgRecollect) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgRecollect) GetSigners

func (msg MsgRecollect) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgRecollect) IsSettleOnlyMsg

func (msg MsgRecollect) IsSettleOnlyMsg() bool

func (MsgRecollect) Route

func (msg MsgRecollect) Route() string

nolint

func (MsgRecollect) Type

func (msg MsgRecollect) Type() string

func (MsgRecollect) ValidateBasic

func (msg MsgRecollect) ValidateBasic() sdk.Error

quick validity check

type MsgSend

type MsgSend struct {
	FromAddress sdk.CUAddress `json:"from_address" yaml:"from_address"`
	ToAddress   sdk.CUAddress `json:"to_address" yaml:"to_address"`
	Amount      sdk.Coins     `json:"amount" yaml:"amount"`
}

MsgSend - high level transaction of the coin module

func NewMsgSend

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

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

func (MsgSend) GetSignBytes

func (msg MsgSend) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgSend) GetSigners

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

GetSigners Implements Msg.

func (MsgSend) Route

func (msg MsgSend) Route() string

Route Implements Msg.

func (MsgSend) Type

func (msg MsgSend) Type() string

Type Implements Msg.

func (MsgSend) ValidateBasic

func (msg MsgSend) ValidateBasic() sdk.Error

ValidateBasic Implements Msg.

type MsgSysTransfer

type MsgSysTransfer struct {
	FromCU    sdk.CUAddress `json:"from_cu"`
	ToCU      sdk.CUAddress `json:"to_cu"`
	ToAddress string        `json:"to_address"`
	Symbol    string        `json:"symbol"`
	OrderID   string        `json:"order_id"`
	Validator string        `json:"validator"`
}

________________________________

func NewMsgSysTransfer

func NewMsgSysTransfer(fromCU, toCU sdk.CUAddress, toAddr, symbol, orderID, valAddr string) MsgSysTransfer

func (MsgSysTransfer) GetSignBytes

func (msg MsgSysTransfer) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgSysTransfer) GetSigners

func (msg MsgSysTransfer) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgSysTransfer) IsSettleOnlyMsg

func (msg MsgSysTransfer) IsSettleOnlyMsg() bool

func (MsgSysTransfer) Route

func (msg MsgSysTransfer) Route() string

nolint

func (MsgSysTransfer) Type

func (msg MsgSysTransfer) Type() string

func (MsgSysTransfer) ValidateBasic

func (msg MsgSysTransfer) ValidateBasic() sdk.Error

quick validity check

type MsgSysTransferFinish

type MsgSysTransferFinish struct {
	OrderID   string  `json:"order_id"`
	CostFee   sdk.Int `json:"cost_fee"`
	Validator string  `json:"validator"`
}

________________________________

func NewMsgSysTransferFinish

func NewMsgSysTransferFinish(valAddr, orderid string, fee sdk.Int) MsgSysTransferFinish

func (MsgSysTransferFinish) GetSignBytes

func (msg MsgSysTransferFinish) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgSysTransferFinish) GetSigners

func (msg MsgSysTransferFinish) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgSysTransferFinish) IsSettleOnlyMsg

func (msg MsgSysTransferFinish) IsSettleOnlyMsg() bool

func (MsgSysTransferFinish) Route

func (msg MsgSysTransferFinish) Route() string

nolint

func (MsgSysTransferFinish) Type

func (msg MsgSysTransferFinish) Type() string

func (MsgSysTransferFinish) ValidateBasic

func (msg MsgSysTransferFinish) ValidateBasic() sdk.Error

quick validity check

type MsgSysTransferSignFinish

type MsgSysTransferSignFinish struct {
	OrderID   string `json:"order_id"`
	SignedTx  []byte `json:"signed_tx"`
	Validator string `json:"validator"`
}

________________________________

func NewMsgSysTransferSignFinish

func NewMsgSysTransferSignFinish(valAddr, orderid string, signedTx []byte) MsgSysTransferSignFinish

func (MsgSysTransferSignFinish) GetSignBytes

func (msg MsgSysTransferSignFinish) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgSysTransferSignFinish) GetSigners

func (msg MsgSysTransferSignFinish) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgSysTransferSignFinish) IsSettleOnlyMsg

func (msg MsgSysTransferSignFinish) IsSettleOnlyMsg() bool

func (MsgSysTransferSignFinish) Route

func (msg MsgSysTransferSignFinish) Route() string

nolint

func (MsgSysTransferSignFinish) Type

func (msg MsgSysTransferSignFinish) Type() string

func (MsgSysTransferSignFinish) ValidateBasic

func (msg MsgSysTransferSignFinish) ValidateBasic() sdk.Error

quick validity check

type MsgSysTransferWaitSign

type MsgSysTransferWaitSign struct {
	OrderID   string `json:"order_id"`
	SignHash  []byte `json:"sign_hash"`
	RawData   []byte `json:"raw_data"`
	Validator string `json:"validator"`
}

________________________________

func NewMsgSysTransferWaitSign

func NewMsgSysTransferWaitSign(valAddr string, orderid string, signHash []byte, rawdata []byte) MsgSysTransferWaitSign

func (MsgSysTransferWaitSign) GetSignBytes

func (msg MsgSysTransferWaitSign) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgSysTransferWaitSign) GetSigners

func (msg MsgSysTransferWaitSign) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgSysTransferWaitSign) IsSettleOnlyMsg

func (msg MsgSysTransferWaitSign) IsSettleOnlyMsg() bool

func (MsgSysTransferWaitSign) Route

func (msg MsgSysTransferWaitSign) Route() string

nolint

func (MsgSysTransferWaitSign) Type

func (msg MsgSysTransferWaitSign) Type() string

func (MsgSysTransferWaitSign) ValidateBasic

func (msg MsgSysTransferWaitSign) ValidateBasic() sdk.Error

quick validity check

type MsgWithdrawal

type MsgWithdrawal struct {
	FromCU             string  `json:"from_cu"`
	ToMultisignAddress string  `json:"to_multi_sign_address"`
	Symbol             string  `json:"symbol"`
	Amount             sdk.Int `json:"amount"`
	GasFee             sdk.Int `json:"gas_fee"`
	OrderID            string  `json:"order_id"`
}

________________________________

func NewMsgWithdrawal

func NewMsgWithdrawal(fromCU, toAddr, symbol, orderID string, amount, gasFee sdk.Int) MsgWithdrawal

func (MsgWithdrawal) GetSignBytes

func (msg MsgWithdrawal) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgWithdrawal) GetSigners

func (msg MsgWithdrawal) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgWithdrawal) Route

func (msg MsgWithdrawal) Route() string

nolint

func (MsgWithdrawal) Type

func (msg MsgWithdrawal) Type() string

func (MsgWithdrawal) ValidateBasic

func (msg MsgWithdrawal) ValidateBasic() sdk.Error

quick validity check

type MsgWithdrawalConfirm

type MsgWithdrawalConfirm struct {
	FromCU  string `json:"from_cu"`
	OrderID string `json:"order_id"`
	Valid   bool   `json:"valid"`
}

________________________________

func NewMsgWithdrawalConfirm

func NewMsgWithdrawalConfirm(fromCU, orderID string, valid bool) MsgWithdrawalConfirm

func (MsgWithdrawalConfirm) GetSignBytes

func (msg MsgWithdrawalConfirm) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgWithdrawalConfirm) GetSigners

func (msg MsgWithdrawalConfirm) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgWithdrawalConfirm) IsSettleOnlyMsg

func (msg MsgWithdrawalConfirm) IsSettleOnlyMsg() bool

func (MsgWithdrawalConfirm) Route

func (msg MsgWithdrawalConfirm) Route() string

nolint

func (MsgWithdrawalConfirm) Type

func (msg MsgWithdrawalConfirm) Type() string

func (MsgWithdrawalConfirm) ValidateBasic

func (msg MsgWithdrawalConfirm) ValidateBasic() sdk.Error

quick validity check

type MsgWithdrawalFinish

type MsgWithdrawalFinish struct {
	OrderIDs  []string `json:"order_ids"`
	CostFee   sdk.Int  `json:"cost_fee"`
	Validator string   `json:"validator"`
	Valid     bool     `json:"valid"`
}

________________________________

func NewMsgWithdrawalFinish

func NewMsgWithdrawalFinish(valAddr string, ids []string, fee sdk.Int, valid bool) MsgWithdrawalFinish

func (MsgWithdrawalFinish) GetSignBytes

func (msg MsgWithdrawalFinish) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgWithdrawalFinish) GetSigners

func (msg MsgWithdrawalFinish) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgWithdrawalFinish) IsSettleOnlyMsg

func (msg MsgWithdrawalFinish) IsSettleOnlyMsg() bool

func (MsgWithdrawalFinish) Route

func (msg MsgWithdrawalFinish) Route() string

nolint

func (MsgWithdrawalFinish) Type

func (msg MsgWithdrawalFinish) Type() string

func (MsgWithdrawalFinish) ValidateBasic

func (msg MsgWithdrawalFinish) ValidateBasic() sdk.Error

quick validity check

type MsgWithdrawalSignFinish

type MsgWithdrawalSignFinish struct {
	OrderIDs  []string `json:"order_ids"`
	SignedTx  []byte   `json:"signed_tx"`
	Validator string   `json:"validator"`
}

________________________________

func NewMsgWithdrawalSignFinish

func NewMsgWithdrawalSignFinish(valAddr string, ids []string, signedTx []byte) MsgWithdrawalSignFinish

func (MsgWithdrawalSignFinish) GetSignBytes

func (msg MsgWithdrawalSignFinish) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgWithdrawalSignFinish) GetSigners

func (msg MsgWithdrawalSignFinish) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgWithdrawalSignFinish) IsSettleOnlyMsg

func (msg MsgWithdrawalSignFinish) IsSettleOnlyMsg() bool

func (MsgWithdrawalSignFinish) Route

func (msg MsgWithdrawalSignFinish) Route() string

nolint

func (MsgWithdrawalSignFinish) Type

func (msg MsgWithdrawalSignFinish) Type() string

func (MsgWithdrawalSignFinish) ValidateBasic

func (msg MsgWithdrawalSignFinish) ValidateBasic() sdk.Error

quick validity check

type MsgWithdrawalWaitSign

type MsgWithdrawalWaitSign struct {
	OpCU       string   `json:"opcu"`
	OrderIDs   []string `json:"order_ids"`
	SignHashes [][]byte `json:"sign_hashes"`
	RawData    []byte   `json:"raw_data"`
	Validator  string   `json:"validator"`
}

________________________________

func NewMsgWithdrawalWaitSign

func NewMsgWithdrawalWaitSign(opCUAddr, valAddr string, ids []string, signHashes [][]byte, rawdata []byte) MsgWithdrawalWaitSign

func (MsgWithdrawalWaitSign) GetSignBytes

func (msg MsgWithdrawalWaitSign) GetSignBytes() []byte

GetSignBytes returns the message bytes to sign over.

func (MsgWithdrawalWaitSign) GetSigners

func (msg MsgWithdrawalWaitSign) GetSigners() []sdk.CUAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgWithdrawalWaitSign) IsSettleOnlyMsg

func (msg MsgWithdrawalWaitSign) IsSettleOnlyMsg() bool

func (MsgWithdrawalWaitSign) Route

func (msg MsgWithdrawalWaitSign) Route() string

nolint

func (MsgWithdrawalWaitSign) Type

func (msg MsgWithdrawalWaitSign) Type() string

func (MsgWithdrawalWaitSign) ValidateBasic

func (msg MsgWithdrawalWaitSign) ValidateBasic() sdk.Error

quick validity check

type OrderKeeper

type OrderKeeper interface {
	NewOrder(ctx sdk.Context, order sdk.Order) sdk.Order
	GetOrder(ctx sdk.Context, orderID string) sdk.Order
	SetOrder(ctx sdk.Context, order sdk.Order)
	AddProcessOrder(ctx sdk.Context, order sdk.Order)
	DeleteOrder(ctx sdk.Context, order sdk.Order)
	IsExist(ctx sdk.Context, orderID string) bool
	NewOrderCollect(ctx sdk.Context, from sdk.CUAddress, orderID string, symbol string, collectFromCU sdk.CUAddress,
		collectFromAddress string, amount, gasPrice, gasLimit sdk.Int, txHash string, index uint64, memo string) *sdk.OrderCollect
	NewOrderWithdrawal(ctx sdk.Context, from sdk.CUAddress, orderID string, symbol string,
		amount, gasFee, costFee sdk.Int, withdrawToAddr, opCUAddr, txHash string) *sdk.OrderWithdrawal
	NewOrderSysTransfer(ctx sdk.Context, from sdk.CUAddress, orderID string, symbol string,
		amount, costFee sdk.Int, toCU, toAddr, opCUAddr, fromAddr string) *sdk.OrderSysTransfer
	NewOrderOpcuAssetTransfer(ctx sdk.Context, from sdk.CUAddress, orderID string, symbol string,
		items []sdk.TransferItem, toAddr string) *sdk.OrderOpcuAssetTransfer
	RemoveProcessOrder(ctx sdk.Context, orderType sdk.OrderType, orderID string)
	GetProcessOrderListByType(ctx sdk.Context, orderTypes ...sdk.OrderType) []string
}

type OrderRetryVoteBox

type OrderRetryVoteBox struct {
	ConfirmThreshold int                   `json:"confirm_threshold"`
	VoteItems        []*OrderRetryVoteItem `json:"vote_items"`
	Confirmed        bool                  `json:"confirmed"`
}

func (*OrderRetryVoteBox) AddVote

func (v *OrderRetryVoteBox) AddVote(voter sdk.CUAddress, vote evidence.Vote) bool

func (*OrderRetryVoteBox) HasConfirmed

func (v *OrderRetryVoteBox) HasConfirmed() bool

func (*OrderRetryVoteBox) ValidVotes

func (v *OrderRetryVoteBox) ValidVotes() []*evidence.VoteItem

type OrderRetryVoteItem

type OrderRetryVoteItem struct {
	Evidences []EvidenceValidator `json:"evidences"`
	Voter     sdk.CUAddress       `json:"voter"`
}

type Output

type Output struct {
	Address sdk.CUAddress `json:"address" yaml:"address"`
	Coins   sdk.Coins     `json:"coins" yaml:"coins"`
}

Output models transaction outputs

func NewOutput

func NewOutput(addr sdk.CUAddress, coins sdk.Coins) Output

NewOutput - create a transaction output, used with MsgMultiSend

func (Output) ValidateBasic

func (out Output) ValidateBasic() sdk.Error

ValidateBasic - validate transaction output

type QueryAllBalanceParams

type QueryAllBalanceParams struct {
	Addr sdk.CUAddress
}

func NewQueryAllBalanceParams

func NewQueryAllBalanceParams(addr sdk.CUAddress) QueryAllBalanceParams

type QueryBalanceParams

type QueryBalanceParams struct {
	Addr   sdk.CUAddress
	Symbol string
}

func NewQueryBalanceParams

func NewQueryBalanceParams(addr sdk.CUAddress, symbol string) QueryBalanceParams

type ReceiptKeeper

type ReceiptKeeper interface {
	// NewReceipt creates a new receipt with a list of flows
	NewReceipt(category sdk.CategoryType, flows []sdk.Flow) *sdk.Receipt

	NewOrderFlow(symbol sdk.Symbol, cuAddress sdk.CUAddress, orderID string, orderType sdk.OrderType,
		orderStatus sdk.OrderStatus) sdk.OrderFlow
	NewBalanceFlow(cuAddress sdk.CUAddress, symbol sdk.Symbol, orderID string, previousBalance,
		balanceChange, previousBalanceOnHold, balanceOnHoldChange sdk.Int) sdk.BalanceFlow
	NewDepositFlow(CuAddress, multisignedadress, symbol, txhash, orderID, memo string,
		index uint64, amount sdk.Int, depositType sdk.DepositType, epoch uint64) sdk.DepositFlow
	NewDepositConfirmedFlow(validOrderIds, invalidOrderIds []string) sdk.DepositConfirmedFlow
	NewOrderRetryFlow(orderIDs []string, excludedKeyNode sdk.CUAddress) sdk.OrderRetryFlow

	NewCollectWaitSignFlow(orderIDs []string, rawData []byte) sdk.CollectWaitSignFlow
	NewCollectSignFinishFlow(orderIDs []string, signedTx []byte) sdk.CollectSignFinishFlow
	NewCollectFinishFlow(orderIDs []string, costFee sdk.Int, success bool) sdk.CollectFinishFlow
	NewRecollectFlow(orderIDs []string) sdk.RecollectFlow
	NewWithdrawalFlow(orderID, fromcu, toaddr, symbol string, amount, gasFee sdk.Int, status sdk.WithdrawStatus) sdk.WithdrawalFlow
	NewWithdrawalConfirmFlow(orderID string, status sdk.WithdrawStatus) sdk.WithdrawalConfirmFlow
	NewWithdrawalWaitSignFlow(orderIDs []string, opcu, fromAddr string, rawData []byte) sdk.WithdrawalWaitSignFlow
	NewWithdrawalSignFinishFlow(orderIDs []string, signedTx []byte) sdk.WithdrawalSignFinishFlow
	NewWithdrawalFinishFlow(orderIDs []string, costFee sdk.Int, valid bool) sdk.WithdrawalFinishFlow
	NewSysTransferFlow(orderID, fromcu, tocu, fromAddr, toaddr, symbol string, amount sdk.Int) sdk.SysTransferFlow
	NewSysTransferWaitSignFlow(orderID string, rawData []byte) sdk.SysTransferWaitSignFlow
	NewSysTransferSignFinishFlow(orderID string, signedTx []byte) sdk.SysTransferSignFinishFlow
	NewSysTransferFinishFlow(orderID string, costFee sdk.Int) sdk.SysTransferFinishFlow
	NewOpcuAssetTransferFlow(orderID, fromcu, fromAddr, toaddr, symbol string, items []sdk.TransferItem) sdk.OpcuAssetTransferFlow
	NewOpcuAssetTransferWaitSignFlow(orderID string, rawData []byte) sdk.OpcuAssetTransferWaitSignFlow
	NewOpcuAssetTransferSignFinishFlow(orderID string, signedTx []byte) sdk.OpcuAssetTransferSignFinishFlow
	NewOpcuAssetTransferFinishFlow(orderID string, costFee sdk.Int) sdk.OpcuAssetTransferFinishFlow

	SaveReceiptToResult(receipt *sdk.Receipt, result *sdk.Result) *sdk.Result
	GetReceiptFromResult(result *sdk.Result) (*sdk.Receipt, error)
}

type ResAllBalance

type ResAllBalance struct {
	Available sdk.Coins `json:"available"`
	Locked    sdk.Coins `json:"locked"`
}

type ResBalance

type ResBalance struct {
	Available sdk.Coin `json:"available"`
	Locked    sdk.Coin `json:"locked"`
}

type StakingKeeper

type StakingKeeper interface {
	GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator types.Validator, found bool)
	GetEpochByHeight(ctx sdk.Context, height uint64) sdk.Epoch
	GetCurrentEpoch(ctx sdk.Context) sdk.Epoch
	SetMigrationFinished(ctx sdk.Context)
	IsActiveKeyNode(ctx sdk.Context, addr sdk.CUAddress) (bool, int)
}

type TokenKeeper

type TokenKeeper interface {
	GetIBCToken(ctx sdk.Context, symbol sdk.Symbol) *sdk.IBCToken
	GetToken(ctx sdk.Context, symbol sdk.Symbol) sdk.Token
	GetCollectFee(ctx sdk.Context, symbol sdk.Symbol) sdk.Coin
	RawCollectFee(ctx sdk.Context, token, chainToken *sdk.IBCToken) sdk.Int
	GetWithDrawalFee(ctx sdk.Context, symbol sdk.Symbol) sdk.Coin
}

type TxVote

type TxVote struct {
	CostFee int64 `json:"cost_fee"`
	Valid   bool  `json:"valid"`
}

func NewTxVote

func NewTxVote(costFee int64, valid bool) *TxVote

Jump to

Keyboard shortcuts

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