Documentation ¶
Index ¶
- Constants
- Variables
- func FetchAddress(ctx cosmos.Context, keeper keeper.Keeper, name string, chain common.Chain) (common.Address, error)
- type AddLiquidityMemo
- func NewAddLiquidityMemo(asset common.Asset, addr, affAddr common.Address, affPts cosmos.Uint, ...) AddLiquidityMemo
- func ParseAddLiquidityMemoV1(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (AddLiquidityMemo, error)
- func ParseAddLiquidityMemoV110(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string, ...) (AddLiquidityMemo, error)
- type BondMemo
- type ConsolidateMemo
- type DonateMemo
- type ForgiveSlashMemo
- type LeaveMemo
- type ManageMAYANameMemo
- type Memo
- type MemoBase
- func (m MemoBase) GetAccAddress() cosmos.AccAddress
- func (m MemoBase) GetAffiliateBasisPoints() cosmos.Uint
- func (m MemoBase) GetAffiliateName() string
- func (m MemoBase) GetAffiliates() []string
- func (m MemoBase) GetAffiliatesBasisPoints() []cosmos.Uint
- 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) GetRefundAddress() common.Address
- 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 ParseSwapMemoV1(ctx cosmos.Context, keeper keeper.Keeper, asset common.Asset, parts []string) (SwapMemo, error)
- func ParseSwapMemoV110(ctx cosmos.Context, keeper keeper.Keeper, version semver.Version, ...) (SwapMemo, error)
- func ParseSwapMemoV92(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) GetAffiliates() []string
- func (m SwapMemo) GetAffiliatesBasisPoints() []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) GetRefundAddress() common.Address
- func (m SwapMemo) GetSlipLimit() cosmos.Uint
- func (m SwapMemo) GetStreamInterval() uint64
- func (m SwapMemo) GetStreamQuantity() uint64
- func (m SwapMemo) ShortString() string
- func (m SwapMemo) String() string
- type TxType
- type UnbondMemo
- type WithdrawLiquidityMemo
- type YggdrasilFundMemo
- type YggdrasilReturnMemo
Constants ¶
View Source
const DefaultTierValue = 3
By default tier is set to 3
Variables ¶
View Source
var EmptyMemo = MemoBase{TxType: TxUnknown, Asset: common.EmptyAsset}
Functions ¶
Types ¶
type AddLiquidityMemo ¶
type AddLiquidityMemo struct { MemoBase Address common.Address AffiliateAddress common.Address AffiliateBasisPoints cosmos.Uint Tier int64 }
func NewAddLiquidityMemo ¶
func ParseAddLiquidityMemoV1 ¶
func ParseAddLiquidityMemoV110 ¶ added in v1.111.0
func (AddLiquidityMemo) GetDestination ¶
func (m AddLiquidityMemo) GetDestination() common.Address
type BondMemo ¶
type BondMemo struct { MemoBase NodeAddress cosmos.AccAddress BondProviderAddress cosmos.AccAddress NodeOperatorFee int64 Units cosmos.Uint }
func NewBondMemo ¶
func ParseBondMemoV105 ¶ added in v1.104.1
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 (ConsolidateMemo) String ¶
func (m ConsolidateMemo) String() string
String implement fmt.Stringer
type DonateMemo ¶
type DonateMemo struct{ MemoBase }
func ParseDonateMemoV1 ¶ added in v1.112.0
func ParseDonateMemoV1(asset common.Asset) (DonateMemo, error)
func (DonateMemo) String ¶
func (m DonateMemo) String() string
type ForgiveSlashMemo ¶
type ForgiveSlashMemo struct { MemoBase Blocks cosmos.Uint ForgiveAsset common.Asset ForgiveAddress cosmos.AccAddress }
func NewForgiveSlashMemo ¶
func NewForgiveSlashMemo(blocks cosmos.Uint, addr cosmos.AccAddress) ForgiveSlashMemo
func ParseForgiveSlashMemo ¶
func ParseForgiveSlashMemo(parts []string) (ForgiveSlashMemo, error)
type LeaveMemo ¶
type LeaveMemo struct { MemoBase NodeAddress cosmos.AccAddress }
func NewLeaveMemo ¶
func NewLeaveMemo(addr cosmos.AccAddress) LeaveMemo
func ParseLeaveMemoV1 ¶ added in v1.112.0
func (LeaveMemo) GetAccAddress ¶
func (m LeaveMemo) GetAccAddress() cosmos.AccAddress
type ManageMAYANameMemo ¶
type ManageMAYANameMemo struct { MemoBase Name string Chain common.Chain Address common.Address PreferredAsset common.Asset Expire int64 Owner cosmos.AccAddress AffiliateBps cosmos.Uint SubaffiliateName []string SubaffiliateBps []cosmos.Uint }
func NewManageMAYANameMemo ¶
func ParseManageMAYANameMemoV1 ¶ added in v1.112.0
func ParseManageMAYANameMemoV1(version semver.Version, parts []string) (ManageMAYANameMemo, error)
func (ManageMAYANameMemo) GetAddress ¶
func (m ManageMAYANameMemo) GetAddress() common.Address
func (ManageMAYANameMemo) GetBlockExpire ¶
func (m ManageMAYANameMemo) GetBlockExpire() int64
func (ManageMAYANameMemo) GetChain ¶
func (m ManageMAYANameMemo) GetChain() common.Chain
func (ManageMAYANameMemo) GetName ¶
func (m ManageMAYANameMemo) 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 GetAffiliateName() string GetAffiliateBasisPoints() cosmos.Uint GetRefundAddress() common.Address GetAffiliates() []string GetAffiliatesBasisPoints() []cosmos.Uint }
type MemoBase ¶
func (MemoBase) GetAccAddress ¶
func (m MemoBase) GetAccAddress() cosmos.AccAddress
func (MemoBase) GetAffiliateBasisPoints ¶ added in v1.112.0
func (MemoBase) GetAffiliateName ¶ added in v1.112.0
func (MemoBase) GetAffiliates ¶ added in v1.112.0
func (MemoBase) GetAffiliatesBasisPoints ¶ added in v1.112.0
func (MemoBase) GetBlockHeight ¶
func (MemoBase) GetDestination ¶
func (MemoBase) GetDexAggregator ¶
func (MemoBase) GetDexTargetAddress ¶
func (MemoBase) GetDexTargetLimit ¶
func (MemoBase) GetRefundAddress ¶ added in v1.112.0
func (MemoBase) GetSlipLimit ¶
func (MemoBase) IsInternal ¶
func (MemoBase) IsOutbound ¶
type MigrateMemo ¶
func NewMigrateMemo ¶
func NewMigrateMemo(blockHeight int64) MigrateMemo
func ParseMigrateMemoV1 ¶ added in v1.112.0
func ParseMigrateMemoV1(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 ParseNoOpMemoV1 ¶ added in v1.112.0
ParseNoOpMemoV1 try to parse the memo
type OutboundMemo ¶
func NewOutboundMemo ¶
func NewOutboundMemo(txID common.TxID) OutboundMemo
func ParseOutboundMemoV1 ¶ added in v1.112.0
func ParseOutboundMemoV1(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 ParseRagnarokMemoV1 ¶ added in v1.112.0
func ParseRagnarokMemoV1(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 ParseRefundMemoV1 ¶ added in v1.112.0
func ParseRefundMemoV1(parts []string) (RefundMemo, error)
func (RefundMemo) GetTxID ¶
func (m RefundMemo) GetTxID() common.TxID
type ReserveMemo ¶
type ReserveMemo struct {
MemoBase
}
type SwapMemo ¶
type SwapMemo struct { MemoBase Destination common.Address SlipLimit cosmos.Uint AffiliateAddress common.Address // TODO: remove on hardfork AffiliateBasisPoints cosmos.Uint // TODO: remove on hardfork DexAggregator string DexTargetAddress string DexTargetLimit *cosmos.Uint OrderType types.OrderType StreamInterval uint64 StreamQuantity uint64 RefundAddress common.Address Affiliates []string AffiliatesBasisPoints []cosmos.Uint }
func NewSwapMemo ¶
func NewSwapMemo(asset common.Asset, dest common.Address, slip cosmos.Uint, affiliateAddress common.Address, affiliateBasisPoints cosmos.Uint, dexAgg, dexTargetAddress string, dexTargetLimit cosmos.Uint, orderType types.OrderType, quan, interval uint64, refundAddress common.Address, affiliates []string, affiliatesFeeBps []cosmos.Uint) SwapMemo
func ParseSwapMemoV1 ¶
func ParseSwapMemoV110 ¶ added in v1.110.0
func ParseSwapMemoV92 ¶
func (SwapMemo) GetAffiliateAddress ¶
func (SwapMemo) GetAffiliateBasisPoints ¶
func (SwapMemo) GetAffiliates ¶ added in v1.112.0
func (SwapMemo) GetAffiliatesBasisPoints ¶ added in v1.112.0
func (SwapMemo) GetDestination ¶
func (SwapMemo) GetDexAggregator ¶
func (SwapMemo) GetDexTargetAddress ¶
func (SwapMemo) GetDexTargetLimit ¶
func (SwapMemo) GetOrderType ¶
func (SwapMemo) GetRefundAddress ¶ added in v1.112.0
func (SwapMemo) GetSlipLimit ¶
func (SwapMemo) GetStreamInterval ¶ added in v1.110.0
func (SwapMemo) GetStreamQuantity ¶ added in v1.110.0
func (SwapMemo) ShortString ¶ added in v1.110.0
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 BondProviderAddress cosmos.AccAddress Units cosmos.Uint }
func NewUnbondMemo ¶
func NewUnbondMemo(asset common.Asset, addr, additional cosmos.AccAddress, units cosmos.Uint) UnbondMemo
func ParseUnbondMemoV105 ¶ added in v1.104.1
func ParseUnbondMemoV105(parts []string) (UnbondMemo, error)
func ParseUnbondMemoV81 ¶
func ParseUnbondMemoV81(parts []string) (UnbondMemo, error)
func (UnbondMemo) GetAccAddress ¶
func (m UnbondMemo) GetAccAddress() cosmos.AccAddress
type WithdrawLiquidityMemo ¶
type WithdrawLiquidityMemo struct { MemoBase Amount cosmos.Uint WithdrawalAsset common.Asset PairAddress common.Address }
func ParseWithdrawLiquidityMemoV1 ¶ added in v1.112.0
func (WithdrawLiquidityMemo) GetAmount ¶
func (m WithdrawLiquidityMemo) GetAmount() cosmos.Uint
func (WithdrawLiquidityMemo) GetPairAddress ¶
func (m WithdrawLiquidityMemo) GetPairAddress() common.Address
func (WithdrawLiquidityMemo) GetWithdrawalAsset ¶
func (m WithdrawLiquidityMemo) GetWithdrawalAsset() common.Asset
type YggdrasilFundMemo ¶
func NewYggdrasilFund ¶
func NewYggdrasilFund(blockHeight int64) YggdrasilFundMemo
func ParseYggdrasilFundMemoV1 ¶ added in v1.112.0
func ParseYggdrasilFundMemoV1(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 ParseYggdrasilReturnMemoV1 ¶ added in v1.112.0
func ParseYggdrasilReturnMemoV1(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_bond_archive.go
- memo_consolidate.go
- memo_donate.go
- memo_donate_archive.go
- memo_forgive_slash.go
- memo_leave.go
- memo_leave_archive.go
- memo_mayaname.go
- memo_mayaname_archive.go
- memo_migrate.go
- memo_migrate_archive.go
- memo_noop.go
- memo_noop_archive.go
- memo_outbound.go
- memo_outbound_archive.go
- memo_parser.go
- memo_ragnarok.go
- memo_ragnarok_archive.go
- memo_refund.go
- memo_refund_archive.go
- memo_reserve.go
- memo_swap.go
- memo_swap_archive.go
- memo_unbond.go
- memo_unbond_archive.go
- memo_withdraw.go
- memo_withdraw_archive.go
- memo_yggdrasil.go
- memo_yggdrasil_archive.go
Click to show internal directories.
Click to hide internal directories.