keeperv1

package
v1.137.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName             = types.ModuleName
	ReserveName            = types.ReserveName
	AsgardName             = types.AsgardName
	AffiliateCollectorName = types.AffiliateCollectorName
	TreasuryName           = types.TreasuryName
	RUNEPoolName           = types.RUNEPoolName
	BondName               = types.BondName
	LendingName            = types.LendingName
	StoreKey               = types.StoreKey

	// Vaults
	AsgardVault   = types.VaultType_AsgardVault
	ActiveVault   = types.VaultStatus_ActiveVault
	InitVault     = types.VaultStatus_InitVault
	RetiringVault = types.VaultStatus_RetiringVault
	InactiveVault = types.VaultStatus_InactiveVault

	// Node status
	NodeActive  = types.NodeStatus_Active
	NodeStandby = types.NodeStatus_Standby
	NodeUnknown = types.NodeStatus_Unknown

	// Node type
	NodeTypeUnknown   = types.NodeType_TypeUnknown
	NodeTypeValidator = types.NodeType_TypeValidator
	NodeTypeVault     = types.NodeType_TypeVault

	// Mint/Burn type
	MintSupplyType = types.MintBurnSupplyType_mint
	BurnSupplyType = types.MintBurnSupplyType_burn

	// Bond type
	AsgardKeygen = types.KeygenType_AsgardKeygen
	BondCost     = types.BondType_bond_cost
)

Variables

View Source
var (
	NewPool                    = types.NewPool
	NewJail                    = types.NewJail
	NewLoan                    = types.NewLoan
	NewStreamingSwap           = types.NewStreamingSwap
	NewNetwork                 = types.NewNetwork
	NewProtocolOwnedLiquidity  = types.NewProtocolOwnedLiquidity
	NewRUNEPool                = types.NewRUNEPool
	NewObservedTx              = types.NewObservedTx
	NewTssVoter                = types.NewTssVoter
	NewBanVoter                = types.NewBanVoter
	NewErrataTxVoter           = types.NewErrataTxVoter
	NewObservedTxVoter         = types.NewObservedTxVoter
	NewKeygen                  = types.NewKeygen
	NewKeygenBlock             = types.NewKeygenBlock
	NewTxOut                   = types.NewTxOut
	HasSuperMajority           = types.HasSuperMajority
	RegisterCodec              = types.RegisterCodec
	NewTradeAccount            = types.NewTradeAccount
	NewTradeUnit               = types.NewTradeUnit
	NewRUNEProvider            = types.NewRUNEProvider
	NewNodeAccount             = types.NewNodeAccount
	NewBondProviders           = types.NewBondProviders
	NewBondProvider            = types.NewBondProvider
	NewVault                   = types.NewVault
	NewReserveContributor      = types.NewReserveContributor
	NewTHORName                = types.NewTHORName
	NewEventBond               = types.NewEventBond
	NewEventMintBurn           = types.NewEventMintBurn
	GetRandomTx                = types.GetRandomTx
	GetRandomValidatorNode     = types.GetRandomValidatorNode
	GetRandomVaultNode         = types.GetRandomVaultNode
	GetRandomBTCAddress        = types.GetRandomBTCAddress
	GetRandomETHAddress        = types.GetRandomETHAddress
	GetRandomBCHAddress        = types.GetRandomBCHAddress
	GetRandomRUNEAddress       = types.GetRandomRUNEAddress
	GetRandomTHORAddress       = types.GetRandomTHORAddress
	GetRandomTxHash            = types.GetRandomTxHash
	GetRandomBech32Addr        = types.GetRandomBech32Addr
	GetRandomPubKey            = types.GetRandomPubKey
	GetRandomPubKeySet         = types.GetRandomPubKeySet
	GetCurrentVersion          = types.GetCurrentVersion
	NewObservedNetworkFeeVoter = types.NewObservedNetworkFeeVoter
	NewNetworkFee              = types.NewNetworkFee
	NewTssKeysignFailVoter     = types.NewTssKeysignFailVoter
	SetupConfigForTest         = types.SetupConfigForTest
	NewChainContract           = types.NewChainContract
	NewSwapperClout            = types.NewSwapperClout
)

Functions

func AffilliateCollectorInvariant

func AffilliateCollectorInvariant(k KVStore) common.Invariant

AffilliateCollectorInvariant the affiliate_collector module backs accrued affiliate rewards

func AsgardInvariant

func AsgardInvariant(k KVStore) common.Invariant

AsgardInvariant the asgard module backs pool rune, savers synths, and native coins in queued swaps

func BondInvariant

func BondInvariant(k KVStore) common.Invariant

BondInvariant the bond module backs node bond and pending reward bond

func LendingInvariant

func LendingInvariant(k KVStore) common.Invariant

LendingInvariant ensures stored total collateral value matches the sum of collateral for all loans and the module balances match the totals

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, coinKeeper bankkeeper.Keeper, accountKeeper authkeeper.AccountKeeper, upgradeKeeper upgradekeeper.Keeper, storeKey cosmos.StoreKey) keeper.Keeper

NewKeeper creates new instances of the thorchain Keeper

func PoolsInvariant

func PoolsInvariant(k KVStore) common.Invariant

PoolsInvariant pool units and pending rune/asset should match the sum of units and pending rune/asset for all lps

func RUNEPoolInvariant

func RUNEPoolInvariant(k KVStore) common.Invariant

RUNEPoolInvariant asserts that the RUNEPool units and provider units are consistent.

func StreamingSwapsInvariant

func StreamingSwapsInvariant(k KVStore) common.Invariant

StreamingSwapsInvariant every streaming swap should have a corresponding queued swap, stream deposit should equal the queued swap's source coin, and the stream should be internally consistent

func THORChainInvariant

func THORChainInvariant(k KVStore) common.Invariant

THORChainInvariant the thorchain module should never hold a balance

func VotePrefix

func VotePrefix(name string) string

Types

type AffiliateFeeCollector

type AffiliateFeeCollector = types.AffiliateFeeCollector

type BanVoter

type BanVoter = types.BanVoter

type BondProvider

type BondProvider = types.BondProvider

type BondProviders

type BondProviders = types.BondProviders

type ChainContract

type ChainContract = types.ChainContract

type ErrataTxVoter

type ErrataTxVoter = types.ErrataTxVoter

type Jail

type Jail = types.Jail

type KVStore

type KVStore struct {
	// contains filtered or unexported fields
}

KVStore Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine

func NewKVStore

func NewKVStore(cdc codec.BinaryCodec, coinKeeper bankkeeper.Keeper, accountKeeper authkeeper.AccountKeeper, upgradeKeeper upgradekeeper.Keeper, storeKey cosmos.StoreKey, version semver.Version) KVStore

NewKVStore creates new instances of the thorchain Keeper

func (KVStore) AddBondFeeToReserve

func (k KVStore) AddBondFeeToReserve(ctx cosmos.Context, fee cosmos.Uint) error

AddBondFeeToReserve add fee to reserve, the fee is always in RUNE

func (KVStore) AddCoins

func (k KVStore) AddCoins(ctx cosmos.Context, addr cosmos.AccAddress, coins cosmos.Coins) error

func (KVStore) AddObservingAddresses

func (k KVStore) AddObservingAddresses(ctx cosmos.Context, inAddresses []cosmos.AccAddress) error

AddObservingAddresses - add a list of addresses that have been helpful in getting enough observations to process an inbound tx.

func (KVStore) AddPoolFeeToReserve

func (k KVStore) AddPoolFeeToReserve(ctx cosmos.Context, fee cosmos.Uint) error

AddPoolFeeToReserve add fee to reserve, the fee is always in RUNE

func (KVStore) AddToLiquidityFees

func (k KVStore) AddToLiquidityFees(ctx cosmos.Context, asset common.Asset, fee cosmos.Uint) error

AddToLiquidityFees - measure of fees collected in each block

func (KVStore) AddToOutboundFeeSpentRune

func (k KVStore) AddToOutboundFeeSpentRune(ctx cosmos.Context, outAsset common.Asset, spent cosmos.Uint) error

AddToOutboundFeeSpentRune - add to record of RUNE spent by the Reserve for an Asset's outbounds' gas costs

