Documentation
¶
Index ¶
- func FetchAddress(ctx cosmos.Context, keeper keeper.Keeper, name string, chain common.Chain) (common.Address, error)
- func GetPart(parts []string, idx int) string
- func ParseAffiliateBasisPoints(ctx cosmos.Context, keeper keeper.Keeper, affBasisPoints string) (cosmos.Uint, error)
- type AddLiquidityMemo
- func NewAddLiquidityMemo(asset common.Asset, addr, affAddr common.Address, affPts cosmos.Uint) AddLiquidityMemo
- func ParseAddLiquidityMemo(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (AddLiquidityMemo, error)
- func ParseAddLiquidityMemoV1(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (AddLiquidityMemo, error)
- func ParseAddLiquidityMemoV104(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (AddLiquidityMemo, error)
- type BondMemo
- type ConsolidateMemo
- type DonateMemo
- type LeaveMemo
- type LoanOpenMemo
- func NewLoanOpenMemo(targetAsset common.Asset, targetAddr common.Address, minOut cosmos.Uint, ...) LoanOpenMemo
- func ParseLoanOpenMemo(ctx cosmos.Context, version semver.Version, keeper keeper.Keeper, ...) (LoanOpenMemo, error)
- func ParseLoanOpenMemoV1(ctx cosmos.Context, keeper keeper.Keeper, targetAsset common.Asset, ...) (LoanOpenMemo, error)
- func ParseLoanOpenMemoV112(ctx cosmos.Context, keeper keeper.Keeper, targetAsset common.Asset, ...) (LoanOpenMemo, error)
- func (m LoanOpenMemo) GetAffiliateAddress() common.Address
- func (m LoanOpenMemo) GetAffiliateBasisPoints() cosmos.Uint
- func (m LoanOpenMemo) GetDexAggregator() string
- func (m LoanOpenMemo) GetDexTargetAddress() string
- func (m LoanOpenMemo) GetMinOut() cosmos.Uint
- func (m LoanOpenMemo) GetTargetAddress() common.Address
- func (m LoanOpenMemo) GetTargetAsset() common.Asset
- func (m LoanOpenMemo) String() string
- type LoanRepaymentMemo
- func NewLoanRepaymentMemo(asset common.Asset, owner common.Address, minOut cosmos.Uint) LoanRepaymentMemo
- func ParseLoanRepaymentMemo(ctx cosmos.Context, version semver.Version, keeper keeper.Keeper, ...) (LoanRepaymentMemo, error)
- func ParseLoanRepaymentMemoV1(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (LoanRepaymentMemo, error)
- func ParseLoanRepaymentMemoV112(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (LoanRepaymentMemo, error)
- type ManageTHORNameMemo
- type Memo
- type MemoBase
- func (m MemoBase) GetAccAddress() cosmos.AccAddress
- func (m MemoBase) GetAmount() cosmos.Uint
- func (m MemoBase) GetAsset() common.Asset
- func (m MemoBase) GetBlockHeight() int64
- func (m MemoBase) GetDestination() common.Address
- func (m MemoBase) GetDexAggregator() string
- func (m MemoBase) GetDexTargetAddress() string
- func (m MemoBase) GetDexTargetLimit() *cosmos.Uint
- func (m MemoBase) GetSlipLimit() cosmos.Uint
- func (m MemoBase) GetTxID() common.TxID
- func (m MemoBase) GetType() TxType
- func (m MemoBase) IsEmpty() bool
- func (m MemoBase) IsInbound() bool
- func (m MemoBase) IsInternal() bool
- func (m MemoBase) IsOutbound() bool
- func (m MemoBase) IsType(tx TxType) bool
- func (m MemoBase) String() string
- type MigrateMemo
- type NoOpMemo
- type OutboundMemo
- type RagnarokMemo
- type RefundMemo
- type ReserveMemo
- type SwapMemo
- func NewSwapMemo(asset common.Asset, dest common.Address, slip cosmos.Uint, ...) SwapMemo
- func ParseSwapMemo(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (SwapMemo, error)
- func ParseSwapMemoV1(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (SwapMemo, error)
- func ParseSwapMemoV92(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (SwapMemo, error)
- func ParseSwapMemoV98(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (SwapMemo, error)
- func ParseSwapMemoV104(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (SwapMemo, error)
- func ParseSwapMemoV112(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (SwapMemo, error)
- func ParseSwapMemoV115(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (SwapMemo, error)
- func (m SwapMemo) GetAffiliateAddress() common.Address
- func (m SwapMemo) GetAffiliateBasisPoints() cosmos.Uint
- func (m SwapMemo) GetDestination() common.Address
- func (m SwapMemo) GetDexAggregator() string
- func (m SwapMemo) GetDexTargetAddress() string
- func (m SwapMemo) GetDexTargetLimit() *cosmos.Uint
- func (m SwapMemo) GetOrderType() types.OrderType
- func (m SwapMemo) GetSlipLimit() cosmos.Uint
- func (m SwapMemo) GetStreamFrequency() uint64
- func (m SwapMemo) GetStreamQuantity() uint64
- func (m SwapMemo) String() string
- type SwitchMemo
- type TxType
- type UnbondMemo
- type WithdrawLiquidityMemo
- type YggdrasilFundMemo
- type YggdrasilReturnMemo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchAddress ¶
Types ¶
type AddLiquidityMemo ¶
type AddLiquidityMemo struct {
MemoBase
Address common.Address
AffiliateAddress common.Address
AffiliateBasisPoints cosmos.Uint
}
func NewAddLiquidityMemo ¶
func ParseAddLiquidityMemo ¶
func ParseAddLiquidityMemoV1 ¶
func (AddLiquidityMemo) GetDestination ¶
func (m AddLiquidityMemo) GetDestination() common.Address
func (AddLiquidityMemo) String ¶
func (m AddLiquidityMemo) String() string
type BondMemo ¶
type BondMemo struct {
MemoBase
NodeAddress cosmos.AccAddress
BondProviderAddress cosmos.AccAddress
NodeOperatorFee int64
}
func NewBondMemo ¶
func NewBondMemo(addr, additional cosmos.AccAddress, operatorFee int64) BondMemo
func ParseBondMemoV81 ¶
func ParseBondMemoV88 ¶
func (BondMemo) GetAccAddress ¶
func (m BondMemo) GetAccAddress() cosmos.AccAddress
type ConsolidateMemo ¶
type ConsolidateMemo struct {
MemoBase
}
func NewConsolidateMemo ¶
func NewConsolidateMemo() ConsolidateMemo
NewConsolidateMemo create a new instance of ConsolidateMemo
func ParseConsolidateMemo ¶
func ParseConsolidateMemo(parts []string) (ConsolidateMemo, error)
ParseConsolidateMemo try to parse the memo
func (ConsolidateMemo) String ¶
func (m ConsolidateMemo) String() string
String implement fmt.Stringer
type DonateMemo ¶
type DonateMemo struct{ MemoBase }
func NewDonateMemo ¶
func NewDonateMemo(asset common.Asset) DonateMemo
func (DonateMemo) String ¶
func (m DonateMemo) String() string
type LeaveMemo ¶
type LeaveMemo struct {
MemoBase
NodeAddress cosmos.AccAddress
}
func NewLeaveMemo ¶
func NewLeaveMemo(addr cosmos.AccAddress) LeaveMemo
func ParseLeaveMemo ¶
func (LeaveMemo) GetAccAddress ¶
func (m LeaveMemo) GetAccAddress() cosmos.AccAddress
type LoanOpenMemo ¶
type LoanOpenMemo struct {
MemoBase
TargetAsset common.Asset
TargetAddress common.Address
MinOut cosmos.Uint
AffiliateAddress common.Address
AffiliateBasisPoints cosmos.Uint
DexAggregator string
DexTargetAddress string
DexTargetLimit cosmos.Uint
}
func NewLoanOpenMemo ¶
func ParseLoanOpenMemo ¶
func ParseLoanOpenMemoV1 ¶
func ParseLoanOpenMemoV112 ¶
func (LoanOpenMemo) GetAffiliateAddress ¶
func (m LoanOpenMemo) GetAffiliateAddress() common.Address
func (LoanOpenMemo) GetAffiliateBasisPoints ¶
func (m LoanOpenMemo) GetAffiliateBasisPoints() cosmos.Uint
func (LoanOpenMemo) GetDexAggregator ¶
func (m LoanOpenMemo) GetDexAggregator() string
func (LoanOpenMemo) GetDexTargetAddress ¶
func (m LoanOpenMemo) GetDexTargetAddress() string
func (LoanOpenMemo) GetMinOut ¶
func (m LoanOpenMemo) GetMinOut() cosmos.Uint
func (LoanOpenMemo) GetTargetAddress ¶
func (m LoanOpenMemo) GetTargetAddress() common.Address
func (LoanOpenMemo) GetTargetAsset ¶
func (m LoanOpenMemo) GetTargetAsset() common.Asset
func (LoanOpenMemo) String ¶
func (m LoanOpenMemo) String() string
type LoanRepaymentMemo ¶
func NewLoanRepaymentMemo ¶
func ParseLoanRepaymentMemo ¶
func (LoanRepaymentMemo) String ¶
func (m LoanRepaymentMemo) String() string
type ManageTHORNameMemo ¶
type ManageTHORNameMemo struct {
MemoBase
Name string
Chain common.Chain
Address common.Address
PreferredAsset common.Asset
Expire int64
Owner cosmos.AccAddress
}
func NewManageTHORNameMemo ¶
func ParseManageTHORNameMemo ¶
func ParseManageTHORNameMemo(parts []string) (ManageTHORNameMemo, error)
func (ManageTHORNameMemo) GetAddress ¶
func (m ManageTHORNameMemo) GetAddress() common.Address
func (ManageTHORNameMemo) GetBlockExpire ¶
func (m ManageTHORNameMemo) GetBlockExpire() int64
func (ManageTHORNameMemo) GetChain ¶
func (m ManageTHORNameMemo) GetChain() common.Chain
func (ManageTHORNameMemo) GetName ¶
func (m ManageTHORNameMemo) GetName() string
type Memo ¶
type Memo interface {
IsType(tx TxType) bool
GetType() TxType
IsEmpty() bool
IsInbound() bool
IsOutbound() bool
IsInternal() bool
String() string
GetAsset() common.Asset
GetAmount() cosmos.Uint
GetDestination() common.Address
GetSlipLimit() cosmos.Uint
GetTxID() common.TxID
GetAccAddress() cosmos.AccAddress
GetBlockHeight() int64
GetDexAggregator() string
GetDexTargetAddress() string
GetDexTargetLimit() *cosmos.Uint
}
type MemoBase ¶
func (MemoBase) GetAccAddress ¶
func (m MemoBase) GetAccAddress() cosmos.AccAddress
func (MemoBase) GetBlockHeight ¶
func (MemoBase) GetDestination ¶
func (MemoBase) GetDexAggregator ¶
func (MemoBase) GetDexTargetAddress ¶
func (MemoBase) GetDexTargetLimit ¶
func (MemoBase) GetSlipLimit ¶
func (MemoBase) IsInternal ¶
func (MemoBase) IsOutbound ¶
type MigrateMemo ¶
func NewMigrateMemo ¶
func NewMigrateMemo(blockHeight int64) MigrateMemo
func ParseMigrateMemo ¶
func ParseMigrateMemo(parts []string) (MigrateMemo, error)
func (MigrateMemo) GetBlockHeight ¶
func (m MigrateMemo) GetBlockHeight() int64
func (MigrateMemo) String ¶
func (m MigrateMemo) String() string
type NoOpMemo ¶
func NewNoOpMemo ¶
NewNoOpMemo create a new instance of NoOpMemo
func ParseNoOpMemo ¶
ParseNoOpMemo try to parse the memo
type OutboundMemo ¶
func NewOutboundMemo ¶
func NewOutboundMemo(txID common.TxID) OutboundMemo
func ParseOutboundMemo ¶
func ParseOutboundMemo(parts []string) (OutboundMemo, error)
func (OutboundMemo) GetTxID ¶
func (m OutboundMemo) GetTxID() common.TxID
func (OutboundMemo) String ¶
func (m OutboundMemo) String() string
type RagnarokMemo ¶
func NewRagnarokMemo ¶
func NewRagnarokMemo(blockHeight int64) RagnarokMemo
func ParseRagnarokMemo ¶
func ParseRagnarokMemo(parts []string) (RagnarokMemo, error)
func (RagnarokMemo) GetBlockHeight ¶
func (m RagnarokMemo) GetBlockHeight() int64
func (RagnarokMemo) String ¶
func (m RagnarokMemo) String() string
type RefundMemo ¶
func NewRefundMemo ¶
func NewRefundMemo(txID common.TxID) RefundMemo
NewRefundMemo create a new RefundMemo
func ParseRefundMemo ¶
func ParseRefundMemo(parts []string) (RefundMemo, error)
func (RefundMemo) GetTxID ¶
func (m RefundMemo) GetTxID() common.TxID
type ReserveMemo ¶
type ReserveMemo struct {
MemoBase
}
func NewReserveMemo ¶
func NewReserveMemo() ReserveMemo
type SwapMemo ¶
type SwapMemo struct {
MemoBase
Destination common.Address
SlipLimit cosmos.Uint
AffiliateAddress common.Address
AffiliateBasisPoints cosmos.Uint
DexAggregator string
DexTargetAddress string
DexTargetLimit *cosmos.Uint
OrderType types.OrderType
StreamFrequency uint64
StreamQuantity uint64
}
func NewSwapMemo ¶
func ParseSwapMemo ¶
func ParseSwapMemoV1 ¶
func ParseSwapMemoV92 ¶
func ParseSwapMemoV98 ¶
func ParseSwapMemoV104 ¶
func ParseSwapMemoV112 ¶
func ParseSwapMemoV115 ¶
func (SwapMemo) GetAffiliateAddress ¶
func (SwapMemo) GetAffiliateBasisPoints ¶
func (SwapMemo) GetDestination ¶
func (SwapMemo) GetDexAggregator ¶
func (SwapMemo) GetDexTargetAddress ¶
func (SwapMemo) GetDexTargetLimit ¶
func (SwapMemo) GetOrderType ¶
func (SwapMemo) GetSlipLimit ¶
func (SwapMemo) GetStreamFrequency ¶
func (SwapMemo) GetStreamQuantity ¶
type SwitchMemo ¶
func NewSwitchMemo ¶
func NewSwitchMemo(addr common.Address) SwitchMemo
func ParseSwitchMemo ¶
func (SwitchMemo) GetDestination ¶
func (m SwitchMemo) GetDestination() common.Address
type TxType ¶
type TxType uint8
func (TxType) HasOutbound ¶
HasOutbound whether the txtype might trigger outbound tx
func (TxType) IsInternal ¶
func (TxType) IsOutbound ¶
type UnbondMemo ¶
type UnbondMemo struct {
MemoBase
NodeAddress cosmos.AccAddress
Amount cosmos.Uint
BondProviderAddress cosmos.AccAddress
}
func NewUnbondMemo ¶
func NewUnbondMemo(addr, additional cosmos.AccAddress, amt cosmos.Uint) UnbondMemo
func ParseUnbondMemo ¶
func ParseUnbondMemo(version semver.Version, parts []string) (UnbondMemo, error)
func ParseUnbondMemoV81 ¶
func ParseUnbondMemoV81(parts []string) (UnbondMemo, error)
func (UnbondMemo) GetAccAddress ¶
func (m UnbondMemo) GetAccAddress() cosmos.AccAddress
func (UnbondMemo) GetAmount ¶
func (m UnbondMemo) GetAmount() cosmos.Uint
type WithdrawLiquidityMemo ¶
func ParseWithdrawLiquidityMemo ¶
func ParseWithdrawLiquidityMemo(asset common.Asset, parts []string) (WithdrawLiquidityMemo, error)
func (WithdrawLiquidityMemo) GetAmount ¶
func (m WithdrawLiquidityMemo) GetAmount() cosmos.Uint
func (WithdrawLiquidityMemo) GetWithdrawalAsset ¶
func (m WithdrawLiquidityMemo) GetWithdrawalAsset() common.Asset
type YggdrasilFundMemo ¶
func NewYggdrasilFund ¶
func NewYggdrasilFund(blockHeight int64) YggdrasilFundMemo
func ParseYggdrasilFundMemo ¶
func ParseYggdrasilFundMemo(parts []string) (YggdrasilFundMemo, error)
func (YggdrasilFundMemo) GetBlockHeight ¶
func (m YggdrasilFundMemo) GetBlockHeight() int64
func (YggdrasilFundMemo) String ¶
func (m YggdrasilFundMemo) String() string
type YggdrasilReturnMemo ¶
func NewYggdrasilReturn ¶
func NewYggdrasilReturn(blockHeight int64) YggdrasilReturnMemo
func ParseYggdrasilReturnMemo ¶
func ParseYggdrasilReturnMemo(parts []string) (YggdrasilReturnMemo, error)
func (YggdrasilReturnMemo) GetBlockHeight ¶
func (m YggdrasilReturnMemo) GetBlockHeight() int64
func (YggdrasilReturnMemo) String ¶
func (m YggdrasilReturnMemo) String() string
Source Files
¶
- memo.go
- memo_add.go
- memo_add_archive.go
- memo_bond.go
- memo_consolidate.go
- memo_donate.go
- memo_leave.go
- memo_loan.go
- memo_loan_archive.go
- memo_migrate.go
- memo_noop.go
- memo_outbound.go
- memo_ragnarok.go
- memo_refund.go
- memo_reserve.go
- memo_swap.go
- memo_swap_archive.go
- memo_switch.go
- memo_thorname.go
- memo_unbond.go
- memo_withdraw.go
- memo_yggdrasil.go
Click to show internal directories.
Click to hide internal directories.