Documentation ¶
Index ¶
- Constants
- Variables
- func ActiveValidatorAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, ...) error
- func BanAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgBan) error
- func DepositAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgDeposit) error
- func ErrInternal(err error, msg string) error
- func ErrataTxAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgErrataTx) error
- func GetKeeper(version semver.Version, cdc codec.BinaryCodec, coinKeeper bankkeeper.Keeper, ...) (keeper.Keeper, error)
- func IPAddressAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgSetIPAddress) error
- func InitGenesis(ctx cosmos.Context, keeper keeper.Keeper, data GenesisState) []abci.ValidatorUpdate
- func IsModuleAccAddress(keeper keeper.Keeper, accAddr cosmos.AccAddress) bool
- func MimirAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgMimir) error
- func MsgSendHandleV116(ctx cosmos.Context, mgr Manager, msg *MsgSend) (*cosmos.Result, error)
- func MsgSendLogger(ctx cosmos.Context, msg *MsgSend)
- func MsgSendValidateV130(ctx cosmos.Context, mgr Manager, msg *MsgSend) error
- func MsgTssPoolHandleV134(ctx cosmos.Context, mgr Manager, msg *MsgTssPool) (*cosmos.Result, error)
- func MsgTssPoolHandleV137(ctx cosmos.Context, mgr Manager, msg *MsgTssPool) (*cosmos.Result, error)
- func MsgTssPoolLogger(ctx cosmos.Context, msg *MsgTssPool)
- func MsgTssPoolValidateV124(ctx cosmos.Context, mgr Manager, msg *MsgTssPool) error
- func MsgTssPoolValidateV137(ctx cosmos.Context, mgr Manager, msg *MsgTssPool) error
- func NetworkFeeAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgNetworkFee) error
- func NewExternalHandler(mgr Manager) cosmos.Handler
- func NewInternalHandler(mgr Manager) cosmos.Handler
- func NewQuerier(mgr *Mgrs, kbs cosmos.KeybaseStore) cosmos.Querier
- func NewSwapMemo(ctx cosmos.Context, mgr Manager, targetAsset common.Asset, ...) string
- func NodePauseChainAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgNodePauseChain) error
- func ObservedTxInAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgObservedTxIn) error
- func ObservedTxOutAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgObservedTxOut) error
- func SendAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgSend) error
- func SetNodeKeysAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgSetNodeKeys) error
- func SolvencyAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgSolvency) error
- func TssAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgTssPool) error
- func TssKeysignFailAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgTssKeysignFail) error
- func ValidateGenesis(data GenesisState) error
- func VersionAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgSetVersion) error
- type AddLiquidityHandler
- type AddLiquidityMemo
- type AffiliateFeeCollector
- type AnteDecorator
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
- func (AppModule) ConsensusVersion() uint64
- func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate
- func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- func (AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (am AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (am AppModule) RegisterServices(cfg module.Configurator)
- func (am AppModule) Route() cosmos.Route
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
- func (AppModuleBasic) GetQueryCmd() *cobra.Command
- func (AppModuleBasic) GetTxCmd() *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
- func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func (AppModuleBasic) RegisterRESTRoutes(ctx client.Context, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error
- type ApproveUpgradeHandler
- type BanHandler
- type BanVoter
- type BaseHandler
- type Blame
- type BondHandler
- type BondMemo
- type BondProvider
- type BondProviders
- type ChainContract
- type CommonOutboundTxHandler
- type ConsolidateHandler
- type ConsolidateMemo
- type DepositHandler
- type DonateHandler
- type DonateMemo
- type DroppedSwapOutTx
- type EmitEventItem
- type ErrataTxHandler
- type ErrataTxVoter
- type EventAddLiquidity
- type EventBond
- type EventDonate
- type EventErrata
- type EventFee
- type EventGas
- type EventLoanOpen
- type EventLoanRepayment
- type EventManager
- type EventMgrVCUR
- func (m *EventMgrVCUR) EmitEvent(ctx cosmos.Context, evt EmitEventItem) error
- func (m *EventMgrVCUR) EmitFeeEvent(ctx cosmos.Context, feeEvent *EventFee) error
- func (m *EventMgrVCUR) EmitGasEvent(ctx cosmos.Context, gasEvent *EventGas) error
- func (m *EventMgrVCUR) EmitSwapEvent(ctx cosmos.Context, swap *EventSwap) error
- type EventOutbound
- type EventPool
- type EventRefund
- type EventReserve
- type EventRewards
- type EventSlash
- type EventSwap
- type EventWithdraw
- type GasManager
- type GasMgrVCUR
- func (gm *GasMgrVCUR) AddGasAsset(outAsset common.Asset, gas common.Gas, increaseTxCount bool)
- func (gm *GasMgrVCUR) BeginBlock()
- func (gm *GasMgrVCUR) CalcOutboundFeeMultiplier(ctx cosmos.Context, ...) cosmos.Uint
- func (gm *GasMgrVCUR) EndBlock(ctx cosmos.Context, keeper keeper.Keeper, eventManager EventManager)
- func (gm *GasMgrVCUR) GetAssetOutboundFee(ctx cosmos.Context, asset common.Asset, inRune bool) (cosmos.Uint, error)
- func (gm *GasMgrVCUR) GetGas() common.Gas
- func (gm *GasMgrVCUR) GetGasRate(ctx cosmos.Context, chain common.Chain) cosmos.Uint
- func (gm *GasMgrVCUR) GetMaxGas(ctx cosmos.Context, chain common.Chain) (common.Coin, error)
- func (gm *GasMgrVCUR) GetNetworkFee(ctx cosmos.Context, chain common.Chain) (types.NetworkFee, error)
- func (gm *GasMgrVCUR) ProcessGas(ctx cosmos.Context, keeper keeper.Keeper)
- type GasPool
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetAffiliateCollectors() []types.AffiliateFeeCollector
- func (m *GenesisState) GetBondProviders() []types.BondProviders
- func (m *GenesisState) GetChainContracts() []types.ChainContract
- func (m *GenesisState) GetLastChainHeights() []LastChainHeight
- func (m *GenesisState) GetLastSignedHeight() int64
- func (m *GenesisState) GetLiquidityProviders() gitlab_com_thorchain_thornode_x_thorchain_types.LiquidityProviders
- func (m *GenesisState) GetLoanTotalCollateral() gitlab_com_thorchain_thornode_common.Coins
- func (m *GenesisState) GetLoans() []types.Loan
- func (m *GenesisState) GetMimirs() []Mimir
- func (m *GenesisState) GetNetwork() types.Network
- func (m *GenesisState) GetNetworkFees() []types.NetworkFee
- func (m *GenesisState) GetNodeAccounts() gitlab_com_thorchain_thornode_x_thorchain_types.NodeAccounts
- func (m *GenesisState) GetNodeMimirs() []types.NodeMimir
- func (m *GenesisState) GetObservedTxInVoters() gitlab_com_thorchain_thornode_x_thorchain_types.ObservedTxVoters
- func (m *GenesisState) GetObservedTxOutVoters() gitlab_com_thorchain_thornode_x_thorchain_types.ObservedTxVoters
- func (m *GenesisState) GetOrderbookItems() []types.MsgSwap
- func (m *GenesisState) GetOutboundFeeSpentRune() gitlab_com_thorchain_thornode_common.Coins
- func (m *GenesisState) GetOutboundFeeWithheldRune() gitlab_com_thorchain_thornode_common.Coins
- func (m *GenesisState) GetPOL() types.ProtocolOwnedLiquidity
- func (m *GenesisState) GetPools() []types.Pool
- func (m *GenesisState) GetReserve() uint64
- func (m *GenesisState) GetReserveContributors() gitlab_com_thorchain_thornode_x_thorchain_types.ReserveContributors
- func (m *GenesisState) GetRunePool() types.RUNEPool
- func (m *GenesisState) GetRuneProviders() []types.RUNEProvider
- func (m *GenesisState) GetStoreVersion() int64
- func (m *GenesisState) GetStreamingSwaps() []types.StreamingSwap
- func (m *GenesisState) GetSwapQueueItems() []types.MsgSwap
- func (m *GenesisState) GetSwapperClout() []types.SwapperClout
- func (m *GenesisState) GetTHORNames() []types.THORName
- func (m *GenesisState) GetTradeAccounts() []types.TradeAccount
- func (m *GenesisState) GetTradeUnits() []types.TradeUnit
- func (m *GenesisState) GetTxOuts() []types.TxOut
- func (m *GenesisState) GetVaults() gitlab_com_thorchain_thornode_x_thorchain_types.Vaults
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type IPAddressHandler
- type InfiniteGasDecorator
- type Jail
- type Keygen
- type KeygenBlock
- type LadderDispatch
- type LastChainHeight
- func (*LastChainHeight) Descriptor() ([]byte, []int)
- func (m *LastChainHeight) GetChain() string
- func (m *LastChainHeight) GetHeight() int64
- func (m *LastChainHeight) Marshal() (dAtA []byte, err error)
- func (m *LastChainHeight) MarshalTo(dAtA []byte) (int, error)
- func (m *LastChainHeight) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LastChainHeight) ProtoMessage()
- func (m *LastChainHeight) Reset()
- func (m *LastChainHeight) Size() (n int)
- func (m *LastChainHeight) String() string
- func (m *LastChainHeight) Unmarshal(dAtA []byte) error
- func (m *LastChainHeight) XXX_DiscardUnknown()
- func (m *LastChainHeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LastChainHeight) XXX_Merge(src proto.Message)
- func (m *LastChainHeight) XXX_Size() int
- func (m *LastChainHeight) XXX_Unmarshal(b []byte) error
- type LeaveHandler
- type LeaveMemo
- type LiquidityProvider
- type LiquidityProviders
- type Loan
- type LoanOpenHandler
- type LoanOpenMemo
- type LoanRepaymentHandler
- type LoanRepaymentMemo
- type Loans
- type ManageTHORNameHandler
- type ManageTHORNameMemo
- type Manager
- type Mgrs
- func (mgr *Mgrs) BeginBlock(ctx cosmos.Context) error
- func (mgr *Mgrs) EventMgr() EventManager
- func (mgr *Mgrs) GasMgr() GasManager
- func (mgr *Mgrs) GetConstants() constants.ConstantValues
- func (mgr *Mgrs) GetVersion() semver.Version
- func (mgr *Mgrs) Keeper() keeper.Keeper
- func (mgr *Mgrs) NetworkMgr() NetworkManager
- func (mgr *Mgrs) ObMgr() ObserverManager
- func (mgr *Mgrs) OrderBookMgr() OrderBook
- func (mgr *Mgrs) PoolMgr() PoolManager
- func (mgr *Mgrs) Slasher() Slasher
- func (mgr *Mgrs) SwapQ() SwapQueue
- func (mgr *Mgrs) TradeAccountManager() TradeAccountManager
- func (mgr *Mgrs) TxOutStore() TxOutStore
- func (mgr *Mgrs) ValidatorMgr() ValidatorManager
- type MigrateHandler
- type MigrateMemo
- type Mimir
- func (*Mimir) Descriptor() ([]byte, []int)
- func (m *Mimir) GetKey() string
- func (m *Mimir) GetValue() int64
- func (m *Mimir) Marshal() (dAtA []byte, err error)
- func (m *Mimir) MarshalTo(dAtA []byte) (int, error)
- func (m *Mimir) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Mimir) ProtoMessage()
- func (m *Mimir) Reset()
- func (m *Mimir) Size() (n int)
- func (m *Mimir) String() string
- func (m *Mimir) Unmarshal(dAtA []byte) error
- func (m *Mimir) XXX_DiscardUnknown()
- func (m *Mimir) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Mimir) XXX_Merge(src proto.Message)
- func (m *Mimir) XXX_Size() int
- func (m *Mimir) XXX_Unmarshal(b []byte) error
- type MimirHandler
- type ModuleBalanceAction
- type MsgAddLiquidity
- type MsgApproveUpgrade
- type MsgBan
- type MsgBond
- type MsgConsolidate
- type MsgDeposit
- type MsgDonate
- type MsgErrataTx
- type MsgHandler
- type MsgLeave
- type MsgLoanOpen
- type MsgLoanRepayment
- type MsgManageTHORName
- type MsgMigrate
- type MsgMimir
- type MsgNetworkFee
- type MsgNoOp
- type MsgNodePauseChain
- type MsgObservedTxIn
- type MsgObservedTxOut
- type MsgOutboundTx
- type MsgProposeUpgrade
- type MsgRagnarok
- type MsgRefundTx
- type MsgRejectUpgrade
- type MsgReserveContributor
- type MsgRunePoolDeposit
- type MsgRunePoolWithdraw
- type MsgSend
- type MsgSetIPAddress
- type MsgSetNodeKeys
- type MsgSetVersion
- type MsgSolvency
- type MsgSwap
- type MsgTradeAccountDeposit
- type MsgTradeAccountWithdrawal
- type MsgTssKeysignFail
- type MsgTssPool
- type MsgUnBond
- type MsgWithdrawLiquidity
- type Network
- type NetworkFee
- type NetworkFeeHandler
- type NetworkManager
- type NetworkMgrV134
- func (vm *NetworkMgrV134) BeginBlock(ctx cosmos.Context, mgr Manager) error
- func (vm *NetworkMgrV134) CalcAnchor(ctx cosmos.Context, mgr Manager, asset common.Asset) (cosmos.Uint, cosmos.Uint, cosmos.Uint)
- func (vm *NetworkMgrV134) EndBlock(ctx cosmos.Context, mgr Manager) error
- func (vm *NetworkMgrV134) GetAvailableAnchorsAndDepths(ctx cosmos.Context, mgr Manager, asset common.Asset) ([]common.Asset, []cosmos.Uint)
- func (vm *NetworkMgrV134) POLCycle(ctx cosmos.Context, mgr Manager) error
- func (vm *NetworkMgrV134) RotateVault(ctx cosmos.Context, vault Vault) error
- func (vm *NetworkMgrV134) SpawnDerivedAsset(ctx cosmos.Context, asset common.Asset, mgr Manager)
- func (vm *NetworkMgrV134) TriggerKeygen(ctx cosmos.Context, nas NodeAccounts) error
- func (vm *NetworkMgrV134) UpdateNetwork(ctx cosmos.Context, constAccessor constants.ConstantValues, ...) error
- type NetworkMgrV136
- func (vm *NetworkMgrV136) BeginBlock(ctx cosmos.Context, mgr Manager) error
- func (vm *NetworkMgrV136) CalcAnchor(ctx cosmos.Context, mgr Manager, asset common.Asset) (cosmos.Uint, cosmos.Uint, cosmos.Uint)
- func (vm *NetworkMgrV136) EndBlock(ctx cosmos.Context, mgr Manager) error
- func (vm *NetworkMgrV136) GetAvailableAnchorsAndDepths(ctx cosmos.Context, mgr Manager, asset common.Asset) ([]common.Asset, []cosmos.Uint)
- func (vm *NetworkMgrV136) POLCycle(ctx cosmos.Context, mgr Manager) error
- func (vm *NetworkMgrV136) RotateVault(ctx cosmos.Context, vault Vault) error
- func (vm *NetworkMgrV136) SpawnDerivedAsset(ctx cosmos.Context, asset common.Asset, mgr Manager)
- func (vm *NetworkMgrV136) TriggerKeygen(ctx cosmos.Context, nas NodeAccounts) error
- func (vm *NetworkMgrV136) UpdateNetwork(ctx cosmos.Context, constAccessor constants.ConstantValues, ...) error
- type NetworkMgrVCUR
- func (vm *NetworkMgrVCUR) BeginBlock(ctx cosmos.Context, mgr Manager) error
- func (vm *NetworkMgrVCUR) CalcAnchor(ctx cosmos.Context, mgr Manager, asset common.Asset) (cosmos.Uint, cosmos.Uint, cosmos.Uint)
- func (vm *NetworkMgrVCUR) EndBlock(ctx cosmos.Context, mgr Manager) error
- func (vm *NetworkMgrVCUR) GetAvailableAnchorsAndDepths(ctx cosmos.Context, mgr Manager, asset common.Asset) ([]common.Asset, []cosmos.Uint)
- func (vm *NetworkMgrVCUR) POLCycle(ctx cosmos.Context, mgr Manager) error
- func (vm *NetworkMgrVCUR) RotateVault(ctx cosmos.Context, vault Vault) error
- func (vm *NetworkMgrVCUR) SpawnDerivedAsset(ctx cosmos.Context, asset common.Asset, mgr Manager)
- func (vm *NetworkMgrVCUR) TriggerKeygen(ctx cosmos.Context, nas NodeAccounts) error
- func (vm *NetworkMgrVCUR) UpdateNetwork(ctx cosmos.Context, constAccessor constants.ConstantValues, ...) error
- type NoOpHandler
- type NoOpMemo
- type Node
- type NodeAccount
- type NodeAccounts
- type NodeMimir
- type NodeMimirs
- type NodePauseChainHandler
- type NodeStatus
- type ObservedNetworkFeeVoter
- type ObservedTx
- type ObservedTxInHandler
- type ObservedTxOutHandler
- type ObservedTxVoter
- type ObservedTxVoters
- type ObservedTxs
- type ObserverManager
- type ObserverMgrVCUR
- type OrderBook
- type OrderBookVCUR
- type OutAssetGas
- type OutboundMemo
- type OutboundTxHandler
- type Pool
- type PoolAmt
- type PoolManager
- type PoolMgrVCUR
- type PoolMod
- type PoolMods
- type PoolStatus
- type Pools
- type ProposeUpgradeHandler
- type ProtoInt64
- type ProtoStrings
- type ProtocolOwnedLiquidity
- type RUNEPool
- type RUNEProvider
- type RagnarokHandler
- type RagnarokMemo
- type RagnarokWithdrawPosition
- type RefundHandler
- type RefundMemo
- type RejectUpgradeHandler
- type ReserveContributor
- type ReserveContributorHandler
- type ReserveContributors
- type ReserveMemo
- type RouterUpgradeController
- type RunePoolDepositHandler
- type RunePoolDepositMemo
- type RunePoolWithdrawHandler
- type RunePoolWithdrawMemo
- type SetNodeKeysHandler
- type Slasher
- type SlasherVCUR
- func (s *SlasherVCUR) BeginBlock(ctx cosmos.Context, req abci.RequestBeginBlock, ...)
- func (s *SlasherVCUR) DecSlashPoints(ctx cosmos.Context, point int64, addresses ...cosmos.AccAddress)
- func (s *SlasherVCUR) HandleDoubleSign(ctx cosmos.Context, addr crypto.Address, infractionHeight int64, ...) error
- func (s *SlasherVCUR) HandleMissingSign(ctx cosmos.Context, addr crypto.Address, ...) error
- func (s *SlasherVCUR) IncSlashPoints(ctx cosmos.Context, point int64, addresses ...cosmos.AccAddress)
- func (s *SlasherVCUR) LackSigning(ctx cosmos.Context, mgr Manager) error
- func (s *SlasherVCUR) SlashVault(ctx cosmos.Context, vaultPK common.PubKey, coins common.Coins, mgr Manager) error
- type SolvencyHandler
- type StoreManager
- type StoreMgr
- type StreamingSwap
- type StreamingSwaps
- type SwapHandler
- type SwapMemo
- type SwapQueue
- type SwapQueueVCUR
- type Swapper
- type SwapperClout
- type SwapperV134
- func (s *SwapperV134) CalcAssetEmission(X, x, Y cosmos.Uint) cosmos.Uint
- func (s *SwapperV134) CalcLiquidityFee(X, x, Y cosmos.Uint) cosmos.Uint
- func (s *SwapperV134) CalcMaxAssetEmission(X, x, Y, fee cosmos.Uint) cosmos.Uint
- func (s *SwapperV134) CalcMinLiquidityFee(X, x, Y, minSlipBps cosmos.Uint) cosmos.Uint
- func (s *SwapperV134) CalcSwapSlip(Xi, xi cosmos.Uint) cosmos.Uint
- func (s *SwapperV134) GetSwapCalc(X, x, Y, slipBps, minSlipBps cosmos.Uint) (emitAssets, liquidityFee, slip cosmos.Uint)
- func (s *SwapperV134) MinSlipBps(ctx cosmos.Context, k keeper.Keeper, isSynth bool, isTradeAccount bool) cosmos.Uint
- func (s *SwapperV134) Swap(ctx cosmos.Context, keeper keeper.Keeper, tx common.Tx, target common.Asset, ...) (cosmos.Uint, []*EventSwap, error)
- type SwapperVCUR
- func (s *SwapperVCUR) CalcAssetEmission(X, x, Y cosmos.Uint) cosmos.Uint
- func (s *SwapperVCUR) CalcLiquidityFee(X, x, Y cosmos.Uint) cosmos.Uint
- func (s *SwapperVCUR) CalcMaxAssetEmission(X, x, Y, fee cosmos.Uint) cosmos.Uint
- func (s *SwapperVCUR) CalcMinLiquidityFee(X, x, Y, minSlipBps cosmos.Uint) cosmos.Uint
- func (s *SwapperVCUR) CalcSwapSlip(Xi, xi cosmos.Uint) cosmos.Uint
- func (s *SwapperVCUR) GetSwapCalc(X, x, Y, slipBps, minSlipBps cosmos.Uint) (emitAssets, liquidityFee, slip cosmos.Uint)
- func (s *SwapperVCUR) Swap(ctx cosmos.Context, keeper keeper.Keeper, tx common.Tx, target common.Asset, ...) (cosmos.Uint, []*EventSwap, error)
- type THORName
- type THORNameAlias
- type TradeAccount
- type TradeAccountDepositHandler
- type TradeAccountDepositMemo
- type TradeAccountManager
- type TradeAccountWithdrawalHandler
- type TradeAccountWithdrawalMemo
- type TradeMgrVCUR
- func (s *TradeMgrVCUR) BalanceOf(ctx cosmos.Context, asset common.Asset, addr cosmos.AccAddress) cosmos.Uint
- func (s *TradeMgrVCUR) Deposit(ctx cosmos.Context, asset common.Asset, amount cosmos.Uint, ...) (cosmos.Uint, error)
- func (s *TradeMgrVCUR) EndBlock(ctx cosmos.Context, keeper keeper.Keeper) error
- func (s *TradeMgrVCUR) Withdrawal(ctx cosmos.Context, asset common.Asset, amount cosmos.Uint, ...) (cosmos.Uint, error)
- type TradeUnit
- type TssHandler
- type TssKeysignFailVoter
- type TssKeysignHandler
- type TssVoter
- type TxOut
- type TxOutItem
- type TxOutStorageVCUR
- func (tos *TxOutStorageVCUR) CalcTxOutHeight(ctx cosmos.Context, version semver.Version, toi TxOutItem) (int64, cosmos.Uint, error)
- func (tos *TxOutStorageVCUR) ClearOutboundItems(ctx cosmos.Context)
- func (tos *TxOutStorageVCUR) DiscoverOutbounds(ctx cosmos.Context, transactionFeeAsset cosmos.Uint, maxGasAsset common.Coin, ...) ([]TxOutItem, cosmos.Uint)
- func (tos *TxOutStorageVCUR) EndBlock(ctx cosmos.Context, mgr Manager) error
- func (tos *TxOutStorageVCUR) GetBlockOut(ctx cosmos.Context) (*TxOut, error)
- func (tos *TxOutStorageVCUR) GetOutboundItemByToAddress(ctx cosmos.Context, to common.Address) []TxOutItem
- func (tos *TxOutStorageVCUR) GetOutboundItems(ctx cosmos.Context) ([]TxOutItem, error)
- func (tos *TxOutStorageVCUR) TryAddTxOutItem(ctx cosmos.Context, mgr Manager, toi TxOutItem, minOut cosmos.Uint) (bool, error)
- func (tos *TxOutStorageVCUR) UnSafeAddTxOutItem(ctx cosmos.Context, mgr Manager, toi TxOutItem, height int64) error
- type TxOutStore
- type TypedHandler
- type UnBondHandler
- type UnbondMemo
- type ValidatorManager
- type ValidatorMgrVCUR
- func (vm *ValidatorMgrVCUR) BeginBlock(ctx cosmos.Context, mgr Manager, existingValidators []string) error
- func (vm *ValidatorMgrVCUR) EndBlock(ctx cosmos.Context, mgr Manager) []abci.ValidatorUpdate
- func (vm *ValidatorMgrVCUR) NodeAccountPreflightCheck(ctx cosmos.Context, na NodeAccount, _ constants.ConstantValues) (NodeStatus, error)
- type Vault
- type VaultStatus
- type Vaults
- type VersionHandler
- type WithdrawLiquidityHandler
- type WithdrawLiquidityMemo
Constants ¶
const ( ModuleName = types.ModuleName ReserveName = types.ReserveName AsgardName = types.AsgardName BondName = types.BondName LendingName = types.LendingName AffiliateCollectorName = types.AffiliateCollectorName TreasuryName = types.TreasuryName RUNEPoolName = types.RUNEPoolName RouterKey = types.RouterKey StoreKey = types.StoreKey DefaultCodespace = types.DefaultCodespace // pool status PoolAvailable = types.PoolStatus_Available PoolStaged = types.PoolStatus_Staged PoolSuspended = types.PoolStatus_Suspended // Admin config keys MaxWithdrawBasisPoints = types.MaxWithdrawBasisPoints // Vaults AsgardVault = types.VaultType_AsgardVault UnknownVault = types.VaultType_UnknownVault ActiveVault = types.VaultStatus_ActiveVault InactiveVault = types.VaultStatus_InactiveVault RetiringVault = types.VaultStatus_RetiringVault InitVault = types.VaultStatus_InitVault // Node status NodeActive = types.NodeStatus_Active NodeWhiteListed = types.NodeStatus_Whitelisted NodeDisabled = types.NodeStatus_Disabled NodeReady = types.NodeStatus_Ready NodeStandby = types.NodeStatus_Standby NodeUnknown = types.NodeStatus_Unknown // Node type NodeTypeUnknown = types.NodeType_TypeUnknown NodeTypeValidator = types.NodeType_TypeValidator NodeTypeVault = types.NodeType_TypeVault // Bond type BondPaid = types.BondType_bond_paid BondReturned = types.BondType_bond_returned BondCost = types.BondType_bond_cost BondReward = types.BondType_bond_reward AsgardKeygen = types.KeygenType_AsgardKeygen // Bond type AddPendingLiquidity = types.PendingLiquidityType_add WithdrawPendingLiquidity = types.PendingLiquidityType_withdraw // Order Type MarketOrder = types.OrderType_market LimitOrder = types.OrderType_limit // Mint/Burn type MintSupplyType = types.MintBurnSupplyType_mint BurnSupplyType = types.MintBurnSupplyType_burn // Memos TxSwap = mem.TxSwap TxLimitOrder = mem.TxLimitOrder TxAdd = mem.TxAdd TxBond = mem.TxBond TxMigrate = mem.TxMigrate TxRagnarok = mem.TxRagnarok TxReserve = mem.TxReserve TxOutbound = mem.TxOutbound TxRefund = mem.TxRefund TxUnBond = mem.TxUnbond TxLeave = mem.TxLeave TxWithdraw = mem.TxWithdraw TxTHORName = mem.TxTHORName TxLoanOpen = mem.TxLoanOpen TxLoanRepayment = mem.TxLoanRepayment )
const ( // CodeBadVersion error code for bad version CodeInternalError uint32 = 99 CodeTxFail uint32 = 100 CodeBadVersion uint32 = 101 CodeInvalidMessage uint32 = 102 CodeInvalidVault uint32 = 104 CodeInvalidMemo uint32 = 105 CodeInvalidPoolStatus uint32 = 107 CodeSwapFail uint32 = 108 CodeSwapFailNotEnoughFee uint32 = 110 CodeSwapFailInvalidAmount uint32 = 113 CodeSwapFailInvalidBalance uint32 = 114 CodeSwapFailNotEnoughBalance uint32 = 115 CodeAddLiquidityFailValidation uint32 = 120 CodeFailGetLiquidityProvider uint32 = 122 CodeAddLiquidityMismatchAddr uint32 = 123 CodeLiquidityInvalidPoolAsset uint32 = 124 CodeAddLiquidityRUNEOverLimit uint32 = 125 CodeAddLiquidityRUNEMoreThanBond uint32 = 126 CodeWithdrawFailValidation uint32 = 130 CodeFailAddOutboundTx uint32 = 131 CodeFailSaveEvent uint32 = 132 CodeNoLiquidityUnitLeft uint32 = 135 CodeWithdrawWithin24Hours uint32 = 136 CodeWithdrawFail uint32 = 137 CodeEmptyChain uint32 = 138 CodeWithdrawLockup uint32 = 139 )
THORChain error code start at 99
const ( EventTypeActiveVault = "ActiveVault" EventTypeInactiveVault = "InactiveVault" )
const values used to emit events
const ( MimirRecallFund = `MimirRecallFund` MimirUpgradeContract = `MimirUpgradeContract` MimirRecallFundTemplate = `MimirRecallFund%s` MimirUpgradeContractTemplate = `MimirUpgradeContract%s` )
Variables ¶
var ( NewPool = types.NewPool NewNetwork = types.NewNetwork NewProtocolOwnedLiquidity = types.NewProtocolOwnedLiquidity NewRUNEPool = types.NewRUNEPool NewObservedTx = types.NewObservedTx NewTssVoter = types.NewTssVoter NewBanVoter = types.NewBanVoter NewErrataTxVoter = types.NewErrataTxVoter NewObservedTxVoter = types.NewObservedTxVoter NewMsgRunePoolDeposit = types.NewMsgRunePoolDeposit NewMsgRunePoolWithdraw = types.NewMsgRunePoolWithdraw NewMsgTradeAccountDeposit = types.NewMsgTradeAccountDeposit NewMsgTradeAccountWithdrawal = types.NewMsgTradeAccountWithdrawal NewMsgLoanOpen = types.NewMsgLoanOpen NewMsgLoanRepayment = types.NewMsgLoanRepayment NewMsgMimir = types.NewMsgMimir NewMsgNodePauseChain = types.NewMsgNodePauseChain NewMsgDeposit = types.NewMsgDeposit NewMsgTssPool = types.NewMsgTssPool NewMsgTssKeysignFail = types.NewMsgTssKeysignFail NewMsgObservedTxIn = types.NewMsgObservedTxIn NewMsgObservedTxOut = types.NewMsgObservedTxOut NewMsgNoOp = types.NewMsgNoOp NewMsgConsolidate = types.NewMsgConsolidate NewMsgDonate = types.NewMsgDonate NewMsgAddLiquidity = types.NewMsgAddLiquidity NewMsgWithdrawLiquidity = types.NewMsgWithdrawLiquidity NewMsgSwap = types.NewMsgSwap NewKeygen = types.NewKeygen NewKeygenBlock = types.NewKeygenBlock NewMsgSetNodeKeys = types.NewMsgSetNodeKeys NewMsgManageTHORName = types.NewMsgManageTHORName NewTxOut = types.NewTxOut NewEventRewards = types.NewEventRewards NewEventPool = types.NewEventPool NewEventDonate = types.NewEventDonate NewEventSwap = types.NewEventSwap NewEventStreamingSwap = types.NewEventStreamingSwap NewEventLimitOrder = types.NewEventLimitOrder NewEventAddLiquidity = types.NewEventAddLiquidity NewEventWithdraw = types.NewEventWithdraw NewEventRefund = types.NewEventRefund NewEventBond = types.NewEventBond NewEventGas = types.NewEventGas NewEventScheduledOutbound = types.NewEventScheduledOutbound NewEventSecurity = types.NewEventSecurity NewEventSlash = types.NewEventSlash NewEventSlashPoint = types.NewEventSlashPoint NewEventReserve = types.NewEventReserve NewEventErrata = types.NewEventErrata NewEventFee = types.NewEventFee NewEventOutbound = types.NewEventOutbound NewEventSetMimir = types.NewEventSetMimir NewEventSetNodeMimir = types.NewEventSetNodeMimir NewEventTssKeygenSuccess = types.NewEventTssKeygenSuccess NewEventTssKeygenFailure = types.NewEventTssKeygenFailure NewEventTssKeygenMetric = types.NewEventTssKeygenMetric NewEventTssKeysignMetric = types.NewEventTssKeysignMetric NewEventPoolBalanceChanged = types.NewEventPoolBalanceChanged NewEventPendingLiquidity = types.NewEventPendingLiquidity NewEventTHORName = types.NewEventTHORName NewEventMintBurn = types.NewEventMintBurn NewEventVersion = types.NewEventVersion NewEventTradeAccountDeposit = types.NewEventTradeAccountDeposit NewEventTradeAccountWithdraw = types.NewEventTradeAccountWithdraw NewEventRUNEPoolDeposit = types.NewEventRUNEPoolDeposit NewEventRUNEPoolWithdraw = types.NewEventRUNEPoolWithdraw NewEventLoanOpen = types.NewEventLoanOpen NewEventLoanRepayment = types.NewEventLoanRepayment NewPoolMod = types.NewPoolMod NewMsgRefundTx = types.NewMsgRefundTx NewMsgOutboundTx = types.NewMsgOutboundTx NewMsgMigrate = types.NewMsgMigrate NewMsgRagnarok = types.NewMsgRagnarok ModuleCdc = types.ModuleCdc RegisterCodec = types.RegisterCodec RegisterInterfaces = types.RegisterInterfaces NewBondProviders = types.NewBondProviders NewBondProvider = types.NewBondProvider NewNodeAccount = types.NewNodeAccount NewVault = types.NewVault NewReserveContributor = types.NewReserveContributor NewMsgReserveContributor = types.NewMsgReserveContributor NewMsgBond = types.NewMsgBond NewMsgUnBond = types.NewMsgUnBond NewMsgErrataTx = types.NewMsgErrataTx NewMsgBan = types.NewMsgBan NewMsgLeave = types.NewMsgLeave NewMsgSetVersion = types.NewMsgSetVersion NewMsgProposeUpgrade = types.NewMsgProposeUpgrade NewMsgApproveUpgrade = types.NewMsgApproveUpgrade NewMsgRejectUpgrade = types.NewMsgRejectUpgrade NewMsgSetIPAddress = types.NewMsgSetIPAddress NewMsgNetworkFee = types.NewMsgNetworkFee NewNetworkFee = types.NewNetworkFee NewTHORName = types.NewTHORName NewLoan = types.NewLoan NewStreamingSwap = types.NewStreamingSwap GetPoolStatus = types.GetPoolStatus GetRandomVault = types.GetRandomVault GetRandomTx = types.GetRandomTx GetRandomObservedTx = types.GetRandomObservedTx GetRandomTxOutItem = types.GetRandomTxOutItem GetRandomObservedTxVoter = types.GetRandomObservedTxVoter GetRandomValidatorNode = types.GetRandomValidatorNode GetRandomVaultNode = types.GetRandomVaultNode GetRandomTHORAddress = types.GetRandomTHORAddress GetRandomRUNEAddress = types.GetRandomRUNEAddress GetRandomETHAddress = types.GetRandomETHAddress GetRandomGAIAAddress = types.GetRandomGAIAAddress GetRandomBTCAddress = types.GetRandomBTCAddress GetRandomLTCAddress = types.GetRandomLTCAddress GetRandomDOGEAddress = types.GetRandomDOGEAddress GetRandomTxHash = types.GetRandomTxHash GetRandomBech32Addr = types.GetRandomBech32Addr GetRandomBech32ConsensusPubKey = types.GetRandomBech32ConsensusPubKey GetRandomPubKey = types.GetRandomPubKey GetRandomPubKeySet = types.GetRandomPubKeySet GetCurrentVersion = types.GetCurrentVersion SetupConfigForTest = types.SetupConfigForTest HasSimpleMajority = types.HasSimpleMajority HasSuperMajority = types.HasSuperMajority HasMinority = types.HasMinority DefaultGenesis = types.DefaultGenesis NewSolvencyVoter = types.NewSolvencyVoter NewMsgSolvency = types.NewMsgSolvency NewSwapperClout = types.NewSwapperClout // Memo ParseMemo = mem.ParseMemo ParseMemoWithTHORNames = mem.ParseMemoWithTHORNames FetchAddress = mem.FetchAddress NewRefundMemo = mem.NewRefundMemo NewOutboundMemo = mem.NewOutboundMemo NewRagnarokMemo = mem.NewRagnarokMemo NewMigrateMemo = mem.NewMigrateMemo FetchDexAggregator = aggregators.FetchDexAggregator FetchDexAggregatorGasLimit = aggregators.FetchDexAggregatorGasLimit )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ADMINS = []string{
"thor1xghvhe4p50aqh5zq2t2vls938as0dkr2mzgpgh",
"thor19pkncem64gajdwrd5kasspyj0t75hhkpqjn5qh",
}
ADMINS hard coded admin address
var ErrNotEnoughToPayFee = errors.New("not enough asset to pay for fees")
ErrNotEnoughToPayFee will happen when the emitted asset is not enough to pay for fee
var IsValidTHORName = regexp.MustCompile(`^[a-zA-Z0-9+_-]+$`).MatchString
Functions ¶
func ActiveValidatorAnteHandler ¶
func ActiveValidatorAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, signer cosmos.AccAddress) error
ActiveValidatorAnteHandler called by the ante handler to gate mempool entry and also during deliver to only active validator nodes. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func BanAnteHandler ¶
BanAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func DepositAnteHandler ¶
func DepositAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgDeposit) error
DepositAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func ErrInternal ¶
ErrInternal return an error of errInternal with additional message
func ErrataTxAnteHandler ¶
func ErrataTxAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgErrataTx) error
ErrataTxAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func GetKeeper ¶
func GetKeeper( version semver.Version, cdc codec.BinaryCodec, coinKeeper bankkeeper.Keeper, accountKeeper authkeeper.AccountKeeper, upgradeKeeper upgradekeeper.Keeper, storeKey cosmos.StoreKey, ) (keeper.Keeper, error)
GetKeeper return Keeper
func IPAddressAnteHandler ¶
func IPAddressAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgSetIPAddress) error
IPAddressAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func InitGenesis ¶
func InitGenesis(ctx cosmos.Context, keeper keeper.Keeper, data GenesisState) []abci.ValidatorUpdate
func IsModuleAccAddress ¶
func IsModuleAccAddress(keeper keeper.Keeper, accAddr cosmos.AccAddress) bool
func MimirAnteHandler ¶
MimirAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func MsgSendHandleV116 ¶
func MsgSendLogger ¶
func MsgSendValidateV130 ¶
func MsgTssPoolHandleV134 ¶
func MsgTssPoolHandleV137 ¶
func MsgTssPoolLogger ¶
func MsgTssPoolLogger(ctx cosmos.Context, msg *MsgTssPool)
func MsgTssPoolValidateV124 ¶
func MsgTssPoolValidateV124(ctx cosmos.Context, mgr Manager, msg *MsgTssPool) error
func MsgTssPoolValidateV137 ¶
func MsgTssPoolValidateV137(ctx cosmos.Context, mgr Manager, msg *MsgTssPool) error
func NetworkFeeAnteHandler ¶
func NetworkFeeAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgNetworkFee) error
NetworkFeeAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func NewExternalHandler ¶
NewExternalHandler returns a handler for "thorchain" type messages.
func NewInternalHandler ¶
NewInternalHandler returns a handler for "thorchain" internal type messages.
func NewQuerier ¶
func NewQuerier(mgr *Mgrs, kbs cosmos.KeybaseStore) cosmos.Querier
NewQuerier is the module level router for state queries
func NewSwapMemo ¶
func NodePauseChainAnteHandler ¶
func NodePauseChainAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgNodePauseChain) error
NodePauseChainAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func ObservedTxInAnteHandler ¶
func ObservedTxInAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgObservedTxIn) error
ObservedTxInAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func ObservedTxOutAnteHandler ¶
func ObservedTxOutAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgObservedTxOut) error
ObservedTxOutAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func SendAnteHandler ¶
SendAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func SetNodeKeysAnteHandler ¶
func SetNodeKeysAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgSetNodeKeys) error
SetNodeKeysAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func SolvencyAnteHandler ¶
func SolvencyAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgSolvency) error
SolvencyAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func TssAnteHandler ¶
TssAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func TssKeysignFailAnteHandler ¶
func TssKeysignFailAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgTssKeysignFail) error
TssKeysignAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis validate genesis is valid or not
func VersionAnteHandler ¶
func VersionAnteHandler(ctx cosmos.Context, v semver.Version, k keeper.Keeper, msg MsgSetVersion) error
VersionAnteHandler called by the ante handler to gate mempool entry and also during deliver. Store changes will persist if this function succeeds, regardless of the success of the transaction.
Types ¶
type AddLiquidityHandler ¶
type AddLiquidityHandler struct {
// contains filtered or unexported fields
}
AddLiquidityHandler is to handle add liquidity
func NewAddLiquidityHandler ¶
func NewAddLiquidityHandler(mgr Manager) AddLiquidityHandler
NewAddLiquidityHandler create a new instance of AddLiquidityHandler
type AddLiquidityMemo ¶
type AddLiquidityMemo = mem.AddLiquidityMemo
type AffiliateFeeCollector ¶
type AffiliateFeeCollector = types.AffiliateFeeCollector
type AnteDecorator ¶
type AnteDecorator struct {
// contains filtered or unexported fields
}
func NewAnteDecorator ¶
func NewAnteDecorator(keeper keeper.Keeper) AnteDecorator
func (AnteDecorator) AnteHandle ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule implements an application module for the thorchain module.
func NewAppModule ¶
func NewAppModule( k keeper.Keeper, cdc codec.Codec, coinKeeper bankkeeper.Keeper, accountKeeper authkeeper.AccountKeeper, upgradeKeeper upgradekeeper.Keeper, storeKey cosmos.StoreKey, telemetryEnabled bool, ) AppModule
NewAppModule creates a new AppModule Object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
BeginBlock called when a block get proposed
func (AppModule) ConsensusVersion ¶
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock called when a block get committed
func (AppModule) ExportGenesis ¶
ExportGenesis export genesis
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate
InitGenesis initialise genesis
func (AppModule) LegacyQuerierHandler ¶
func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
LegacyQuerierHandler returns the capability module's Querier.
func (AppModule) NewHandler ¶
func (AppModule) NewQuerierHandler ¶
func (AppModule) QuerierRoute ¶
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(cfg module.Configurator)
RegisterServices registers module services.
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic app module Basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns default genesis state as raw bytes for the module.
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd() *cobra.Command
GetQueryCmd get the root query command of this module
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd() *cobra.Command
GetTxCmd get the root tx command of this module
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the mint module. thornode current doesn't have grpc endpoint yet
func (AppModuleBasic) RegisterInterfaces ¶
func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry)
RegisterInterfaces registers the module's interface types
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the module's types for the given codec.
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx client.Context, rtr *mux.Router)
RegisterRESTRoutes register rest routes
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error
ValidateGenesis check of the Genesis
type ApproveUpgradeHandler ¶
type ApproveUpgradeHandler struct {
// contains filtered or unexported fields
}
ApproveUpgradeHandler is to handle the ApproveUpgrade message
func NewApproveUpgradeHandler ¶
func NewApproveUpgradeHandler(mgr Manager) ApproveUpgradeHandler
NewApproveUpgradeHandler create new instance of ApproveUpgradeHandler
type BanHandler ¶
type BanHandler struct {
// contains filtered or unexported fields
}
BanHandler is to handle Ban message
func NewBanHandler ¶
func NewBanHandler(mgr Manager) BanHandler
NewBanHandler create new instance of BanHandler
type BaseHandler ¶
type BaseHandler[M cosmos.Msg] struct { TypedHandler[M] // contains filtered or unexported fields }
func NewSendHandler ¶
func NewSendHandler(mgr Manager) BaseHandler[*MsgSend]
NewSendHandler create a new instance of SendHandler
func NewTssHandler ¶
func NewTssHandler(mgr Manager) BaseHandler[*MsgTssPool]
NewTssHandler create a new handler to process MsgTssPool
type BondHandler ¶
type BondHandler struct {
// contains filtered or unexported fields
}
BondHandler a handler to process bond
func NewBondHandler ¶
func NewBondHandler(mgr Manager) BondHandler
NewBondHandler create new BondHandler
type BondProvider ¶
type BondProvider = types.BondProvider
type BondProviders ¶
type BondProviders = types.BondProviders
type ChainContract ¶
type ChainContract = types.ChainContract
type CommonOutboundTxHandler ¶
type CommonOutboundTxHandler struct {
// contains filtered or unexported fields
}
CommonOutboundTxHandler is the place where those common logic can be shared between multiple different kind of outbound tx handler at the moment, handler_refund, and handler_outbound_tx are largely the same , only some small difference
func NewCommonOutboundTxHandler ¶
func NewCommonOutboundTxHandler(mgr Manager) CommonOutboundTxHandler
NewCommonOutboundTxHandler create a new instance of the CommonOutboundTxHandler
type ConsolidateHandler ¶
type ConsolidateHandler struct {
// contains filtered or unexported fields
}
ConsolidateHandler handles transactions the network sends to itself, to consolidate UTXOs
func NewConsolidateHandler ¶
func NewConsolidateHandler(mgr Manager) ConsolidateHandler
NewConsolidateHandler create a new instance of the ConsolidateHandler
type ConsolidateMemo ¶
type ConsolidateMemo = mem.ConsolidateMemo
type DepositHandler ¶
type DepositHandler struct {
// contains filtered or unexported fields
}
DepositHandler is to process native messages on THORChain
func NewDepositHandler ¶
func NewDepositHandler(mgr Manager) DepositHandler
NewDepositHandler create a new instance of DepositHandler
type DonateHandler ¶
type DonateHandler struct {
// contains filtered or unexported fields
}
DonateHandler is to handle donate message
func NewDonateHandler ¶
func NewDonateHandler(mgr Manager) DonateHandler
NewDonateHandler create a new instance of DonateHandler
type DonateMemo ¶
type DonateMemo = mem.DonateMemo
type DroppedSwapOutTx ¶
type DroppedSwapOutTx struct {
// contains filtered or unexported fields
}
type EmitEventItem ¶
EmitEventItem define the method all event need to implement
type ErrataTxHandler ¶
type ErrataTxHandler struct {
// contains filtered or unexported fields
}
ErrataTxHandler is to handle ErrataTx message
func NewErrataTxHandler ¶
func NewErrataTxHandler(mgr Manager) ErrataTxHandler
NewErrataTxHandler create new instance of ErrataTxHandler
type ErrataTxVoter ¶
type ErrataTxVoter = types.ErrataTxVoter
type EventAddLiquidity ¶
type EventAddLiquidity = types.EventAddLiquidity
type EventDonate ¶
type EventDonate = types.EventDonate
type EventErrata ¶
type EventErrata = types.EventErrata
type EventLoanOpen ¶
type EventLoanOpen = types.EventLoanOpen
type EventLoanRepayment ¶
type EventLoanRepayment = types.EventLoanRepayment
type EventManager ¶
type EventManager interface { EmitEvent(ctx cosmos.Context, evt EmitEventItem) error EmitGasEvent(ctx cosmos.Context, gasEvent *EventGas) error EmitSwapEvent(ctx cosmos.Context, swap *EventSwap) error EmitFeeEvent(ctx cosmos.Context, feeEvent *EventFee) error }
EventManager define methods need to be support to manage events
func GetEventManager ¶
func GetEventManager(version semver.Version) (EventManager, error)
GetEventManager will return an implementation of EventManager
type EventMgrVCUR ¶
type EventMgrVCUR struct{}
EventMgrVCUR implement EventManager interface
func (*EventMgrVCUR) EmitEvent ¶
func (m *EventMgrVCUR) EmitEvent(ctx cosmos.Context, evt EmitEventItem) error
EmitEvent to block
func (*EventMgrVCUR) EmitFeeEvent ¶
func (m *EventMgrVCUR) EmitFeeEvent(ctx cosmos.Context, feeEvent *EventFee) error
EmitFeeEvent emit a fee event through event manager
func (*EventMgrVCUR) EmitGasEvent ¶
func (m *EventMgrVCUR) EmitGasEvent(ctx cosmos.Context, gasEvent *EventGas) error
EmitGasEvent emit gas events
func (*EventMgrVCUR) EmitSwapEvent ¶
func (m *EventMgrVCUR) EmitSwapEvent(ctx cosmos.Context, swap *EventSwap) error
EmitSwapEvent emit swap event to block
type EventOutbound ¶
type EventOutbound = types.EventOutbound
type EventRefund ¶
type EventRefund = types.EventRefund
type EventReserve ¶
type EventReserve = types.EventReserve
type EventRewards ¶
type EventRewards = types.EventRewards
type EventSlash ¶
type EventSlash = types.EventSlash
type EventWithdraw ¶
type EventWithdraw = types.EventWithdraw
type GasManager ¶
type GasManager interface { BeginBlock() EndBlock(ctx cosmos.Context, keeper keeper.Keeper, eventManager EventManager) AddGasAsset(outAsset common.Asset, gas common.Gas, increaseTxCount bool) ProcessGas(ctx cosmos.Context, keeper keeper.Keeper) GetGas() common.Gas GetAssetOutboundFee(ctx cosmos.Context, asset common.Asset, inRune bool) (cosmos.Uint, error) GetMaxGas(ctx cosmos.Context, chain common.Chain) (common.Coin, error) GetGasRate(ctx cosmos.Context, chain common.Chain) cosmos.Uint GetNetworkFee(ctx cosmos.Context, chain common.Chain) (types.NetworkFee, error) CalcOutboundFeeMultiplier(ctx cosmos.Context, targetSurplusRune, gasSpentRune, gasWithheldRune, maxMultiplier, minMultiplier cosmos.Uint) cosmos.Uint }
GasManager define all the methods required to manage gas
func GetGasManager ¶
GetGasManager return GasManager
type GasMgrVCUR ¶
type GasMgrVCUR struct {
// contains filtered or unexported fields
}
GasMgrVCUR implement GasManager interface which will store the gas related events happened in thorchain to memory emit GasEvent per block if there are any
func (*GasMgrVCUR) AddGasAsset ¶
AddGasAsset for EndBlock's ProcessGas; add the outbound-Asset-associated Gas to the gas manager's outAssetGas, and optionally increment the gas manager's gasCount.
func (*GasMgrVCUR) BeginBlock ¶
func (gm *GasMgrVCUR) BeginBlock()
BeginBlock need to be called when a new block get created , update the internal EventGas to new one
func (*GasMgrVCUR) CalcOutboundFeeMultiplier ¶
func (gm *GasMgrVCUR) CalcOutboundFeeMultiplier(ctx cosmos.Context, targetSurplusRune, gasSpentRune, gasWithheldRune, maxMultiplier, minMultiplier cosmos.Uint) cosmos.Uint
CalcOutboundFeeMultiplier returns the current outbound fee multiplier based on current and target outbound fee surplus
func (*GasMgrVCUR) EndBlock ¶
func (gm *GasMgrVCUR) EndBlock(ctx cosmos.Context, keeper keeper.Keeper, eventManager EventManager)
EndBlock emit the events
func (*GasMgrVCUR) GetAssetOutboundFee ¶
func (gm *GasMgrVCUR) GetAssetOutboundFee(ctx cosmos.Context, asset common.Asset, inRune bool) (cosmos.Uint, error)
GetAssetOutboundFee returns current outbound fee for the asset. fee = chainBaseFee * assetDOFM (asset-specific Dynamic Outbound Fee Multiplier) - asset: the asset to calculate the fee for - inRune: whether the fee should be returned in RUNE. If false the fee is returned in asset units.
func (*GasMgrVCUR) GetGasRate ¶
GetGasRate return the gas rate
func (*GasMgrVCUR) GetNetworkFee ¶
func (gm *GasMgrVCUR) GetNetworkFee(ctx cosmos.Context, chain common.Chain) (types.NetworkFee, error)
func (*GasMgrVCUR) ProcessGas ¶
func (gm *GasMgrVCUR) ProcessGas(ctx cosmos.Context, keeper keeper.Keeper)
ProcessGas to subsidise the gas asset pools with RUNE for the gas they have spent
type GenesisState ¶
type GenesisState struct { Pools []types.Pool `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools"` LiquidityProviders gitlab_com_thorchain_thornode_x_thorchain_types.LiquidityProviders `` /* 185-byte string literal not displayed */ ObservedTxInVoters gitlab_com_thorchain_thornode_x_thorchain_types.ObservedTxVoters `` /* 187-byte string literal not displayed */ ObservedTxOutVoters gitlab_com_thorchain_thornode_x_thorchain_types.ObservedTxVoters `` /* 190-byte string literal not displayed */ TxOuts []types.TxOut `protobuf:"bytes,5,rep,name=tx_outs,json=txOuts,proto3" json:"tx_outs"` NodeAccounts gitlab_com_thorchain_thornode_x_thorchain_types.NodeAccounts `` /* 161-byte string literal not displayed */ Vaults gitlab_com_thorchain_thornode_x_thorchain_types.Vaults `protobuf:"bytes,7,rep,name=vaults,proto3,castrepeated=gitlab.com/thorchain/thornode/x/thorchain/types.Vaults" json:"vaults"` Reserve uint64 `protobuf:"varint,8,opt,name=reserve,proto3" json:"reserve,omitempty"` LastSignedHeight int64 `protobuf:"varint,10,opt,name=last_signed_height,json=lastSignedHeight,proto3" json:"last_signed_height,omitempty"` LastChainHeights []LastChainHeight `protobuf:"bytes,11,rep,name=last_chain_heights,json=lastChainHeights,proto3" json:"last_chain_heights"` ReserveContributors gitlab_com_thorchain_thornode_x_thorchain_types.ReserveContributors `` /* 190-byte string literal not displayed */ Network types.Network `protobuf:"bytes,13,opt,name=network,proto3" json:"network"` OrderbookItems []types.MsgSwap `protobuf:"bytes,19,rep,name=orderbook_items,json=orderbookItems,proto3" json:"orderbook_items"` NetworkFees []types.NetworkFee `protobuf:"bytes,20,rep,name=network_fees,json=networkFees,proto3" json:"network_fees"` ChainContracts []types.ChainContract `protobuf:"bytes,22,rep,name=chain_contracts,json=chainContracts,proto3" json:"chain_contracts"` THORNames []types.THORName `protobuf:"bytes,23,rep,name=THORNames,proto3" json:"THORNames"` Mimirs []Mimir `protobuf:"bytes,24,rep,name=mimirs,proto3" json:"mimirs"` StoreVersion int64 `protobuf:"varint,25,opt,name=store_version,json=storeVersion,proto3" json:"store_version,omitempty"` BondProviders []types.BondProviders `protobuf:"bytes,26,rep,name=bond_providers,json=bondProviders,proto3" json:"bond_providers"` POL types.ProtocolOwnedLiquidity `protobuf:"bytes,27,opt,name=POL,proto3" json:"POL"` Loans []types.Loan `protobuf:"bytes,28,rep,name=loans,proto3" json:"loans"` StreamingSwaps []types.StreamingSwap `protobuf:"bytes,29,rep,name=streaming_swaps,json=streamingSwaps,proto3" json:"streaming_swaps"` SwapQueueItems []types.MsgSwap `protobuf:"bytes,30,rep,name=swap_queue_items,json=swapQueueItems,proto3" json:"swap_queue_items"` SwapperClout []types.SwapperClout `protobuf:"bytes,31,rep,name=swapper_clout,json=swapperClout,proto3" json:"swapper_clout"` TradeAccounts []types.TradeAccount `protobuf:"bytes,32,rep,name=trade_accounts,json=tradeAccounts,proto3" json:"trade_accounts"` TradeUnits []types.TradeUnit `protobuf:"bytes,33,rep,name=trade_units,json=tradeUnits,proto3" json:"trade_units"` OutboundFeeWithheldRune gitlab_com_thorchain_thornode_common.Coins `` /* 181-byte string literal not displayed */ OutboundFeeSpentRune gitlab_com_thorchain_thornode_common.Coins `` /* 172-byte string literal not displayed */ RuneProviders []types.RUNEProvider `protobuf:"bytes,36,rep,name=rune_providers,json=runeProviders,proto3" json:"rune_providers"` RunePool types.RUNEPool `protobuf:"bytes,37,opt,name=rune_pool,json=runePool,proto3" json:"rune_pool"` NodeMimirs []types.NodeMimir `protobuf:"bytes,38,rep,name=nodeMimirs,proto3" json:"nodeMimirs"` AffiliateCollectors []types.AffiliateFeeCollector `protobuf:"bytes,39,rep,name=affiliate_collectors,json=affiliateCollectors,proto3" json:"affiliate_collectors"` LoanTotalCollateral gitlab_com_thorchain_thornode_common.Coins `` /* 167-byte string literal not displayed */ }
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState the default values THORNode put in the Genesis
func ExportGenesis ¶
func ExportGenesis(ctx cosmos.Context, k keeper.Keeper) GenesisState
ExportGenesis export the data in Genesis
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetAffiliateCollectors ¶
func (m *GenesisState) GetAffiliateCollectors() []types.AffiliateFeeCollector
func (*GenesisState) GetBondProviders ¶
func (m *GenesisState) GetBondProviders() []types.BondProviders
func (*GenesisState) GetChainContracts ¶
func (m *GenesisState) GetChainContracts() []types.ChainContract
func (*GenesisState) GetLastChainHeights ¶
func (m *GenesisState) GetLastChainHeights() []LastChainHeight
func (*GenesisState) GetLastSignedHeight ¶
func (m *GenesisState) GetLastSignedHeight() int64
func (*GenesisState) GetLiquidityProviders ¶
func (m *GenesisState) GetLiquidityProviders() gitlab_com_thorchain_thornode_x_thorchain_types.LiquidityProviders
func (*GenesisState) GetLoanTotalCollateral ¶
func (m *GenesisState) GetLoanTotalCollateral() gitlab_com_thorchain_thornode_common.Coins
func (*GenesisState) GetLoans ¶
func (m *GenesisState) GetLoans() []types.Loan
func (*GenesisState) GetMimirs ¶
func (m *GenesisState) GetMimirs() []Mimir
func (*GenesisState) GetNetwork ¶
func (m *GenesisState) GetNetwork() types.Network
func (*GenesisState) GetNetworkFees ¶
func (m *GenesisState) GetNetworkFees() []types.NetworkFee
func (*GenesisState) GetNodeAccounts ¶
func (m *GenesisState) GetNodeAccounts() gitlab_com_thorchain_thornode_x_thorchain_types.NodeAccounts
func (*GenesisState) GetNodeMimirs ¶
func (m *GenesisState) GetNodeMimirs() []types.NodeMimir
func (*GenesisState) GetObservedTxInVoters ¶
func (m *GenesisState) GetObservedTxInVoters() gitlab_com_thorchain_thornode_x_thorchain_types.ObservedTxVoters
func (*GenesisState) GetObservedTxOutVoters ¶
func (m *GenesisState) GetObservedTxOutVoters() gitlab_com_thorchain_thornode_x_thorchain_types.ObservedTxVoters
func (*GenesisState) GetOrderbookItems ¶
func (m *GenesisState) GetOrderbookItems() []types.MsgSwap
func (*GenesisState) GetOutboundFeeSpentRune ¶
func (m *GenesisState) GetOutboundFeeSpentRune() gitlab_com_thorchain_thornode_common.Coins
func (*GenesisState) GetOutboundFeeWithheldRune ¶
func (m *GenesisState) GetOutboundFeeWithheldRune() gitlab_com_thorchain_thornode_common.Coins
func (*GenesisState) GetPOL ¶
func (m *GenesisState) GetPOL() types.ProtocolOwnedLiquidity
func (*GenesisState) GetPools ¶
func (m *GenesisState) GetPools() []types.Pool
func (*GenesisState) GetReserve ¶
func (m *GenesisState) GetReserve() uint64
func (*GenesisState) GetReserveContributors ¶
func (m *GenesisState) GetReserveContributors() gitlab_com_thorchain_thornode_x_thorchain_types.ReserveContributors
func (*GenesisState) GetRunePool ¶
func (m *GenesisState) GetRunePool() types.RUNEPool
func (*GenesisState) GetRuneProviders ¶
func (m *GenesisState) GetRuneProviders() []types.RUNEProvider
func (*GenesisState) GetStoreVersion ¶
func (m *GenesisState) GetStoreVersion() int64
func (*GenesisState) GetStreamingSwaps ¶
func (m *GenesisState) GetStreamingSwaps() []types.StreamingSwap
func (*GenesisState) GetSwapQueueItems ¶
func (m *GenesisState) GetSwapQueueItems() []types.MsgSwap
func (*GenesisState) GetSwapperClout ¶
func (m *GenesisState) GetSwapperClout() []types.SwapperClout
func (*GenesisState) GetTHORNames ¶
func (m *GenesisState) GetTHORNames() []types.THORName
func (*GenesisState) GetTradeAccounts ¶
func (m *GenesisState) GetTradeAccounts() []types.TradeAccount
func (*GenesisState) GetTradeUnits ¶
func (m *GenesisState) GetTradeUnits() []types.TradeUnit
func (*GenesisState) GetTxOuts ¶
func (m *GenesisState) GetTxOuts() []types.TxOut
func (*GenesisState) GetVaults ¶
func (m *GenesisState) GetVaults() gitlab_com_thorchain_thornode_x_thorchain_types.Vaults
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type IPAddressHandler ¶
type IPAddressHandler struct {
// contains filtered or unexported fields
}
IPAddressHandler is to handle ip address message
func NewIPAddressHandler ¶
func NewIPAddressHandler(mgr Manager) IPAddressHandler
NewIPAddressHandler create new instance of IPAddressHandler
type InfiniteGasDecorator ¶
type InfiniteGasDecorator struct {
// contains filtered or unexported fields
}
InfiniteGasDecorator uses an infinite gas meter to prevent out-of-gas panics and allow non-versioned changes to be made without breaking consensus, as long as the resulting state is consistent.
func NewInfiniteGasDecorator ¶
func NewInfiniteGasDecorator(keeper keeper.Keeper) InfiniteGasDecorator
func (InfiniteGasDecorator) AnteHandle ¶
type KeygenBlock ¶
type KeygenBlock = types.KeygenBlock
type LadderDispatch ¶
type LadderDispatch[F interface{}] struct {
// contains filtered or unexported fields
}
func NewHandlers ¶
func NewValidators ¶
Sadly Go's type system is still primitive and does not allow for generics in type aliases, so the following cleaner convenience type does not work:
type Validators[M MsgType] = LadderDispatch[func(cosmos.Context, Manager, M) error]
See https://github.com/golang/go/issues/46477 for ongoing discussion.
Instead we use these thin convenience functions to do the same type wrapping:
func (LadderDispatch[F]) Get ¶
func (l LadderDispatch[F]) Get(targetVersion semver.Version) F
Return the most recent handler that supports the target version.
func (LadderDispatch[F]) Register ¶
func (l LadderDispatch[F]) Register(version string, handler F) LadderDispatch[F]
Register a handler for a specific version. Enforces descending order of registered versions.
type LastChainHeight ¶
type LastChainHeight struct { Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` }
func (*LastChainHeight) Descriptor ¶
func (*LastChainHeight) Descriptor() ([]byte, []int)
func (*LastChainHeight) GetChain ¶
func (m *LastChainHeight) GetChain() string
func (*LastChainHeight) GetHeight ¶
func (m *LastChainHeight) GetHeight() int64
func (*LastChainHeight) Marshal ¶
func (m *LastChainHeight) Marshal() (dAtA []byte, err error)
func (*LastChainHeight) MarshalToSizedBuffer ¶
func (m *LastChainHeight) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LastChainHeight) ProtoMessage ¶
func (*LastChainHeight) ProtoMessage()
func (*LastChainHeight) Reset ¶
func (m *LastChainHeight) Reset()
func (*LastChainHeight) Size ¶
func (m *LastChainHeight) Size() (n int)
func (*LastChainHeight) String ¶
func (m *LastChainHeight) String() string
func (*LastChainHeight) Unmarshal ¶
func (m *LastChainHeight) Unmarshal(dAtA []byte) error
func (*LastChainHeight) XXX_DiscardUnknown ¶
func (m *LastChainHeight) XXX_DiscardUnknown()
func (*LastChainHeight) XXX_Marshal ¶
func (m *LastChainHeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LastChainHeight) XXX_Merge ¶
func (m *LastChainHeight) XXX_Merge(src proto.Message)
func (*LastChainHeight) XXX_Size ¶
func (m *LastChainHeight) XXX_Size() int
func (*LastChainHeight) XXX_Unmarshal ¶
func (m *LastChainHeight) XXX_Unmarshal(b []byte) error
type LeaveHandler ¶
type LeaveHandler struct {
// contains filtered or unexported fields
}
LeaveHandler a handler to process leave request if an operator of THORChain node would like to leave and get their bond back , they have to send a Leave request through THORChain
func NewLeaveHandler ¶
func NewLeaveHandler(mgr Manager) LeaveHandler
NewLeaveHandler create a new LeaveHandler
type LiquidityProvider ¶
type LiquidityProvider = types.LiquidityProvider
type LiquidityProviders ¶
type LiquidityProviders = types.LiquidityProviders
type LoanOpenHandler ¶
type LoanOpenHandler struct {
// contains filtered or unexported fields
}
LoanOpenHandler a handler to process bond
func NewLoanOpenHandler ¶
func NewLoanOpenHandler(mgr Manager) LoanOpenHandler
NewLoanOpenHandler create new LoanOpenHandler
func (LoanOpenHandler) GetLoanCollateralRemainingForPool ¶
type LoanOpenMemo ¶
type LoanOpenMemo = mem.LoanOpenMemo
type LoanRepaymentHandler ¶
type LoanRepaymentHandler struct {
// contains filtered or unexported fields
}
LoanRepaymentHandler a handler to process bond
func NewLoanRepaymentHandler ¶
func NewLoanRepaymentHandler(mgr Manager) LoanRepaymentHandler
NewLoanRepaymentHandler create new LoanRepaymentHandler
type LoanRepaymentMemo ¶
type LoanRepaymentMemo = mem.LoanRepaymentMemo
type ManageTHORNameHandler ¶
type ManageTHORNameHandler struct {
// contains filtered or unexported fields
}
ManageTHORNameHandler a handler to process MsgNetworkFee messages
func NewManageTHORNameHandler ¶
func NewManageTHORNameHandler(mgr Manager) ManageTHORNameHandler
NewManageTHORNameHandler create a new instance of network fee handler
type ManageTHORNameMemo ¶
type ManageTHORNameMemo = mem.ManageTHORNameMemo
type Manager ¶
type Manager interface { GetConstants() constants.ConstantValues GetVersion() semver.Version Keeper() keeper.Keeper GasMgr() GasManager EventMgr() EventManager TxOutStore() TxOutStore NetworkMgr() NetworkManager ValidatorMgr() ValidatorManager ObMgr() ObserverManager PoolMgr() PoolManager SwapQ() SwapQueue OrderBookMgr() OrderBook Slasher() Slasher TradeAccountManager() TradeAccountManager }
Manager is an interface to define all the required methods
type Mgrs ¶
Mgrs is an implementation of Manager interface
func NewManagers ¶
func NewManagers( keeper keeper.Keeper, cdc codec.Codec, coinKeeper bankkeeper.Keeper, accountKeeper authkeeper.AccountKeeper, upgradeKeeper upgradekeeper.Keeper, storeKey cosmos.StoreKey, ) *Mgrs
NewManagers create a new Manager
func (*Mgrs) BeginBlock ¶
BeginBlock detect whether there are new version available, if it is available then create a new version of Mgr
func (*Mgrs) GetConstants ¶
func (mgr *Mgrs) GetConstants() constants.ConstantValues
func (*Mgrs) GetVersion ¶
func (*Mgrs) NetworkMgr ¶
func (mgr *Mgrs) NetworkMgr() NetworkManager
VaultMgr return a valid NetworkManager
func (*Mgrs) ObMgr ¶
func (mgr *Mgrs) ObMgr() ObserverManager
ObMgr return an implementation of ObserverManager
func (*Mgrs) TradeAccountManager ¶
func (mgr *Mgrs) TradeAccountManager() TradeAccountManager
func (*Mgrs) ValidatorMgr ¶
func (mgr *Mgrs) ValidatorMgr() ValidatorManager
ValidatorMgr return an implementation of ValidatorManager
type MigrateHandler ¶
type MigrateHandler struct {
// contains filtered or unexported fields
}
MigrateHandler is a handler to process MsgMigrate
func NewMigrateHandler ¶
func NewMigrateHandler(mgr Manager) MigrateHandler
NewMigrateHandler create a new instance of MigrateHandler
type MigrateMemo ¶
type MigrateMemo = mem.MigrateMemo
type Mimir ¶
type Mimir struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` }
func (*Mimir) Descriptor ¶
func (*Mimir) ProtoMessage ¶
func (*Mimir) ProtoMessage()
func (*Mimir) XXX_DiscardUnknown ¶
func (m *Mimir) XXX_DiscardUnknown()
func (*Mimir) XXX_Marshal ¶
func (*Mimir) XXX_Unmarshal ¶
type MimirHandler ¶
type MimirHandler struct {
// contains filtered or unexported fields
}
MimirHandler is to handle admin messages
func NewMimirHandler ¶
func NewMimirHandler(mgr Manager) MimirHandler
NewMimirHandler create new instance of MimirHandler
type ModuleBalanceAction ¶
type ModuleBalanceAction struct { ModuleName string RuneRecipient string RuneToTransfer cosmos.Uint SynthsToBurn common.Coins }
send RuneToTransfer from ModuleName to RuneRecipient burn SynthsToBurn from ModuleName
type MsgAddLiquidity ¶
type MsgAddLiquidity = types.MsgAddLiquidity
type MsgApproveUpgrade ¶
type MsgApproveUpgrade = types.MsgApproveUpgrade
type MsgConsolidate ¶
type MsgConsolidate = types.MsgConsolidate
type MsgDeposit ¶
type MsgDeposit = types.MsgDeposit
type MsgErrataTx ¶
type MsgErrataTx = types.MsgErrataTx
type MsgHandler ¶
MsgHandler is an interface expect all handler to implement
type MsgLoanOpen ¶
type MsgLoanOpen = types.MsgLoanOpen
type MsgLoanRepayment ¶
type MsgLoanRepayment = types.MsgLoanRepayment
type MsgManageTHORName ¶
type MsgManageTHORName = types.MsgManageTHORName
type MsgMigrate ¶
type MsgMigrate = types.MsgMigrate
type MsgNetworkFee ¶
type MsgNetworkFee = types.MsgNetworkFee
type MsgNodePauseChain ¶
type MsgNodePauseChain = types.MsgNodePauseChain
type MsgObservedTxIn ¶
type MsgObservedTxIn = types.MsgObservedTxIn
type MsgObservedTxOut ¶
type MsgObservedTxOut = types.MsgObservedTxOut
type MsgOutboundTx ¶
type MsgOutboundTx = types.MsgOutboundTx
type MsgProposeUpgrade ¶
type MsgProposeUpgrade = types.MsgProposeUpgrade
type MsgRagnarok ¶
type MsgRagnarok = types.MsgRagnarok
type MsgRefundTx ¶
type MsgRefundTx = types.MsgRefundTx
type MsgRejectUpgrade ¶
type MsgRejectUpgrade = types.MsgRejectUpgrade
type MsgReserveContributor ¶
type MsgReserveContributor = types.MsgReserveContributor
type MsgRunePoolDeposit ¶
type MsgRunePoolDeposit = types.MsgRunePoolDeposit
type MsgRunePoolWithdraw ¶
type MsgRunePoolWithdraw = types.MsgRunePoolWithdraw
type MsgSetIPAddress ¶
type MsgSetIPAddress = types.MsgSetIPAddress
type MsgSetNodeKeys ¶
type MsgSetNodeKeys = types.MsgSetNodeKeys
type MsgSetVersion ¶
type MsgSetVersion = types.MsgSetVersion
type MsgSolvency ¶
type MsgSolvency = types.MsgSolvency
type MsgTradeAccountDeposit ¶
type MsgTradeAccountDeposit = types.MsgTradeAccountDeposit
type MsgTradeAccountWithdrawal ¶
type MsgTradeAccountWithdrawal = types.MsgTradeAccountWithdrawal
type MsgTssKeysignFail ¶
type MsgTssKeysignFail = types.MsgTssKeysignFail
type MsgTssPool ¶
type MsgTssPool = types.MsgTssPool
type MsgWithdrawLiquidity ¶
type MsgWithdrawLiquidity = types.MsgWithdrawLiquidity
type NetworkFee ¶
type NetworkFee = types.NetworkFee
type NetworkFeeHandler ¶
type NetworkFeeHandler struct {
// contains filtered or unexported fields
}
NetworkFeeHandler a handler to process MsgNetworkFee messages
func NewNetworkFeeHandler ¶
func NewNetworkFeeHandler(mgr Manager) NetworkFeeHandler
NewNetworkFeeHandler create a new instance of network fee handler
type NetworkManager ¶
type NetworkManager interface { TriggerKeygen(ctx cosmos.Context, nas NodeAccounts) error RotateVault(ctx cosmos.Context, vault Vault) error BeginBlock(ctx cosmos.Context, mgr Manager) error EndBlock(ctx cosmos.Context, mgr Manager) error UpdateNetwork(ctx cosmos.Context, constAccessor constants.ConstantValues, gasManager GasManager, eventMgr EventManager) error SpawnDerivedAsset(ctx cosmos.Context, asset common.Asset, mgr Manager) CalcAnchor(_ cosmos.Context, _ Manager, _ common.Asset) (cosmos.Uint, cosmos.Uint, cosmos.Uint) }
NetworkManager interface define the contract of network Manager
func GetNetworkManager ¶
func GetNetworkManager(version semver.Version, keeper keeper.Keeper, txOutStore TxOutStore, eventMgr EventManager) (NetworkManager, error)
GetNetworkManager retrieve a NetworkManager that is compatible with the given version
type NetworkMgrV134 ¶
type NetworkMgrV134 struct {
// contains filtered or unexported fields
}
NetworkMgrV134 is going to manage the vaults
func (*NetworkMgrV134) BeginBlock ¶
func (vm *NetworkMgrV134) BeginBlock(ctx cosmos.Context, mgr Manager) error
func (*NetworkMgrV134) CalcAnchor ¶
func (*NetworkMgrV134) EndBlock ¶
func (vm *NetworkMgrV134) EndBlock(ctx cosmos.Context, mgr Manager) error
EndBlock move funds from retiring asgard vaults
func (*NetworkMgrV134) GetAvailableAnchorsAndDepths ¶
func (vm *NetworkMgrV134) GetAvailableAnchorsAndDepths( ctx cosmos.Context, mgr Manager, asset common.Asset, ) ([]common.Asset, []cosmos.Uint)
GetAvailableAnchorsAndDepths returns anchor assets for available pools and a slice of equivalent length with their pool depths in RUNE.
func (*NetworkMgrV134) POLCycle ¶
func (vm *NetworkMgrV134) POLCycle(ctx cosmos.Context, mgr Manager) error
func (*NetworkMgrV134) RotateVault ¶
func (vm *NetworkMgrV134) RotateVault(ctx cosmos.Context, vault Vault) error
RotateVault update vault to Retiring and new vault to active
func (*NetworkMgrV134) SpawnDerivedAsset ¶
func (*NetworkMgrV134) TriggerKeygen ¶
func (vm *NetworkMgrV134) TriggerKeygen(ctx cosmos.Context, nas NodeAccounts) error
TriggerKeygen generate a record to instruct signer kick off keygen process
func (*NetworkMgrV134) UpdateNetwork ¶
func (vm *NetworkMgrV134) UpdateNetwork(ctx cosmos.Context, constAccessor constants.ConstantValues, gasManager GasManager, eventMgr EventManager) error
UpdateNetwork Update the network data to reflect changing in this block
type NetworkMgrV136 ¶
type NetworkMgrV136 struct {
// contains filtered or unexported fields
}
NetworkMgrV136 is going to manage the vaults
func (*NetworkMgrV136) BeginBlock ¶
func (vm *NetworkMgrV136) BeginBlock(ctx cosmos.Context, mgr Manager) error
func (*NetworkMgrV136) CalcAnchor ¶
func (*NetworkMgrV136) EndBlock ¶
func (vm *NetworkMgrV136) EndBlock(ctx cosmos.Context, mgr Manager) error
EndBlock move funds from retiring asgard vaults
func (*NetworkMgrV136) GetAvailableAnchorsAndDepths ¶
func (vm *NetworkMgrV136) GetAvailableAnchorsAndDepths( ctx cosmos.Context, mgr Manager, asset common.Asset, ) ([]common.Asset, []cosmos.Uint)
GetAvailableAnchorsAndDepths returns anchor assets for available pools and a slice of equivalent length with their pool depths in RUNE.
func (*NetworkMgrV136) POLCycle ¶
func (vm *NetworkMgrV136) POLCycle(ctx cosmos.Context, mgr Manager) error
func (*NetworkMgrV136) RotateVault ¶
func (vm *NetworkMgrV136) RotateVault(ctx cosmos.Context, vault Vault) error
RotateVault update vault to Retiring and new vault to active
func (*NetworkMgrV136) SpawnDerivedAsset ¶
func (*NetworkMgrV136) TriggerKeygen ¶
func (vm *NetworkMgrV136) TriggerKeygen(ctx cosmos.Context, nas NodeAccounts) error
TriggerKeygen generate a record to instruct signer kick off keygen process
func (*NetworkMgrV136) UpdateNetwork ¶
func (vm *NetworkMgrV136) UpdateNetwork(ctx cosmos.Context, constAccessor constants.ConstantValues, gasManager GasManager, eventMgr EventManager) error
UpdateNetwork Update the network data to reflect changing in this block
type NetworkMgrVCUR ¶
type NetworkMgrVCUR struct {
// contains filtered or unexported fields
}
NetworkMgrVCUR is going to manage the vaults
func (*NetworkMgrVCUR) BeginBlock ¶
func (vm *NetworkMgrVCUR) BeginBlock(ctx cosmos.Context, mgr Manager) error
func (*NetworkMgrVCUR) CalcAnchor ¶
func (*NetworkMgrVCUR) EndBlock ¶
func (vm *NetworkMgrVCUR) EndBlock(ctx cosmos.Context, mgr Manager) error
EndBlock move funds from retiring asgard vaults
func (*NetworkMgrVCUR) GetAvailableAnchorsAndDepths ¶
func (vm *NetworkMgrVCUR) GetAvailableAnchorsAndDepths( ctx cosmos.Context, mgr Manager, asset common.Asset, ) ([]common.Asset, []cosmos.Uint)
GetAvailableAnchorsAndDepths returns anchor assets for available pools and a slice of equivalent length with their pool depths in RUNE.
func (*NetworkMgrVCUR) POLCycle ¶
func (vm *NetworkMgrVCUR) POLCycle(ctx cosmos.Context, mgr Manager) error
func (*NetworkMgrVCUR) RotateVault ¶
func (vm *NetworkMgrVCUR) RotateVault(ctx cosmos.Context, vault Vault) error
RotateVault update vault to Retiring and new vault to active
func (*NetworkMgrVCUR) SpawnDerivedAsset ¶
func (*NetworkMgrVCUR) TriggerKeygen ¶
func (vm *NetworkMgrVCUR) TriggerKeygen(ctx cosmos.Context, nas NodeAccounts) error
TriggerKeygen generate a record to instruct signer kick off keygen process
func (*NetworkMgrVCUR) UpdateNetwork ¶
func (vm *NetworkMgrVCUR) UpdateNetwork(ctx cosmos.Context, constAccessor constants.ConstantValues, gasManager GasManager, eventMgr EventManager) error
UpdateNetwork Update the network data to reflect changing in this block
type NoOpHandler ¶
type NoOpHandler struct {
// contains filtered or unexported fields
}
NoOpHandler is to handle donate message
func NewNoOpHandler ¶
func NewNoOpHandler(mgr Manager) NoOpHandler
NewNoOpHandler create a new instance of NoOpHandler
type NodeAccount ¶
type NodeAccount = types.NodeAccount
type NodeAccounts ¶
type NodeAccounts = types.NodeAccounts
type NodeMimirs ¶
type NodeMimirs = types.NodeMimirs
type NodePauseChainHandler ¶
type NodePauseChainHandler struct {
// contains filtered or unexported fields
}
NodePauseChainHandler is to handle node pause chain messages
func NewNodePauseChainHandler ¶
func NewNodePauseChainHandler(mgr Manager) NodePauseChainHandler
NewNodePauseChainHandler create new instance of NodePauseChainHandler
type NodeStatus ¶
type NodeStatus = types.NodeStatus
type ObservedNetworkFeeVoter ¶
type ObservedNetworkFeeVoter = types.ObservedNetworkFeeVoter
type ObservedTx ¶
type ObservedTx = types.ObservedTx
type ObservedTxInHandler ¶
type ObservedTxInHandler struct {
// contains filtered or unexported fields
}
ObservedTxInHandler to handle MsgObservedTxIn
func NewObservedTxInHandler ¶
func NewObservedTxInHandler(mgr Manager) ObservedTxInHandler
NewObservedTxInHandler create a new instance of ObservedTxInHandler
type ObservedTxOutHandler ¶
type ObservedTxOutHandler struct {
// contains filtered or unexported fields
}
ObservedTxOutHandler process MsgObservedTxOut messages
func NewObservedTxOutHandler ¶
func NewObservedTxOutHandler(mgr Manager) ObservedTxOutHandler
NewObservedTxOutHandler create a new instance of ObservedTxOutHandler
type ObservedTxVoter ¶
type ObservedTxVoter = types.ObservedTxVoter
type ObservedTxVoters ¶
type ObservedTxVoters = types.ObservedTxVoters
type ObservedTxs ¶
type ObservedTxs = types.ObservedTxs
type ObserverManager ¶
type ObserverManager interface { BeginBlock() EndBlock(ctx cosmos.Context, keeper keeper.Keeper) AppendObserver(chain common.Chain, addrs []cosmos.AccAddress) List() []cosmos.AccAddress }
ObserverManager define the method to manage observes
func GetObserverManager ¶
func GetObserverManager(version semver.Version) (ObserverManager, error)
GetObserverManager return an instance that implements ObserverManager interface when there is no version can match the given semver , it will return nil
type ObserverMgrVCUR ¶
type ObserverMgrVCUR struct {
// contains filtered or unexported fields
}
ObserverMgrVCUR implement a ObserverManager which will store the observers in memory before written to chain
func (*ObserverMgrVCUR) AppendObserver ¶
func (om *ObserverMgrVCUR) AppendObserver(chain common.Chain, addrs []cosmos.AccAddress)
AppendObserver add the address
func (*ObserverMgrVCUR) BeginBlock ¶
func (om *ObserverMgrVCUR) BeginBlock()
BeginBlock called when a new block get proposed
func (*ObserverMgrVCUR) EndBlock ¶
func (om *ObserverMgrVCUR) EndBlock(ctx cosmos.Context, keeper keeper.Keeper)
EndBlock emit the observers
func (*ObserverMgrVCUR) List ¶
func (om *ObserverMgrVCUR) List() []cosmos.AccAddress
List - gets a list of addresses that have been observed in all chains
type OrderBookVCUR ¶
type OrderBookVCUR struct {
// contains filtered or unexported fields
}
OrderBookVCUR is going to manage the swaps queue
func (*OrderBookVCUR) AddOrderBookItem ¶
func (ob *OrderBookVCUR) AddOrderBookItem(ctx cosmos.Context, msg MsgSwap) error
func (*OrderBookVCUR) EndBlock ¶
func (ob *OrderBookVCUR) EndBlock(ctx cosmos.Context, mgr Manager) error
EndBlock trigger the real swap to be processed
func (*OrderBookVCUR) FetchQueue ¶
func (ob *OrderBookVCUR) FetchQueue(ctx cosmos.Context, mgr Manager, pairs tradePairs, pools Pools) (orderItems, error)
FetchQueue - grabs all swap queue items from the kvstore and returns them
type OutAssetGas ¶
type OutAssetGas struct {
// contains filtered or unexported fields
}
type OutboundMemo ¶
type OutboundMemo = mem.OutboundMemo
type OutboundTxHandler ¶
type OutboundTxHandler struct {
// contains filtered or unexported fields
}
func NewOutboundTxHandler ¶
func NewOutboundTxHandler(mgr Manager) OutboundTxHandler
type PoolManager ¶
PoolManager interface define the contract of PoolManager
func GetPoolManager ¶
func GetPoolManager(version semver.Version) (PoolManager, error)
GetPoolManager return an implementation of PoolManager
type PoolMgrVCUR ¶
type PoolMgrVCUR struct{}
type ProposeUpgradeHandler ¶
type ProposeUpgradeHandler struct {
// contains filtered or unexported fields
}
ProposeUpgradeHandler is to handle the ProposeUpgrade message
func NewProposeUpgradeHandler ¶
func NewProposeUpgradeHandler(mgr Manager) ProposeUpgradeHandler
NewProposeUpgradeHandler create new instance of ProposeUpgradeHandler
type ProtoInt64 ¶
type ProtoInt64 = types.ProtoInt64
type ProtocolOwnedLiquidity ¶
type ProtocolOwnedLiquidity = types.ProtocolOwnedLiquidity
type RUNEProvider ¶
type RUNEProvider = types.RUNEProvider
type RagnarokHandler ¶
type RagnarokHandler struct {
// contains filtered or unexported fields
}
RagnarokHandler process MsgRagnarok
func NewRagnarokHandler ¶
func NewRagnarokHandler(mgr Manager) RagnarokHandler
NewRagnarokHandler create a new instance of RagnarokHandler
type RagnarokMemo ¶
type RagnarokMemo = mem.RagnarokMemo
type RagnarokWithdrawPosition ¶
type RagnarokWithdrawPosition = types.RagnarokWithdrawPosition
type RefundHandler ¶
type RefundHandler struct {
// contains filtered or unexported fields
}
RefundHandler a handle to process tx that had refund memo usually this type or tx is because Thorchain fail to process the tx, which result in a refund, signer honour the tx and refund customer accordingly
func NewRefundHandler ¶
func NewRefundHandler(mgr Manager) RefundHandler
NewRefundHandler create a new refund handler
type RefundMemo ¶
type RefundMemo = mem.RefundMemo
type RejectUpgradeHandler ¶
type RejectUpgradeHandler struct {
// contains filtered or unexported fields
}
RejectUpgradeHandler is to handle the RejectUpgrade message
func NewRejectUpgradeHandler ¶
func NewRejectUpgradeHandler(mgr Manager) RejectUpgradeHandler
NewRejectUpgradeHandler create new instance of RejectUpgradeHandler
type ReserveContributor ¶
type ReserveContributor = types.ReserveContributor
type ReserveContributorHandler ¶
type ReserveContributorHandler struct {
// contains filtered or unexported fields
}
ReserveContributorHandler is handler to process MsgReserveContributor
func NewReserveContributorHandler ¶
func NewReserveContributorHandler(mgr Manager) ReserveContributorHandler
NewReserveContributorHandler create a new instance of ReserveContributorHandler
type ReserveContributors ¶
type ReserveContributors = types.ReserveContributors
type ReserveMemo ¶
type ReserveMemo = mem.ReserveMemo
type RouterUpgradeController ¶
type RouterUpgradeController struct {
// contains filtered or unexported fields
}
func NewRouterUpgradeController ¶
func NewRouterUpgradeController(mgr Manager) *RouterUpgradeController
NewRouterUpgradeController create a new instance of RouterUpgradeController
func (*RouterUpgradeController) Process ¶
func (r *RouterUpgradeController) Process(ctx cosmos.Context)
Process is the main entry of router upgrade controller refunds all USDT liquidity, and then upgrades contract all these steps are controlled by mimir
type RunePoolDepositHandler ¶
type RunePoolDepositHandler struct {
// contains filtered or unexported fields
}
RunePoolDepositHandler a handler to process deposits to RunePool
func NewRunePoolDepositHandler ¶
func NewRunePoolDepositHandler(mgr Manager) RunePoolDepositHandler
NewRunePoolDepositHandler create new RunePoolDepositHandler
type RunePoolDepositMemo ¶
type RunePoolDepositMemo = mem.RunePoolDepositMemo
type RunePoolWithdrawHandler ¶
type RunePoolWithdrawHandler struct {
// contains filtered or unexported fields
}
RunePoolWithdrawHandler a handler to process withdrawals from RunePool
func NewRunePoolWithdrawHandler ¶
func NewRunePoolWithdrawHandler(mgr Manager) RunePoolWithdrawHandler
NewRunePoolWithdrawHandler create new RunePoolWithdrawHandler
type RunePoolWithdrawMemo ¶
type RunePoolWithdrawMemo = mem.RunePoolWithdrawMemo
type SetNodeKeysHandler ¶
type SetNodeKeysHandler struct {
// contains filtered or unexported fields
}
SetNodeKeysHandler process MsgSetNodeKeys MsgSetNodeKeys is used by operators after the node account had been white list , to update the consensus pubkey and node account pubkey
func NewSetNodeKeysHandler ¶
func NewSetNodeKeysHandler(mgr Manager) SetNodeKeysHandler
NewSetNodeKeysHandler create a new instance of SetNodeKeysHandler
type Slasher ¶
type Slasher interface { BeginBlock(ctx cosmos.Context, req abci.RequestBeginBlock, constAccessor constants.ConstantValues) LackSigning(ctx cosmos.Context, mgr Manager) error SlashVault(ctx cosmos.Context, vaultPK common.PubKey, coins common.Coins, mgr Manager) error IncSlashPoints(ctx cosmos.Context, point int64, addresses ...cosmos.AccAddress) DecSlashPoints(ctx cosmos.Context, point int64, addresses ...cosmos.AccAddress) }
Slasher define all the method to perform slash
func GetSlasher ¶
func GetSlasher(version semver.Version, keeper keeper.Keeper, eventMgr EventManager) (Slasher, error)
GetSlasher return an implementation of Slasher
type SlasherVCUR ¶
type SlasherVCUR struct {
// contains filtered or unexported fields
}
SlasherVCUR is VCUR implementation of slasher
func (*SlasherVCUR) BeginBlock ¶
func (s *SlasherVCUR) BeginBlock(ctx cosmos.Context, req abci.RequestBeginBlock, constAccessor constants.ConstantValues)
BeginBlock called when a new block get proposed to detect whether there are duplicate vote
func (*SlasherVCUR) DecSlashPoints ¶
func (s *SlasherVCUR) DecSlashPoints(ctx cosmos.Context, point int64, addresses ...cosmos.AccAddress)
DecSlashPoints will decrease the given account's slash points
func (*SlasherVCUR) HandleDoubleSign ¶
func (s *SlasherVCUR) HandleDoubleSign(ctx cosmos.Context, addr crypto.Address, infractionHeight int64, constAccessor constants.ConstantValues, validatorAddresses []nodeAddressValidatorAddressPair) error
HandleDoubleSign - slashes a validator for signing two blocks at the same block height https://blog.cosmos.network/consensus-compare-casper-vs-tendermint-6df154ad56ae
func (*SlasherVCUR) HandleMissingSign ¶
func (s *SlasherVCUR) HandleMissingSign(ctx cosmos.Context, addr crypto.Address, constAccessor constants.ConstantValues, validatorAddresses []nodeAddressValidatorAddressPair) error
HandleMissingSign - slashes a validator for not signing a block
func (*SlasherVCUR) IncSlashPoints ¶
func (s *SlasherVCUR) IncSlashPoints(ctx cosmos.Context, point int64, addresses ...cosmos.AccAddress)
IncSlashPoints will increase the given account's slash points
func (*SlasherVCUR) LackSigning ¶
func (s *SlasherVCUR) LackSigning(ctx cosmos.Context, mgr Manager) error
LackSigning slash account that fail to sign tx
func (*SlasherVCUR) SlashVault ¶
func (s *SlasherVCUR) SlashVault(ctx cosmos.Context, vaultPK common.PubKey, coins common.Coins, mgr Manager) error
SlashVault thorchain keep monitoring the outbound tx from asgard pool usually the txout is triggered by thorchain itself by adding an item into the txout array, refer to TxOutItem for the detail, the TxOutItem contains a specific coin and amount. if somehow thorchain discover signer send out fund more than the amount specified in TxOutItem, it will slash the node account who does that by taking 1.5 * extra fund from node account's bond and subsidise the pool that actually lost it.
type SolvencyHandler ¶
type SolvencyHandler struct {
// contains filtered or unexported fields
}
SolvencyHandler is to process MsgSolvency message from bifrost Bifrost constantly monitor the account balance , and report to THORNode If it detect that wallet is short of fund , much less than vault, the network should automatically halt trading
func NewSolvencyHandler ¶
func NewSolvencyHandler(mgr Manager) SolvencyHandler
NewSolvencyHandler create a new instance of solvency handler
type StoreManager ¶
StoreManager define the method as the entry point for store upgrade
type StoreMgr ¶
type StoreMgr struct {
// contains filtered or unexported fields
}
StoreMgr implement StoreManager interface
type StreamingSwap ¶
type StreamingSwap = types.StreamingSwap
type StreamingSwaps ¶
type StreamingSwaps = types.StreamingSwaps
type SwapHandler ¶
type SwapHandler struct {
// contains filtered or unexported fields
}
SwapHandler is the handler to process swap request
func NewSwapHandler ¶
func NewSwapHandler(mgr Manager) SwapHandler
NewSwapHandler create a new instance of swap handler
type SwapQueueVCUR ¶
type SwapQueueVCUR struct {
// contains filtered or unexported fields
}
SwapQueueVCUR is going to manage the swaps queue
func (*SwapQueueVCUR) EndBlock ¶
func (vm *SwapQueueVCUR) EndBlock(ctx cosmos.Context, mgr Manager) error
EndBlock trigger the real swap to be processed
func (*SwapQueueVCUR) FetchQueue ¶
func (vm *SwapQueueVCUR) FetchQueue(ctx cosmos.Context) (swapItems, error)
FetchQueue - grabs all swap queue items from the kvstore and returns them
type Swapper ¶
type Swapper interface { Swap(ctx cosmos.Context, keeper keeper.Keeper, tx common.Tx, target common.Asset, destination common.Address, swapTarget cosmos.Uint, dexAgg string, dexAggTargetAsset string, dexAggLimit *cosmos.Uint, swp StreamingSwap, synthVirtualDepthMult int64, mgr Manager, ) (cosmos.Uint, []*EventSwap, error) CalcAssetEmission(X, x, Y cosmos.Uint) cosmos.Uint CalcLiquidityFee(X, x, Y cosmos.Uint) cosmos.Uint CalcSwapSlip(Xi, xi cosmos.Uint) cosmos.Uint GetSwapCalc(X, x, Y, slipBps, minSlipBps cosmos.Uint) (emitAssets, liquidityFee, slip cosmos.Uint) }
Though Swapper is not a full manager, it is recorded here for versioning convenience.
type SwapperClout ¶
type SwapperClout = types.SwapperClout
type SwapperV134 ¶
type SwapperV134 struct{}
func (*SwapperV134) CalcAssetEmission ¶
func (s *SwapperV134) CalcAssetEmission(X, x, Y cosmos.Uint) cosmos.Uint
calculate the number of assets sent to the address (includes liquidity fee) nolint
func (*SwapperV134) CalcLiquidityFee ¶
func (s *SwapperV134) CalcLiquidityFee(X, x, Y cosmos.Uint) cosmos.Uint
CalculateLiquidityFee the fee of the swap nolint
func (*SwapperV134) CalcMaxAssetEmission ¶
func (s *SwapperV134) CalcMaxAssetEmission(X, x, Y, fee cosmos.Uint) cosmos.Uint
calculate the asset amount to be sent to address using a predefined fee (fee calculated using artificial floor) nolint
func (*SwapperV134) CalcMinLiquidityFee ¶
func (s *SwapperV134) CalcMinLiquidityFee(X, x, Y, minSlipBps cosmos.Uint) cosmos.Uint
CalcMinLiquidityFee calculates the fee of the swap using min artificial slip floor nolint
func (*SwapperV134) CalcSwapSlip ¶
func (s *SwapperV134) CalcSwapSlip(Xi, xi cosmos.Uint) cosmos.Uint
CalcSwapSlip - calculate the swap slip, expressed in basis points (10000) nolint
func (*SwapperV134) GetSwapCalc ¶
func (s *SwapperV134) GetSwapCalc(X, x, Y, slipBps, minSlipBps cosmos.Uint) (emitAssets, liquidityFee, slip cosmos.Uint)
GetSwapCalc returns emission, liquidity fee and slip for a swap nolint
func (*SwapperV134) MinSlipBps ¶
func (s *SwapperV134) MinSlipBps( ctx cosmos.Context, k keeper.Keeper, isSynth bool, isTradeAccount bool, ) cosmos.Uint
MinSlipBps returns artificial slip floor, expressed in basis points (10000)
func (*SwapperV134) Swap ¶
func (s *SwapperV134) Swap(ctx cosmos.Context, keeper keeper.Keeper, tx common.Tx, target common.Asset, destination common.Address, swapTarget cosmos.Uint, dexAgg string, dexAggTargetAsset string, dexAggLimit *cosmos.Uint, swp StreamingSwap, synthVirtualDepthMult int64, mgr Manager, ) (cosmos.Uint, []*EventSwap, error)
type SwapperVCUR ¶
type SwapperVCUR struct{}
func (*SwapperVCUR) CalcAssetEmission ¶
func (s *SwapperVCUR) CalcAssetEmission(X, x, Y cosmos.Uint) cosmos.Uint
calculate the number of assets sent to the address (includes liquidity fee) nolint
func (*SwapperVCUR) CalcLiquidityFee ¶
func (s *SwapperVCUR) CalcLiquidityFee(X, x, Y cosmos.Uint) cosmos.Uint
CalculateLiquidityFee the fee of the swap nolint
func (*SwapperVCUR) CalcMaxAssetEmission ¶
func (s *SwapperVCUR) CalcMaxAssetEmission(X, x, Y, fee cosmos.Uint) cosmos.Uint
calculate the asset amount to be sent to address using a predefined fee (fee calculated using artificial floor) nolint
func (*SwapperVCUR) CalcMinLiquidityFee ¶
func (s *SwapperVCUR) CalcMinLiquidityFee(X, x, Y, minSlipBps cosmos.Uint) cosmos.Uint
CalcMinLiquidityFee calculates the fee of the swap using min artificial slip floor nolint
func (*SwapperVCUR) CalcSwapSlip ¶
func (s *SwapperVCUR) CalcSwapSlip(Xi, xi cosmos.Uint) cosmos.Uint
CalcSwapSlip - calculate the swap slip, expressed in basis points (10000) nolint
func (*SwapperVCUR) GetSwapCalc ¶
func (s *SwapperVCUR) GetSwapCalc(X, x, Y, slipBps, minSlipBps cosmos.Uint) (emitAssets, liquidityFee, slip cosmos.Uint)
GetSwapCalc returns emission, liquidity fee and slip for a swap nolint
func (*SwapperVCUR) Swap ¶
func (s *SwapperVCUR) Swap(ctx cosmos.Context, keeper keeper.Keeper, tx common.Tx, target common.Asset, destination common.Address, swapTarget cosmos.Uint, dexAgg string, dexAggTargetAsset string, dexAggLimit *cosmos.Uint, swp StreamingSwap, synthVirtualDepthMult int64, mgr Manager, ) (cosmos.Uint, []*EventSwap, error)
type THORNameAlias ¶
type THORNameAlias = types.THORNameAlias
type TradeAccount ¶
type TradeAccount = types.TradeAccount
type TradeAccountDepositHandler ¶
type TradeAccountDepositHandler struct {
// contains filtered or unexported fields
}
TradeAccountDepositHandler is handler to process MsgTradeAccountDeposit
func NewTradeAccountDepositHandler ¶
func NewTradeAccountDepositHandler(mgr Manager) TradeAccountDepositHandler
NewTradeAccountDepositHandler create a new instance of TradeAccountDepositHandler
type TradeAccountDepositMemo ¶
type TradeAccountDepositMemo = mem.TradeAccountDepositMemo
type TradeAccountManager ¶
type TradeAccountManager interface { EndBlock(ctx cosmos.Context, keeper keeper.Keeper) error Deposit(_ cosmos.Context, _ common.Asset, amount cosmos.Uint, owner cosmos.AccAddress, assetAddr common.Address, _ common.TxID) (cosmos.Uint, error) Withdrawal(_ cosmos.Context, _ common.Asset, amount cosmos.Uint, owner cosmos.AccAddress, assetAddr common.Address, _ common.TxID) (cosmos.Uint, error) BalanceOf(_ cosmos.Context, _ common.Asset, owner cosmos.AccAddress) cosmos.Uint }
func GetTradeAccountManager ¶
func GetTradeAccountManager(version semver.Version, keeper keeper.Keeper, eventMgr EventManager) (TradeAccountManager, error)
type TradeAccountWithdrawalHandler ¶
type TradeAccountWithdrawalHandler struct {
// contains filtered or unexported fields
}
TradeAccountWithdrawalHandler is handler to process MsgTradeAccountWithdrawal
func NewTradeAccountWithdrawalHandler ¶
func NewTradeAccountWithdrawalHandler(mgr Manager) TradeAccountWithdrawalHandler
NewTradeAccountWithdrawalHandler create a new instance of TradeAccountWithdrawalHandler
type TradeAccountWithdrawalMemo ¶
type TradeAccountWithdrawalMemo = mem.TradeAccountWithdrawalMemo
type TradeMgrVCUR ¶
type TradeMgrVCUR struct {
// contains filtered or unexported fields
}
TradeMgrVCUR is VCUR implementation of slasher
func (*TradeMgrVCUR) BalanceOf ¶
func (s *TradeMgrVCUR) BalanceOf(ctx cosmos.Context, asset common.Asset, addr cosmos.AccAddress) cosmos.Uint
type TssHandler ¶
type TssHandler = BaseHandler[*MsgTssPool]
type TssKeysignFailVoter ¶
type TssKeysignFailVoter = types.TssKeysignFailVoter
type TssKeysignHandler ¶
type TssKeysignHandler struct {
// contains filtered or unexported fields
}
TssKeysignHandler is design to process MsgTssKeysignFail
func NewTssKeysignHandler ¶
func NewTssKeysignHandler(mgr Manager) TssKeysignHandler
NewTssKeysignHandler create a new instance of TssKeysignHandler when a signer fail to join tss keysign , thorchain need to slash the node account
type TxOutStorageVCUR ¶
type TxOutStorageVCUR struct {
// contains filtered or unexported fields
}
TxOutStorageVCUR is going to manage all the outgoing tx
func (*TxOutStorageVCUR) CalcTxOutHeight ¶
func (*TxOutStorageVCUR) ClearOutboundItems ¶
func (tos *TxOutStorageVCUR) ClearOutboundItems(ctx cosmos.Context)
ClearOutboundItems remove all the tx out items , mostly used for test
func (*TxOutStorageVCUR) DiscoverOutbounds ¶
func (*TxOutStorageVCUR) EndBlock ¶
func (tos *TxOutStorageVCUR) EndBlock(ctx cosmos.Context, mgr Manager) error
func (*TxOutStorageVCUR) GetBlockOut ¶
func (tos *TxOutStorageVCUR) GetBlockOut(ctx cosmos.Context) (*TxOut, error)
GetBlockOut read the TxOut from kv store
func (*TxOutStorageVCUR) GetOutboundItemByToAddress ¶
func (tos *TxOutStorageVCUR) GetOutboundItemByToAddress(ctx cosmos.Context, to common.Address) []TxOutItem
GetOutboundItemByToAddress read all the outbound items filter by the given to address
func (*TxOutStorageVCUR) GetOutboundItems ¶
func (tos *TxOutStorageVCUR) GetOutboundItems(ctx cosmos.Context) ([]TxOutItem, error)
GetOutboundItems read all the outbound item from kv store
func (*TxOutStorageVCUR) TryAddTxOutItem ¶
func (tos *TxOutStorageVCUR) TryAddTxOutItem(ctx cosmos.Context, mgr Manager, toi TxOutItem, minOut cosmos.Uint) (bool, error)
When TryAddTxOutItem returns an error, there should be no state changes from it, including funds movements or fee events from prepareTxOutItem. So, use CacheContext to only commit state changes when cachedTryAddTxOutItem doesn't return an error.
func (*TxOutStorageVCUR) UnSafeAddTxOutItem ¶
func (tos *TxOutStorageVCUR) UnSafeAddTxOutItem(ctx cosmos.Context, mgr Manager, toi TxOutItem, height int64) error
UnSafeAddTxOutItem - blindly adds a tx out, skipping vault selection, transaction fee deduction, etc
type TxOutStore ¶
type TxOutStore interface { EndBlock(ctx cosmos.Context, mgr Manager) error GetBlockOut(ctx cosmos.Context) (*TxOut, error) ClearOutboundItems(ctx cosmos.Context) GetOutboundItems(ctx cosmos.Context) ([]TxOutItem, error) TryAddTxOutItem(ctx cosmos.Context, mgr Manager, toi TxOutItem, minOut cosmos.Uint) (bool, error) UnSafeAddTxOutItem(ctx cosmos.Context, mgr Manager, toi TxOutItem, height int64) error GetOutboundItemByToAddress(cosmos.Context, common.Address) []TxOutItem CalcTxOutHeight(cosmos.Context, semver.Version, TxOutItem) (int64, cosmos.Uint, error) DiscoverOutbounds(ctx cosmos.Context, transactionFeeAsset cosmos.Uint, maxGasAsset common.Coin, toi TxOutItem, vaults Vaults) ([]TxOutItem, cosmos.Uint) }
TxOutStore define the method required for TxOutStore
func GetTxOutStore ¶
func GetTxOutStore(version semver.Version, keeper keeper.Keeper, eventMgr EventManager, gasManager GasManager) (TxOutStore, error)
GetTxOutStore will return an implementation of the txout store that
type TypedHandler ¶
type TypedHandler[M cosmos.Msg] interface { MsgHandler // contains filtered or unexported methods }
type UnBondHandler ¶
type UnBondHandler struct {
// contains filtered or unexported fields
}
UnBondHandler a handler to process unbond request
func NewUnBondHandler ¶
func NewUnBondHandler(mgr Manager) UnBondHandler
NewUnBondHandler create new UnBondHandler
type UnbondMemo ¶
type UnbondMemo = mem.UnbondMemo
type ValidatorManager ¶
type ValidatorManager interface { BeginBlock(ctx cosmos.Context, mgr Manager, existingValidators []string) error EndBlock(ctx cosmos.Context, mgr Manager) []abci.ValidatorUpdate NodeAccountPreflightCheck(ctx cosmos.Context, na NodeAccount, constAccessor constants.ConstantValues) (NodeStatus, error) // contains filtered or unexported methods }
ValidatorManager define the method to manage validators
func GetValidatorManager ¶
func GetValidatorManager(version semver.Version, keeper keeper.Keeper, networkMgr NetworkManager, txOutStore TxOutStore, eventMgr EventManager) (ValidatorManager, error)
GetValidatorManager create a new instance of Validator Manager
type ValidatorMgrVCUR ¶
type ValidatorMgrVCUR struct {
// contains filtered or unexported fields
}
ValidatorMgrVCUR is to manage a list of validators , and rotate them
func (*ValidatorMgrVCUR) BeginBlock ¶
func (vm *ValidatorMgrVCUR) BeginBlock(ctx cosmos.Context, mgr Manager, existingValidators []string) error
BeginBlock when block begin
func (*ValidatorMgrVCUR) EndBlock ¶
func (vm *ValidatorMgrVCUR) EndBlock(ctx cosmos.Context, mgr Manager) []abci.ValidatorUpdate
EndBlock when block commit
func (*ValidatorMgrVCUR) NodeAccountPreflightCheck ¶
func (vm *ValidatorMgrVCUR) NodeAccountPreflightCheck(ctx cosmos.Context, na NodeAccount, _ constants.ConstantValues) (NodeStatus, error)
NodeAccountPreflightCheck preflight check to find out what the node account's next status will be
type VaultStatus ¶
type VaultStatus = types.VaultStatus
type VersionHandler ¶
type VersionHandler struct {
// contains filtered or unexported fields
}
VersionHandler is to handle Version message
func NewVersionHandler ¶
func NewVersionHandler(mgr Manager) VersionHandler
NewVersionHandler create new instance of VersionHandler
type WithdrawLiquidityHandler ¶
type WithdrawLiquidityHandler struct {
// contains filtered or unexported fields
}
WithdrawLiquidityHandler to process withdraw requests
func NewWithdrawLiquidityHandler ¶
func NewWithdrawLiquidityHandler(mgr Manager) WithdrawLiquidityHandler
NewWithdrawLiquidityHandler create a new instance of WithdrawLiquidityHandler to process withdraw request
type WithdrawLiquidityMemo ¶
type WithdrawLiquidityMemo = mem.WithdrawLiquidityMemo
Source Files ¶
- alias.go
- ante.go
- basehandler.go
- errors.go
- genesis.go
- genesis.pb.go
- genesis_mainnet.go
- handler.go
- handler_add_liquidity.go
- handler_ban.go
- handler_bond.go
- handler_common_outbound.go
- handler_consolidate.go
- handler_deposit.go
- handler_deposit_archive.go
- handler_donate.go
- handler_errata_tx.go
- handler_ip_address.go
- handler_leave.go
- handler_leave_archive.go
- handler_loan_open.go
- handler_loan_repayment.go
- handler_manage_thorname.go
- handler_migrate.go
- handler_mimir.go
- handler_network_fee.go
- handler_node_pause_chain.go
- handler_noop.go
- handler_observed_txin.go
- handler_observed_txin_archive.go
- handler_observed_txout.go
- handler_outbound_tx.go
- handler_ragnarok.go
- handler_refund.go
- handler_reserve_contrib.go
- handler_rune_pool_deposit.go
- handler_rune_pool_withdraw.go
- handler_send.go
- handler_set_node_keys.go
- handler_solvency.go
- handler_swap.go
- handler_swap_archive.go
- handler_trade_account_deposit.go
- handler_trade_account_withdrawal.go
- handler_tss.go
- handler_tss_archive.go
- handler_tss_keysign.go
- handler_unbond.go
- handler_upgrade.go
- handler_version.go
- handler_withdraw.go
- helpers.go
- helpers_affiliates.go
- helpers_affiliates_archive.go
- helpers_archive.go
- ladder.go
- manager_event_current.go
- manager_gas.go
- manager_gas_current.go
- manager_network.go
- manager_network_current.go
- manager_network_v134.go
- manager_network_v136.go
- manager_observer_current.go
- manager_orderbook_current.go
- manager_pool_current.go
- manager_slasher.go
- manager_slasher_current.go
- manager_store.go
- manager_store_common.go
- manager_store_mainnet.go
- manager_swap_queue.go
- manager_swap_queue_current.go
- manager_trade_account_current.go
- manager_txout_current.go
- manager_validator.go
- manager_validator_current.go
- managers.go
- mimir_accesscontrols.go
- mimir_address.go
- mimir_helpers.go
- module.go
- querier.go
- querier_quotes.go
- router_upgrade_controller.go
- router_upgrade_info.go
- swap_current.go
- swap_v134.go
- withdraw.go
- withdraw_archive.go