func (KVStore) AddToOutboundFeeWithheldRune

func (k KVStore) AddToOutboundFeeWithheldRune(ctx cosmos.Context, outAsset common.Asset, withheld cosmos.Uint) error

AddToOutboundFeeWithheldRune - add to record of RUNE collected by the Reserve for an Asset's outbound fees

func (KVStore) AddToSwapSlip

func (k KVStore) AddToSwapSlip(ctx cosmos.Context, asset common.Asset, amt cosmos.Int) error

AddToSwapSlip - add swap slip to block

func (KVStore) AnchorMedian

func (k KVStore) AnchorMedian(ctx cosmos.Context, assets []common.Asset) cosmos.Uint

func (KVStore) AppendTxOut

func (k KVStore) AppendTxOut(ctx cosmos.Context, height int64, item TxOutItem) error

AppendTxOut - append the given item to txOut

func (KVStore) ApproveUpgrade

func (k KVStore) ApproveUpgrade(ctx cosmos.Context, addr cosmos.AccAddress, name string)

ApproveUpgrade approves an upgrade as a validator

func (KVStore) BurnFromModule

func (k KVStore) BurnFromModule(ctx cosmos.Context, module string, coin common.Coin) error

func (KVStore) Cdc

func (k KVStore) Cdc() codec.BinaryCodec

Cdc return the amino codec

func (KVStore) ClearObservingAddresses

func (k KVStore) ClearObservingAddresses(ctx cosmos.Context)

ClearObservingAddresses - clear all observing addresses

func (KVStore) ClearTxOut

func (k KVStore) ClearTxOut(ctx cosmos.Context, height int64) error

ClearTxOut - remove the txout of the given height from key value store

func (KVStore) ClearUpgradePlan

func (k KVStore) ClearUpgradePlan(ctx cosmos.Context)

ClearUpgradePlan proxies through to the upgrade keeper

func (KVStore) DecNodeAccountSlashPoints

func (k KVStore) DecNodeAccountSlashPoints(ctx cosmos.Context, addr cosmos.AccAddress, pts int64) error

DecNodeAccountSlashPoints - decrements the slash points associated with the given node address and uint

func (KVStore) DeductNativeTxFeeFromAccount

func (k KVStore) DeductNativeTxFeeFromAccount(ctx cosmos.Context, acctAddr cosmos.AccAddress) error

func (KVStore) DeductNativeTxFeeFromBond

func (k KVStore) DeductNativeTxFeeFromBond(ctx cosmos.Context, nodeAddr cosmos.AccAddress) error

func (KVStore) DeleteKey

func (k KVStore) DeleteKey(ctx cosmos.Context, key string)

func (KVStore) DeleteMimir

func (k KVStore) DeleteMimir(ctx cosmos.Context, key string) error

func (KVStore) DeleteNodeMimirs

func (k KVStore) DeleteNodeMimirs(ctx cosmos.Context, key string)

DeleteNodeMimirs deletes all node mimir votes for a given key

func (KVStore) DeletePoolRagnarokStart

func (k KVStore) DeletePoolRagnarokStart(ctx cosmos.Context, asset common.Asset)

DeletePoolRagnarokStart deletes the pool ragnarok start block height

func (KVStore) DeletePoolSwapSlip

func (k KVStore) DeletePoolSwapSlip(ctx cosmos.Context, height int64, asset common.Asset)

func (KVStore) DeleteTHORName

func (k KVStore) DeleteTHORName(ctx cosmos.Context, name string) error

DeleteTHORName remove the given THORName from data store

func (KVStore) DeleteVault

func (k KVStore) DeleteVault(ctx cosmos.Context, pubkey common.PubKey) error

DeleteVault remove the given vault from data store

func (KVStore) DollarConfigInRune

func (k KVStore) DollarConfigInRune(ctx cosmos.Context, value constants.ConstantName) cosmos.Uint

DollarConfigInRune returns the dollar denominated config value in RUNE. If the RUNE price feed returns zero, the USD value will be returned.

func (KVStore) DollarsPerRune

func (k KVStore) DollarsPerRune(ctx cosmos.Context) cosmos.Uint

DollarsPerRune gets in 1e8 terms the amount of USD that is equal to 1 RUNE (in other words, 1 RUNE's price in USD)

func (KVStore) EnsureNodeKeysUnique

func (k KVStore) EnsureNodeKeysUnique(ctx cosmos.Context, consensusPubKey string, pubKeys common.PubKeySet) error

EnsureNodeKeysUnique check the given consensus pubkey and pubkey set against all the the node account return an error when it is overlap with any existing account

func (KVStore) ForceSetLastChainHeight

func (k KVStore) ForceSetLastChainHeight(ctx cosmos.Context, chain common.Chain, height int64)

ForceSetLastChainHeight force sets the last chain height.

func (KVStore) ForceSetLastObserveHeight

func (k KVStore) ForceSetLastObserveHeight(ctx cosmos.Context, chain common.Chain, address cosmos.AccAddress, height int64)

ForceSetLastObserveHeight force sets the observe height.

func (KVStore) GetAccount

func (k KVStore) GetAccount(ctx cosmos.Context, addr cosmos.AccAddress) cosmos.Account

func (KVStore) GetAffiliateCollector

func (k KVStore) GetAffiliateCollector(ctx cosmos.Context, acc cosmos.AccAddress) (AffiliateFeeCollector, error)

func (KVStore) GetAffiliateCollectorIterator

func (k KVStore) GetAffiliateCollectorIterator(ctx cosmos.Context) cosmos.Iterator

func (KVStore) GetAffiliateCollectors

func (k KVStore) GetAffiliateCollectors(ctx cosmos.Context) ([]AffiliateFeeCollector, error)

func (KVStore) GetAnchors

func (k KVStore) GetAnchors(ctx cosmos.Context, asset common.Asset) []common.Asset

func (KVStore) GetAsgardVaults

func (k KVStore) GetAsgardVaults(ctx cosmos.Context) (Vaults, error)

GetAsgardVaults return all asgard vaults

func (KVStore) GetAsgardVaultsByStatus

func (k KVStore) GetAsgardVaultsByStatus(ctx cosmos.Context, status VaultStatus) (Vaults, error)

GetAsgardVaultsByStatus get all the asgard vault that have the given status

func (KVStore) GetBalance

func (k KVStore) GetBalance(ctx cosmos.Context, addr cosmos.AccAddress) cosmos.Coins

func (KVStore) GetBalanceOfModule

func (k KVStore) GetBalanceOfModule(ctx cosmos.Context, moduleName, denom string) cosmos.Uint

func (KVStore) GetBanVoter

func (k KVStore) GetBanVoter(ctx cosmos.Context, addr cosmos.AccAddress) (BanVoter, error)

GetBanVoter - gets information of ban voter

func (KVStore) GetBanVoterIterator

func (k KVStore) GetBanVoterIterator(ctx cosmos.Context) cosmos.Iterator

GetBanVoterIterator - get an iterator for ban voter

func (KVStore) GetBondProviders

func (k KVStore) GetBondProviders(ctx cosmos.Context, addr cosmos.AccAddress) (BondProviders, error)

GetBondProviders - gets bond providers for a node account

func (KVStore) GetChainContract

func (k KVStore) GetChainContract(ctx cosmos.Context, chain common.Chain) (ChainContract, error)

GetChainContract - gets chain contract

func (KVStore) GetChainContractIterator

func (k KVStore) GetChainContractIterator(ctx cosmos.Context) cosmos.Iterator

GetChainContractIterator - get an iterator for chain contract

func (KVStore) GetChainContracts

func (k KVStore) GetChainContracts(ctx cosmos.Context, chains common.Chains) []ChainContract

GetChainContracts return a list of chain contracts , which match the requested chains

func (KVStore) GetConfigInt64

func (k KVStore) GetConfigInt64(ctx cosmos.Context, key constants.ConstantName) int64

GetConfigInt64 returns the mimir value for the key if set, otherwise the constant value

func (KVStore) GetConstants

func (k KVStore) GetConstants() constants.ConstantValues

GetConstants returns the constant values

func (KVStore) GetCurrentRollup

func (k KVStore) GetCurrentRollup(ctx cosmos.Context, asset common.Asset) (int64, error)

func (KVStore) GetErrataTxVoter

func (k KVStore) GetErrataTxVoter(ctx cosmos.Context, txID common.TxID, chain common.Chain) (ErrataTxVoter, error)

GetErrataTxVoter - gets information of errata tx voter

func (KVStore) GetErrataTxVoterIterator

func (k KVStore) GetErrataTxVoterIterator(ctx cosmos.Context) cosmos.Iterator

GetErrataTxVoterIterator iterate errata tx voter

func (KVStore) GetKey

func (k KVStore) GetKey(prefix types.DbPrefix, key string) string

GetKey return a key that can be used to store into key value store

func (KVStore) GetKeygenBlock

func (k KVStore) GetKeygenBlock(ctx cosmos.Context, height int64) (KeygenBlock, error)

GetKeygenBlock from a given height

func (KVStore) GetKeygenBlockIterator

func (k KVStore) GetKeygenBlockIterator(ctx cosmos.Context) cosmos.Iterator

GetKeygenBlockIterator return an iterator

func (KVStore) GetLastChainHeight

func (k KVStore) GetLastChainHeight(ctx cosmos.Context, chain common.Chain) (int64, error)

GetLastChainHeight get last chain height

func (KVStore) GetLastChainHeights

func (k KVStore) GetLastChainHeights(ctx cosmos.Context) (map[common.Chain]int64, error)

GetLastChainHeights get the iterator for last chain height

func (KVStore) GetLastObserveHeight

func (k KVStore) GetLastObserveHeight(ctx cosmos.Context, address cosmos.AccAddress) (map[common.Chain]int64, error)

GetLastObserveHeight retrieve last observe height of a given node account from key value store

func (KVStore) GetLastSignedHeight

func (k KVStore) GetLastSignedHeight(ctx cosmos.Context) (int64, error)

GetLastSignedHeight get last signed height from key value store

func (KVStore) GetLatestTssKeysignMetric

func (k KVStore) GetLatestTssKeysignMetric(ctx cosmos.Context) (*TssKeysignMetric, error)

GetLatestTssKeysignMetric return the latest tss keysign metric

func (KVStore) GetLeastSecure

func (k KVStore) GetLeastSecure(ctx cosmos.Context, vaults Vaults, signingTransPeriod int64) Vault

GetLeastSecure with given list of vaults, find the vault that is least secure

func (KVStore) GetLiquidityProvider

func (k KVStore) GetLiquidityProvider(ctx cosmos.Context, asset common.Asset, addr common.Address) (LiquidityProvider, error)

GetLiquidityProvider retrieve liquidity provider from the data store

func (KVStore) GetLiquidityProviderIterator

func (k KVStore) GetLiquidityProviderIterator(ctx cosmos.Context, asset common.Asset) cosmos.Iterator

GetLiquidityProviderIterator iterate liquidity providers

func (KVStore) GetLoan

func (k KVStore) GetLoan(ctx cosmos.Context, asset common.Asset, addr common.Address) (Loan, error)

GetLoan retrieve loan from the data store

func (KVStore) GetLoanIterator

func (k KVStore) GetLoanIterator(ctx cosmos.Context, asset common.Asset) cosmos.Iterator

GetLoanIterator iterate loans

func (KVStore) GetLongRollup

func (k KVStore) GetLongRollup(ctx cosmos.Context, asset common.Asset) (int64, error)

func (KVStore) GetLowestActiveVersion

func (k KVStore) GetLowestActiveVersion(ctx cosmos.Context) semver.Version

GetLowestActiveVersion - get version number of lowest active node

func (KVStore) GetMimir

func (k KVStore) GetMimir(ctx cosmos.Context, key string) (int64, error)

GetMimir get a mimir value from key value store

func (KVStore) GetMimirIterator

func (k KVStore) GetMimirIterator(ctx cosmos.Context) cosmos.Iterator

GetMimirIterator iterate gas units

func (KVStore) GetMimirWithRef

func (k KVStore) GetMimirWithRef(ctx cosmos.Context, template, ref string) (int64, error)

GetMimirWithRef is a helper function to more readably insert references (such as Asset MimirString or Chain) into Mimir key templates.

func (KVStore) GetMinJoinLast

func (k KVStore) GetMinJoinLast(ctx cosmos.Context) (semver.Version, int64)

GetMinJoinLast returns the last stored MinJoinVersion and its last stored height, or else (at worse performance) the current MinJoinVersion and 0.

func (KVStore) GetMinJoinVersion

func (k KVStore) GetMinJoinVersion(ctx cosmos.Context) semver.Version

GetMinJoinVersion - get min version to join. Min version is the most popular version

func (KVStore) GetModuleAccAddress

func (k KVStore) GetModuleAccAddress(module string) cosmos.AccAddress

func (KVStore) GetModuleAddress

func (k KVStore) GetModuleAddress(module string) (common.Address, error)

func (KVStore) GetMostSecure

func (k KVStore) GetMostSecure(ctx cosmos.Context, vaults Vaults, signingTransPeriod int64) Vault

GetMostSecure with given list of vaults, find the vault that is most secure

func (KVStore) GetMostSecureStrict

func (k KVStore) GetMostSecureStrict(ctx cosmos.Context, vaults Vaults, signingTransPeriod int64) Vault

GetMostSecureStrict given list of vaults, find the most secure. if the most secure vault's bond is less than securityBps * the vault's asset value in rune, it is considered insecure and no vault is returned

func (KVStore) GetNativeTxFee

func (k KVStore) GetNativeTxFee(ctx cosmos.Context) cosmos.Uint

func (KVStore) GetNetwork

func (k KVStore) GetNetwork(ctx cosmos.Context) (Network, error)

GetNetwork retrieve network data from key value store

func (KVStore) GetNetworkFee

func (k KVStore) GetNetworkFee(ctx cosmos.Context, chain common.Chain) (NetworkFee, error)

GetNetworkFee get the network fee of the given chain from kv store , if it doesn't exist , it will create an empty one

func (KVStore) GetNetworkFeeIterator

func (k KVStore) GetNetworkFeeIterator(ctx cosmos.Context) cosmos.Iterator

GetNetworkFeeIterator

func (KVStore) GetNodeAccount

func (k KVStore) GetNodeAccount(ctx cosmos.Context, addr cosmos.AccAddress) (NodeAccount, error)

GetNodeAccount try to get node account with the given address from db

func (KVStore) GetNodeAccountByPubKey

func (k KVStore) GetNodeAccountByPubKey(ctx cosmos.Context, pk common.PubKey) (NodeAccount, error)

GetNodeAccountByPubKey try to get node account with the given pubkey from db

func (KVStore) GetNodeAccountIterator

func (k KVStore) GetNodeAccountIterator(ctx cosmos.Context) cosmos.Iterator

GetNodeAccountIterator iterate node account

func (KVStore) GetNodeAccountJail

func (k KVStore) GetNodeAccountJail(ctx cosmos.Context, addr cosmos.AccAddress) (Jail, error)

GetNodeAccountJail - gets jail details for a given node address

func (KVStore) GetNodeAccountSlashPoints

func (k KVStore) GetNodeAccountSlashPoints(ctx cosmos.Context, addr cosmos.AccAddress) (int64, error)

GetNodeAccountSlashPoints - get the slash points associated with the given node address

func (KVStore) GetNodeMimirIterator

func (k KVStore) GetNodeMimirIterator(ctx cosmos.Context) cosmos.Iterator

GetNodeMimirIterator iterate gas units

func (KVStore) GetNodeMimirs

func (k KVStore) GetNodeMimirs(ctx cosmos.Context, key string) (NodeMimirs, error)

GetNodeMimirs get node mimirs value from key value store

func (KVStore) GetNodePauseChain

func (k KVStore) GetNodePauseChain(ctx cosmos.Context, acc cosmos.AccAddress) int64
func (k KVStore) GetObservedLink(ctx cosmos.Context, inhash common.TxID) []common.TxID

func (KVStore) GetObservedNetworkFeeVoter

func (k KVStore) GetObservedNetworkFeeVoter(ctx cosmos.Context, height int64, chain common.Chain, rate, size int64) (ObservedNetworkFeeVoter, error)

GetObservedNetworkFeeVoter - gets information of an observed network fee voter

func (KVStore) GetObservedNetworkFeeVoterIterator

func (k KVStore) GetObservedNetworkFeeVoterIterator(ctx cosmos.Context) cosmos.Iterator

GetObservedNetworkFeeVoterIterator iterate tx in voters

func (KVStore) GetObservedTxInVoter

func (k KVStore) GetObservedTxInVoter(ctx cosmos.Context, hash common.TxID) (ObservedTxVoter, error)

GetObservedTxInVoter - gets information of an observed inbound tx based on the txid

func (KVStore) GetObservedTxInVoterIterator

func (k KVStore) GetObservedTxInVoterIterator(ctx cosmos.Context) cosmos.Iterator

GetObservedTxInVoterIterator iterate tx in voters

func (KVStore) GetObservedTxOutVoter

func (k KVStore) GetObservedTxOutVoter(ctx cosmos.Context, hash common.TxID) (ObservedTxVoter, error)

GetObservedTxOutVoter - gets information of an observed outbound tx based on the txid

func (KVStore) GetObservedTxOutVoterIterator

func (k KVStore) GetObservedTxOutVoterIterator(ctx cosmos.Context) cosmos.Iterator

GetObservedTxOutVoterIterator iterate tx out voters

func (KVStore) GetObservingAddresses

func (k KVStore) GetObservingAddresses(ctx cosmos.Context) ([]cosmos.AccAddress, error)

GetObservingAddresses - get list of observed addresses. This is a list of addresses that have recently contributed via observing a tx that got 2/3rds majority

func (KVStore) GetOrderBookIndex

func (k KVStore) GetOrderBookIndex(ctx cosmos.Context, msg MsgSwap) (common.TxIDs, error)

GetOrderBookIndex - read the given order book index information from key values tore

func (KVStore) GetOrderBookIndexIterator

func (k KVStore) GetOrderBookIndexIterator(ctx cosmos.Context, order types.OrderType, source, target common.Asset) cosmos.Iterator

GetOrderBookIterator iterate order book items

func (KVStore) GetOrderBookItem

func (k KVStore) GetOrderBookItem(ctx cosmos.Context, txID common.TxID) (MsgSwap, error)

GetOrderBookItem - read the given order book item information from key values store

func (KVStore) GetOrderBookItemIterator

func (k KVStore) GetOrderBookItemIterator(ctx cosmos.Context) cosmos.Iterator

GetOrderBookItemIterator iterate order book items

func (KVStore) GetOrderBookProcessor

func (k KVStore) GetOrderBookProcessor(ctx cosmos.Context) ([]bool, error)

GetOrderBookProcessor - get a list of asset pairs to process

func (KVStore) GetOutboundFeeSpentRune

func (k KVStore) GetOutboundFeeSpentRune(ctx cosmos.Context, outAsset common.Asset) (cosmos.Uint, error)

GetOutboundFeeSpentRune - record of RUNE spent by the Reserve for an Asset's outbounds' gas costs

func (KVStore) GetOutboundFeeSpentRuneIterator

func (k KVStore) GetOutboundFeeSpentRuneIterator(ctx cosmos.Context) cosmos.Iterator

GetOutboundFeeSpentRuneIterator to iterate through all Assets' OutboundFeeSpentRune (e.g. for hard-fork GenesisState export)

func (KVStore) GetOutboundFeeWithheldRune

func (k KVStore) GetOutboundFeeWithheldRune(ctx cosmos.Context, outAsset common.Asset) (cosmos.Uint, error)

GetOutboundFeeWithheldRune - record of RUNE collected by the Reserve for an Asset's outbound fees

func (KVStore) GetOutboundFeeWithheldRuneIterator

func (k KVStore) GetOutboundFeeWithheldRuneIterator(ctx cosmos.Context) cosmos.Iterator

GetOutboundFeeWithheldRuneIterator to iterate through all Assets' OutboundFeeWithheldRune (e.g. for hard-fork GenesisState export)

func (KVStore) GetOutboundTxFee

func (k KVStore) GetOutboundTxFee(ctx cosmos.Context) cosmos.Uint

func (KVStore) GetPOL

GetPOL retrieve network data from key value store

func (KVStore) GetPendingOutbounds

func (k KVStore) GetPendingOutbounds(ctx cosmos.Context, asset common.Asset) []TxOutItem

GetPendingOutbounds selects txouts in the outbound and scheduled outbound queues (for deduction to leave only 'available' balances), as the amounts of both types of txout items are yet to be deducted from the vault balances

func (KVStore) GetPool

func (k KVStore) GetPool(ctx cosmos.Context, asset common.Asset) (Pool, error)

GetPool get the entire Pool metadata struct based on given asset

func (KVStore) GetPoolIterator

func (k KVStore) GetPoolIterator(ctx cosmos.Context) cosmos.Iterator

GetPoolIterator iterate pools

func (KVStore) GetPoolLUVI

func (k KVStore) GetPoolLUVI(ctx cosmos.Context, asset common.Asset) (cosmos.Uint, error)

func (KVStore) GetPoolLiquidityFees

func (k KVStore) GetPoolLiquidityFees(ctx cosmos.Context, height uint64, asset common.Asset) (cosmos.Uint, error)

GetPoolLiquidityFees - total of fees collected in each block per pool

func (KVStore) GetPoolRagnarokStart

func (k KVStore) GetPoolRagnarokStart(ctx cosmos.Context, asset common.Asset) (int64, error)

GetPoolRagnarokStart get pool ragnarok start block height

func (KVStore) GetPoolSwapSlip

func (k KVStore) GetPoolSwapSlip(ctx cosmos.Context, height int64, asset common.Asset) (cosmos.Int, error)

GetPoolSwapSlip - total of slip in each block per pool

func (KVStore) GetPools

func (k KVStore) GetPools(ctx cosmos.Context) (Pools, error)

GetPools return all pool in key value store regardless state

func (KVStore) GetProposedUpgrade

func (k KVStore) GetProposedUpgrade(ctx cosmos.Context, name string) (*types.Upgrade, error)

GetProposedUpgrade retrieves a proposed upgrade

func (KVStore) GetRUNEPool

func (k KVStore) GetRUNEPool(ctx cosmos.Context) (RUNEPool, error)

func (KVStore) GetRUNEProvider

func (k KVStore) GetRUNEProvider(ctx cosmos.Context, addr cosmos.AccAddress) (RUNEProvider, error)

GetRUNEProvider retrieve RUNE provider from the data store

func (KVStore) GetRUNEProviderIterator

func (k KVStore) GetRUNEProviderIterator(ctx cosmos.Context) cosmos.Iterator

GetRUNEProviderIterator iterate RUNE providers

func (KVStore) GetRagnarokBlockHeight

func (k KVStore) GetRagnarokBlockHeight(ctx cosmos.Context) (int64, error)

GetRagnarokBlockHeight get ragnarok block height from key value store

func (KVStore) GetRagnarokNth

func (k KVStore) GetRagnarokNth(ctx cosmos.Context) (int64, error)

GetRagnarokNth when ragnarok get triggered , THORNode will use a few rounds to refund all assets this method return which round it is in

func (KVStore) GetRagnarokPending

func (k KVStore) GetRagnarokPending(ctx cosmos.Context) (int64, error)

GetRagnarokPending get ragnarok pending state from key value store

func (KVStore) GetRagnarokWithdrawPosition

func (k KVStore) GetRagnarokWithdrawPosition(ctx cosmos.Context) (RagnarokWithdrawPosition, error)

GetRagnarokWithdrawPosition get ragnarok withdrawing position

func (KVStore) GetRollingPoolLiquidityFee

func (k KVStore) GetRollingPoolLiquidityFee(ctx cosmos.Context, asset common.Asset) (uint64, error)

GetRollingPoolLiquidityFee get the given rolling liquidity fee from key value store

func (KVStore) GetRollupCount

func (k KVStore) GetRollupCount(ctx cosmos.Context, asset common.Asset) (int64, error)

func (KVStore) GetRuneBalanceOfModule

func (k KVStore) GetRuneBalanceOfModule(ctx cosmos.Context, moduleName string) cosmos.Uint

GetRuneBalanceOfModule get the RUNE balance

func (KVStore) GetSolvencyVoter

func (k KVStore) GetSolvencyVoter(ctx cosmos.Context, txID common.TxID, chain common.Chain) (SolvencyVoter, error)

GetSolvencyVoter - gets information of solvency voter

func (KVStore) GetStoreVersion

func (k KVStore) GetStoreVersion(ctx cosmos.Context) int64

GetStoreVersion get the current key value store version

func (KVStore) GetStreamingSwap

func (k KVStore) GetStreamingSwap(ctx cosmos.Context, hash common.TxID) (StreamingSwap, error)

GetStreamingSwap retrieve streaming swap from the data store

func (KVStore) GetStreamingSwapIterator

func (k KVStore) GetStreamingSwapIterator(ctx cosmos.Context) cosmos.Iterator

GetStreamingSwapIterator iterate streaming swaps

func (KVStore) GetSwapQueueItem

func (k KVStore) GetSwapQueueItem(ctx cosmos.Context, txID common.TxID, i int) (MsgSwap, error)

GetSwapQueueItem - write the given swap queue item information to key values tore

func (KVStore) GetSwapQueueIterator

func (k KVStore) GetSwapQueueIterator(ctx cosmos.Context) cosmos.Iterator

GetSwapQueueIterator iterate swap queue

func (KVStore) GetSwapSlipSnapShot

func (k KVStore) GetSwapSlipSnapShot(ctx cosmos.Context, asset common.Asset, height int64) (int64, error)

func (KVStore) GetSwapSlipSnapShotIterator

func (k KVStore) GetSwapSlipSnapShotIterator(ctx cosmos.Context, asset common.Asset) cosmos.Iterator

GetSwapSlipSnapShotIterator

func (KVStore) GetSwapperClout

func (k KVStore) GetSwapperClout(ctx cosmos.Context, addr common.Address) (SwapperClout, error)

func (KVStore) GetSwapperCloutIterator

func (k KVStore) GetSwapperCloutIterator(ctx cosmos.Context) cosmos.Iterator

func (KVStore) GetTHORName

func (k KVStore) GetTHORName(ctx cosmos.Context, name string) (THORName, error)

GetTHORName get THORName with the given pubkey from data store

func (KVStore) GetTHORNameIterator

func (k KVStore) GetTHORNameIterator(ctx cosmos.Context) cosmos.Iterator

GetTHORNameIterator only iterate THORNames

func (KVStore) GetTHORNamePerBlockFee

func (k KVStore) GetTHORNamePerBlockFee(ctx cosmos.Context) cosmos.Uint

func (KVStore) GetTHORNameRegisterFee

func (k KVStore) GetTHORNameRegisterFee(ctx cosmos.Context) cosmos.Uint

func (KVStore) GetTOIsValue

func (k KVStore) GetTOIsValue(ctx cosmos.Context, tois ...TxOutItem) (cosmos.Uint, cosmos.Uint)

func (KVStore) GetTotalCollateral

func (k KVStore) GetTotalCollateral(ctx cosmos.Context, asset common.Asset) (cosmos.Uint, error)

func (KVStore) GetTotalLiquidityFees

func (k KVStore) GetTotalLiquidityFees(ctx cosmos.Context, height uint64) (cosmos.Uint, error)

GetTotalLiquidityFees - total of all fees collected in each block

func (KVStore) GetTotalSupply

func (k KVStore) GetTotalSupply(ctx cosmos.Context, asset common.Asset) cosmos.Uint

func (KVStore) GetTradeAccount

func (k KVStore) GetTradeAccount(ctx cosmos.Context, addr cosmos.AccAddress, asset common.Asset) (TradeAccount, error)

func (KVStore) GetTradeAccountIterator

func (k KVStore) GetTradeAccountIterator(ctx cosmos.Context) cosmos.Iterator

func (KVStore) GetTradeAccountIteratorWithAddress

func (k KVStore) GetTradeAccountIteratorWithAddress(ctx cosmos.Context, addr cosmos.AccAddress) cosmos.Iterator

func (KVStore) GetTradeUnit

func (k KVStore) GetTradeUnit(ctx cosmos.Context, asset common.Asset) (TradeUnit, error)

func (KVStore) GetTradeUnitIterator

func (k KVStore) GetTradeUnitIterator(ctx cosmos.Context) cosmos.Iterator

func (KVStore) GetTradeUnitIteratorWithAddress

func (k KVStore) GetTradeUnitIteratorWithAddress(ctx cosmos.Context, addr cosmos.AccAddress) cosmos.Iterator

func (KVStore) GetTssKeygenMetric

func (k KVStore) GetTssKeygenMetric(ctx cosmos.Context, pubkey common.PubKey) (*TssKeygenMetric, error)

GetTssKeygenMetric get tss keygen metric from key value store

func (KVStore) GetTssKeysignFailVoter

func (k KVStore) GetTssKeysignFailVoter(ctx cosmos.Context, id string) (TssKeysignFailVoter, error)

GetTssKeysignFailVoter - gets information of a tss keysign failure voter object

func (KVStore) GetTssKeysignFailVoterIterator

func (k KVStore) GetTssKeysignFailVoterIterator(ctx cosmos.Context) cosmos.Iterator

GetTssKeysignFailVoterIterator iterate tx in voters

func (KVStore) GetTssKeysignMetric

func (k KVStore) GetTssKeysignMetric(ctx cosmos.Context, txID common.TxID) (*TssKeysignMetric, error)

GetTssKeysignMetric get tss keygen metric from key value store

func (KVStore) GetTssVoter

func (k KVStore) GetTssVoter(ctx cosmos.Context, id string) (TssVoter, error)

GetTssVoter - gets information of a tx hash

func (KVStore) GetTssVoterIterator

func (k KVStore) GetTssVoterIterator(ctx cosmos.Context) cosmos.Iterator

GetTssVoterIterator iterate tx in voters

func (KVStore) GetTxOut

func (k KVStore) GetTxOut(ctx cosmos.Context, height int64) (*TxOut, error)

GetTxOut - write the given txout information to key value store

func (KVStore) GetTxOutIterator

func (k KVStore) GetTxOutIterator(ctx cosmos.Context) cosmos.Iterator

GetTxOutIterator iterate tx out

func (KVStore) GetTxOutValue

func (k KVStore) GetTxOutValue(ctx cosmos.Context, height int64) (cosmos.Uint, cosmos.Uint, error)

func (KVStore) GetUpgradePlan

func (k KVStore) GetUpgradePlan(ctx cosmos.Context) (upgradetypes.Plan, bool)

GetUpgradePlan proxies through to the upgrade keeper

func (KVStore) GetUpgradeProposalIterator

func (k KVStore) GetUpgradeProposalIterator(ctx cosmos.Context) cosmos.Iterator

GetUpgradeProposalIterator to iterate upgrade proposals.

func (KVStore) GetUpgradeVoteIterator

func (k KVStore) GetUpgradeVoteIterator(ctx cosmos.Context, name string) cosmos.Iterator

GetUpgradeVoteIterator to iterate upgrade votes for a named proposal.

func (KVStore) GetVault

func (k KVStore) GetVault(ctx cosmos.Context, pk common.PubKey) (Vault, error)

GetVault get Vault with the given pubkey from data store

func (KVStore) GetVaultIterator

func (k KVStore) GetVaultIterator(ctx cosmos.Context) cosmos.Iterator

GetVaultIterator only iterate vault pools

func (KVStore) GetVersion

func (k KVStore) GetVersion() semver.Version

GetVersion return the current version

func (KVStore) GetVersionWithCtx

func (k KVStore) GetVersionWithCtx(ctx cosmos.Context) (semver.Version, bool)

GetVersionWithCtx returns the version with the given context, and returns true if the version was found in the store

func (KVStore) HasCoins

func (k KVStore) HasCoins(ctx cosmos.Context, addr cosmos.AccAddress, coins cosmos.Coins) bool

func (KVStore) HasOrderBookIndex

func (k KVStore) HasOrderBookIndex(ctx cosmos.Context, msg MsgSwap) (bool, error)

HasOrderBookIndex - checks if order book item already exists

func (KVStore) HasOrderBookItem

func (k KVStore) HasOrderBookItem(ctx cosmos.Context, txID common.TxID) bool

HasOrderBookItem - checks if order book item already exists

func (KVStore) HasSwapQueueItem

func (k KVStore) HasSwapQueueItem(ctx cosmos.Context, txID common.TxID, i int) bool

HasSwapQueueItem - checks if swap item already exists

func (KVStore) HasValidVaultPools

func (k KVStore) HasValidVaultPools(ctx cosmos.Context) (bool, error)

HasValidVaultPools check the data store to see whether we have a valid vault

func (KVStore) IncNodeAccountSlashPoints

func (k KVStore) IncNodeAccountSlashPoints(ctx cosmos.Context, addr cosmos.AccAddress, pts int64) error

IncNodeAccountSlashPoints - increments the slash points associated with the given node address and uint

func (KVStore) InvariantRoutes

func (k KVStore) InvariantRoutes() []common.InvariantRoute

InvariantRoutes return the keeper's invariant routes

func (KVStore) IsChainHalted

func (k KVStore) IsChainHalted(ctx cosmos.Context, chain common.Chain) bool

func (KVStore) IsChainTradingHalted

func (k KVStore) IsChainTradingHalted(ctx cosmos.Context, chain common.Chain) bool

func (KVStore) IsGlobalTradingHalted

func (k KVStore) IsGlobalTradingHalted(ctx cosmos.Context) bool

func (KVStore) IsLPPaused

func (k KVStore) IsLPPaused(ctx cosmos.Context, chain common.Chain) bool

func (KVStore) IsOperationalMimir

func (k KVStore) IsOperationalMimir(key string) bool

func (KVStore) IsRagnarok

func (k KVStore) IsRagnarok(ctx cosmos.Context, assets []common.Asset) bool

func (KVStore) IsTradingHalt

func (k KVStore) IsTradingHalt(ctx cosmos.Context, msg cosmos.Msg) bool

func (KVStore) ListActiveValidators

func (k KVStore) ListActiveValidators(ctx cosmos.Context) (NodeAccounts, error)

ListActiveValidators - get a list of active validator node accounts

func (KVStore) ListValidatorsByStatus

func (k KVStore) ListValidatorsByStatus(ctx cosmos.Context, status NodeStatus) (NodeAccounts, error)

ListValidatorsByStatus - get a list of validator node accounts with the given status

func (KVStore) ListValidatorsWithBond

func (k KVStore) ListValidatorsWithBond(ctx cosmos.Context) (NodeAccounts, error)

ListValidatorsWithBond - gets a list of all validator node accounts that have bond Note: the order of node account in the result is not defined

func (KVStore) MintAndSendToAccount

func (k KVStore) MintAndSendToAccount(ctx cosmos.Context, to cosmos.AccAddress, coin common.Coin) error

func (KVStore) MintToModule

func (k KVStore) MintToModule(ctx cosmos.Context, module string, coin common.Coin) error

func (KVStore) OrderBooksEnabled

func (k KVStore) OrderBooksEnabled(ctx cosmos.Context) bool

OrderBooksEnabled return true if the orderbooks feature is enabled

func (KVStore) PoolExist

func (k KVStore) PoolExist(ctx cosmos.Context, asset common.Asset) bool

PoolExist check whether the given pool exist in the data store

func (KVStore) ProposeUpgrade

func (k KVStore) ProposeUpgrade(ctx cosmos.Context, name string, upgrade types.Upgrade) error

ProposeUpgrade proposes an upgrade by name

func (KVStore) PurgeOperationalNodeMimirs

func (k KVStore) PurgeOperationalNodeMimirs(ctx cosmos.Context)

func (KVStore) RagnarokAccount

func (k KVStore) RagnarokAccount(ctx cosmos.Context, addr cosmos.AccAddress)

RagnarokAccount remove account and return all assets to the protocol

func (KVStore) RagnarokInProgress

func (k KVStore) RagnarokInProgress(ctx cosmos.Context) bool

RagnarokInProgress return true only when Ragnarok is happening, when Ragnarok block height is not 0

func (KVStore) RejectUpgrade

func (k KVStore) RejectUpgrade(ctx cosmos.Context, addr cosmos.AccAddress, name string)

RejectUpgrade rejects an upgrade as a validator

func (KVStore) ReleaseNodeAccountFromJail

func (k KVStore) ReleaseNodeAccountFromJail(ctx cosmos.Context, addr cosmos.AccAddress) error

ReleaseNodeAccountFromJail - update the jail details of a node account

func (KVStore) RemoveExpiredUpgradeProposals

func (k KVStore) RemoveExpiredUpgradeProposals(ctx cosmos.Context) error

RemoveExpiredUpgradeProposals removes an upgrade proposal and all votes after the proposal height has passed.

func (KVStore) RemoveFromAsgardIndex

func (k KVStore) RemoveFromAsgardIndex(ctx cosmos.Context, pubkey common.PubKey) error

func (KVStore) RemoveLiquidityProvider

func (k KVStore) RemoveLiquidityProvider(ctx cosmos.Context, lp LiquidityProvider)

RemoveLiquidityProvider remove the liquidity provider to kv store

func (KVStore) RemoveLoan

func (k KVStore) RemoveLoan(ctx cosmos.Context, lp Loan)

RemoveLoan remove the loan to kv store

func (KVStore) RemoveLowBondValidatorAccounts

func (k KVStore) RemoveLowBondValidatorAccounts(ctx cosmos.Context) error

func (KVStore) RemoveOrderBookIndex

func (k KVStore) RemoveOrderBookIndex(ctx cosmos.Context, msg MsgSwap) error

RemoveOrderBookIndex - removes a order book item from the kv store

func (KVStore) RemoveOrderBookItem

func (k KVStore) RemoveOrderBookItem(ctx cosmos.Context, txID common.TxID) error

RemoveOrderBookItem - removes a order book item from the kv store

func (KVStore) RemovePool

func (k KVStore) RemovePool(ctx cosmos.Context, asset common.Asset)

func (KVStore) RemoveRUNEProvider

func (k KVStore) RemoveRUNEProvider(ctx cosmos.Context, rp RUNEProvider)

RemoveRUNEProvider remove the RUNE provider from the kv store

func (KVStore) RemoveStreamingSwap

func (k KVStore) RemoveStreamingSwap(ctx cosmos.Context, hash common.TxID)

RemoveStreamingSwap remove the loan to kv store

func (KVStore) RemoveSwapQueueItem

func (k KVStore) RemoveSwapQueueItem(ctx cosmos.Context, txID common.TxID, i int)

RemoveSwapQueueItem - removes a swap item from the kv store

func (KVStore) RemoveTradeAccount

func (k KVStore) RemoveTradeAccount(ctx cosmos.Context, tr TradeAccount)

func (KVStore) ResetNodeAccountSlashPoints

func (k KVStore) ResetNodeAccountSlashPoints(ctx cosmos.Context, addr cosmos.AccAddress)

ResetNodeAccountSlashPoints - reset the slash points to zero for associated with the given node address

func (KVStore) ResetRollingPoolLiquidityFee

func (k KVStore) ResetRollingPoolLiquidityFee(ctx cosmos.Context, asset common.Asset)

ResetRollingPoolLiquidityFee set the given pool's rolling liquidity fee to zero

func (KVStore) RollupSwapSlip

func (k KVStore) RollupSwapSlip(ctx cosmos.Context, targetCount int64, asset common.Asset) (cosmos.Int, error)

RollupSwapSlip - sums the amount of slip in a given pool in the last targetCount blocks

func (KVStore) RunePerDollar

func (k KVStore) RunePerDollar(ctx cosmos.Context) cosmos.Uint

RunePerDollar gets in 1e8 terms the amount of Rune that is equal to 1 USD (in other words, 1 USD's price in Rune)

func (KVStore) SaveNetworkFee

func (k KVStore) SaveNetworkFee(ctx cosmos.Context, chain common.Chain, networkFee NetworkFee) error

SaveNetworkFee save the network fee to kv store

func (KVStore) ScheduleUpgrade

func (k KVStore) ScheduleUpgrade(ctx cosmos.Context, plan upgradetypes.Plan) error

ScheduleUpgrade proxies through to the upgrade keeper

func (KVStore) SendCoins

func (k KVStore) SendCoins(ctx cosmos.Context, from, to cosmos.AccAddress, coins cosmos.Coins) error

func (KVStore) SendFromAccountToModule

func (k KVStore) SendFromAccountToModule(ctx cosmos.Context, from cosmos.AccAddress, to string, coins common.Coins) error

SendFromAccountToModule transfer fund from one account to a module

func (KVStore) SendFromModuleToAccount

func (k KVStore) SendFromModuleToAccount(ctx cosmos.Context, from string, to cosmos.AccAddress, coins common.Coins) error

SendFromModuleToAccount transfer fund from module to an account

func (KVStore) SendFromModuleToModule

func (k KVStore) SendFromModuleToModule(ctx cosmos.Context, from, to string, coins common.Coins) error

SendFromModuleToModule transfer asset from one module to another

func (KVStore) SetAffiliateCollector

func (k KVStore) SetAffiliateCollector(ctx cosmos.Context, collector AffiliateFeeCollector)

func (KVStore) SetBanVoter

func (k KVStore) SetBanVoter(ctx cosmos.Context, ban BanVoter)

SetBanVoter - save a ban voter object

func (KVStore) SetBondProviders

func (k KVStore) SetBondProviders(ctx cosmos.Context, record BondProviders) error

SetBondProviders - update the bond providers of a node account

func (KVStore) SetChainContract

func (k KVStore) SetChainContract(ctx cosmos.Context, cc ChainContract)

SetChainContract - save chain contract address

func (KVStore) SetCurrentRollup

func (k KVStore) SetCurrentRollup(ctx cosmos.Context, asset common.Asset, currRollup int64)

func (KVStore) SetErrataTxVoter

func (k KVStore) SetErrataTxVoter(ctx cosmos.Context, errata ErrataTxVoter)

SetErrataTxVoter - save a errata voter object

func (KVStore) SetKeygenBlock

func (k KVStore) SetKeygenBlock(ctx cosmos.Context, keygen KeygenBlock)

SetKeygenBlock save the KeygenBlock to kv store

func (KVStore) SetLastChainHeight

func (k KVStore) SetLastChainHeight(ctx cosmos.Context, chain common.Chain, height int64) error

SetLastChainHeight save last chain height

func (KVStore) SetLastObserveHeight

func (k KVStore) SetLastObserveHeight(ctx cosmos.Context, chain common.Chain, address cosmos.AccAddress, height int64) error

SetLastObserveHeight save the last observe height into key value store

func (KVStore) SetLastSignedHeight

func (k KVStore) SetLastSignedHeight(ctx cosmos.Context, height int64) error

SetLastSignedHeight save last signed height into kv store

func (KVStore) SetLiquidityProvider

func (k KVStore) SetLiquidityProvider(ctx cosmos.Context, lp LiquidityProvider)

SetLiquidityProvider save the liquidity provider to kv store

func (KVStore) SetLoan

func (k KVStore) SetLoan(ctx cosmos.Context, lp Loan)

SetLoan save the loan to kv store

func (KVStore) SetLongRollup

func (k KVStore) SetLongRollup(ctx cosmos.Context, asset common.Asset, slip int64)

func (KVStore) SetMimir

func (k KVStore) SetMimir(ctx cosmos.Context, key string, value int64)

SetMimir save a mimir value to key value store

func (KVStore) SetMinJoinLast

func (k KVStore) SetMinJoinLast(ctx cosmos.Context)

SetMinJoinLast updates-if-changed the MinJoinVersion and its height when changed.

func (KVStore) SetNetwork

func (k KVStore) SetNetwork(ctx cosmos.Context, data Network) error

SetNetwork save the given network data to key value store, it will overwrite existing vault

func (KVStore) SetNodeAccount

func (k KVStore) SetNodeAccount(ctx cosmos.Context, na NodeAccount) error

SetNodeAccount save the given node account into data store

func (KVStore) SetNodeAccountJail

func (k KVStore) SetNodeAccountJail(ctx cosmos.Context, addr cosmos.AccAddress, height int64, reason string) error

SetNodeAccountJail - update the jail details of a node account

func (KVStore) SetNodeAccountSlashPoints

func (k KVStore) SetNodeAccountSlashPoints(ctx cosmos.Context, addr cosmos.AccAddress, pts int64)

SetNodeAccountSlashPoints - set the slash points associated with the given node address and uint

func (KVStore) SetNodeMimir

func (k KVStore) SetNodeMimir(ctx cosmos.Context, key string, value int64, acc cosmos.AccAddress) error

SetNodeMimir save a mimir value to key value store for a specific node

func (KVStore) SetNodePauseChain

func (k KVStore) SetNodePauseChain(ctx cosmos.Context, acc cosmos.AccAddress)
func (k KVStore) SetObservedLink(ctx cosmos.Context, inhash, outhash common.TxID)

func (KVStore) SetObservedNetworkFeeVoter

func (k KVStore) SetObservedNetworkFeeVoter(ctx cosmos.Context, networkFeeVoter ObservedNetworkFeeVoter)

SetObservedNetworkFeeVoter - save a observed network fee voter object

func (KVStore) SetObservedTxInVoter

func (k KVStore) SetObservedTxInVoter(ctx cosmos.Context, tx ObservedTxVoter)

SetObservedTxInVoter - save a txin voter object

func (KVStore) SetObservedTxOutVoter

func (k KVStore) SetObservedTxOutVoter(ctx cosmos.Context, tx ObservedTxVoter)

SetObservedTxOutVoter - save a txout voter object

func (KVStore) SetOrderBookIndex

func (k KVStore) SetOrderBookIndex(ctx cosmos.Context, msg MsgSwap) error

SetOrderBookIndex - writes a order book index to the kv store

func (KVStore) SetOrderBookItem

func (k KVStore) SetOrderBookItem(ctx cosmos.Context, msg MsgSwap) error

SetOrderBookItem - writes a order book item to the kv store

func (KVStore) SetOrderBookProcessor

func (k KVStore) SetOrderBookProcessor(ctx cosmos.Context, record []bool) error

SetOrderBookProcessor - writes a list of pairs to process

func (KVStore) SetPOL

func (k KVStore) SetPOL(ctx cosmos.Context, data ProtocolOwnedLiquidity) error

SetPOL save the given network data to key value store, it will overwrite existing vault

func (KVStore) SetPool

func (k KVStore) SetPool(ctx cosmos.Context, pool Pool) error

SetPool save the entire Pool metadata struct to key value store

func (KVStore) SetPoolLUVI

func (k KVStore) SetPoolLUVI(ctx cosmos.Context, asset common.Asset, luvi cosmos.Uint)

func (KVStore) SetPoolRagnarokStart

func (k KVStore) SetPoolRagnarokStart(ctx cosmos.Context, asset common.Asset)

SetPoolRagnarokStart set pool ragnarok start block height

func (KVStore) SetRUNEPool

func (k KVStore) SetRUNEPool(ctx cosmos.Context, pool RUNEPool)

func (KVStore) SetRUNEProvider

func (k KVStore) SetRUNEProvider(ctx cosmos.Context, rp RUNEProvider)

SetRUNEProvider save the RUNE provider to kv store

func (KVStore) SetRagnarokBlockHeight

func (k KVStore) SetRagnarokBlockHeight(ctx cosmos.Context, height int64)

SetRagnarokBlockHeight save ragnarok block height to key value store, once it get set , it means ragnarok started

func (KVStore) SetRagnarokNth

func (k KVStore) SetRagnarokNth(ctx cosmos.Context, nth int64)

SetRagnarokNth save the round number into key value store

func (KVStore) SetRagnarokPending

func (k KVStore) SetRagnarokPending(ctx cosmos.Context, pending int64)

SetRagnarokPending save ragnarok pending to key value store

func (KVStore) SetRagnarokWithdrawPosition

func (k KVStore) SetRagnarokWithdrawPosition(ctx cosmos.Context, position RagnarokWithdrawPosition)

SetRagnarokWithdrawPosition set ragnarok withdraw position

func (KVStore) SetSolvencyVoter

func (k KVStore) SetSolvencyVoter(ctx cosmos.Context, solvencyVoter SolvencyVoter)

SetSolvencyVoter - save a solvency voter object

func (KVStore) SetStoreVersion

func (k KVStore) SetStoreVersion(ctx cosmos.Context, value int64)

SetStoreVersion save the store version

func (KVStore) SetStreamingSwap

func (k KVStore) SetStreamingSwap(ctx cosmos.Context, swp StreamingSwap)

SetStreamingSwap save the streaming swap to kv store

func (KVStore) SetSwapQueueItem

func (k KVStore) SetSwapQueueItem(ctx cosmos.Context, msg MsgSwap, i int) error

SetSwapQueueItem - writes a swap item to the kv store

func (KVStore) SetSwapSlipSnapShot

func (k KVStore) SetSwapSlipSnapShot(ctx cosmos.Context, asset common.Asset, height, currRollup int64)

func (KVStore) SetSwapperClout

func (k KVStore) SetSwapperClout(ctx cosmos.Context, record SwapperClout) error

func (KVStore) SetTHORName

func (k KVStore) SetTHORName(ctx cosmos.Context, name THORName)

SetTHORName save the THORName object to store

func (KVStore) SetTotalCollateral

func (k KVStore) SetTotalCollateral(ctx cosmos.Context, asset common.Asset, amt cosmos.Uint)

func (KVStore) SetTradeAccount

func (k KVStore) SetTradeAccount(ctx cosmos.Context, tr TradeAccount)

func (KVStore) SetTradeUnit

func (k KVStore) SetTradeUnit(ctx cosmos.Context, tu TradeUnit)

func (KVStore) SetTssKeygenMetric

func (k KVStore) SetTssKeygenMetric(ctx cosmos.Context, metric *TssKeygenMetric)

SetTssKeygenMetric save TssKeygenMetric to key value store

func (KVStore) SetTssKeysignFailVoter

func (k KVStore) SetTssKeysignFailVoter(ctx cosmos.Context, tss TssKeysignFailVoter)

SetTssKeysignFailVoter - save a tss keysign fail voter object

func (KVStore) SetTssKeysignMetric

func (k KVStore) SetTssKeysignMetric(ctx cosmos.Context, metric *TssKeysignMetric)

SetTssKeysignMetric save TssKeygenMetric to key value store

func (KVStore) SetTssVoter

func (k KVStore) SetTssVoter(ctx cosmos.Context, tss TssVoter)

SetTssVoter - save a tss voter object

func (KVStore) SetTxOut

func (k KVStore) SetTxOut(ctx cosmos.Context, blockOut *TxOut) error

SetTxOut - write the given txout information to key value store

func (KVStore) SetVault

func (k KVStore) SetVault(ctx cosmos.Context, vault Vault) error

SetVault save the Vault object to store

func (*KVStore) SetVersion

func (k *KVStore) SetVersion(ver semver.Version)

func (KVStore) SetVersionWithCtx

func (k KVStore) SetVersionWithCtx(ctx cosmos.Context, v semver.Version)

SetVersionWithCtx stores the version

func (KVStore) SortBySecurity

func (k KVStore) SortBySecurity(ctx cosmos.Context, vaults Vaults, signingTransPeriod int64) Vaults

SortBySecurity sorts a list of vaults in an order by how close the total value of the vault is to the total bond of the members of that vault. Sorts by least secure to most secure.

func (KVStore) StreamingSwapExists

func (k KVStore) StreamingSwapExists(ctx cosmos.Context, hash common.TxID) bool

StreamingSwapExists check whether the given hash is associated with a swap

func (KVStore) THORNameExists

func (k KVStore) THORNameExists(ctx cosmos.Context, name string) bool

THORNameExists check whether the given name exists

func (KVStore) TotalActiveValidators

func (k KVStore) TotalActiveValidators(ctx cosmos.Context) (int, error)

TotalActiveValidators count the number of active node account

func (KVStore) VaultExists

func (k KVStore) VaultExists(ctx cosmos.Context, pk common.PubKey) bool

VaultExists check whether the given pubkey is associated with a vault

type KeygenBlock

type KeygenBlock = types.KeygenBlock

type LiquidityProvider

type LiquidityProvider = types.LiquidityProvider

type Loan

type Loan = types.Loan

type MinJoinLast

type MinJoinLast = types.MinJoinLast

type MsgAddLiquidity

type MsgAddLiquidity = types.MsgAddLiquidity

type MsgSwap

type MsgSwap = types.MsgSwap

type MsgWithdrawLiquidity

type MsgWithdrawLiquidity = types.MsgWithdrawLiquidity

type Network

type Network = types.Network

type NetworkFee

type NetworkFee = types.NetworkFee

type NodeAccount

type NodeAccount = types.NodeAccount

type NodeAccounts

type NodeAccounts = types.NodeAccounts

type NodeMimir

type NodeMimir = types.NodeMimir

type NodeMimirs

type NodeMimirs = types.NodeMimirs

type NodeStatus

type NodeStatus = types.NodeStatus

type NodeType

type NodeType = types.NodeType

type ObservedNetworkFeeVoter

type ObservedNetworkFeeVoter = types.ObservedNetworkFeeVoter

type ObservedTxVoter

type ObservedTxVoter = types.ObservedTxVoter

type ObservedTxs

type ObservedTxs = types.ObservedTxs

type Pool

type Pool = types.Pool

type Pools

type Pools = types.Pools

type ProtoAccAddresses

type ProtoAccAddresses = types.ProtoAccAddresses

type ProtoBools

type ProtoBools = types.ProtoBools

type ProtoInt64

type ProtoInt64 = types.ProtoInt64

type ProtoStrings

type ProtoStrings = types.ProtoStrings

type ProtoUint

type ProtoUint = common.ProtoUint

type ProtoUint64

type ProtoUint64 = types.ProtoUint64

type ProtocolOwnedLiquidity

type ProtocolOwnedLiquidity = types.ProtocolOwnedLiquidity

type RUNEPool

type RUNEPool = types.RUNEPool

type RUNEProvider

type RUNEProvider = types.RUNEProvider

type RagnarokWithdrawPosition

type RagnarokWithdrawPosition = types.RagnarokWithdrawPosition

type ReserveContributors

type ReserveContributors = types.ReserveContributors

type SolvencyVoter

type SolvencyVoter = types.SolvencyVoter

type StreamingSwap

type StreamingSwap = types.StreamingSwap

type SwapperClout

type SwapperClout = types.SwapperClout

type THORName

type THORName = types.THORName

type THORNameAlias

type THORNameAlias = types.THORNameAlias

type TradeAccount

type TradeAccount = types.TradeAccount

type TradeUnit

type TradeUnit = types.TradeUnit

type TssKeygenMetric

type TssKeygenMetric = types.TssKeygenMetric

type TssKeysignFailVoter

type TssKeysignFailVoter = types.TssKeysignFailVoter

type TssKeysignMetric

type TssKeysignMetric = types.TssKeysignMetric

type TssVoter

type TssVoter = types.TssVoter

type TxOut

type TxOut = types.TxOut

type TxOutItem

type TxOutItem = types.TxOutItem

type UpgradeQuorum

type UpgradeQuorum struct {
	Approved        bool
	ApprovingVals   int
	TotalActive     int
	NeededForQuorum int
}

UpgradeQuorum represents the quorum status of an upgrade proposal.

func UpgradeApprovedByMajority

func UpgradeApprovedByMajority(ctx cosmos.Context, k keeper.Keeper, name string) (*UpgradeQuorum, error)

UpgradeApprovedByMajority returns true and no error if the upgrade is approved by 2/3 of Validators. it additionally returns the current approving val count, the total active val count, and the additional active validators needed to reach quorum, if not already approved.

type Vault

type Vault = types.Vault

type VaultSecurity

type VaultSecurity struct {
	Vault      Vault
	TotalBond  cosmos.Uint
	TotalValue cosmos.Uint
	Diff       cosmos.Int
}

type VaultStatus

type VaultStatus = types.VaultStatus

type Vaults

type Vaults = types.Vaults

Jump to

Keyboard shortcuts

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