Documentation ¶
Overview ¶
Package supplychecker provides functionalities to check the total supply of Zeta tokens Currently not used in the codebase
Index ¶
- func ValidateZetaSupply(logger zerolog.Logger, ...) bool
- type ZetaSupplyCheckLogs
- type ZetaSupplyChecker
- func (zs *ZetaSupplyChecker) AbortedTxAmount(ctx context.Context) (sdkmath.Int, error)
- func (zs *ZetaSupplyChecker) CheckZetaTokenSupply(ctx context.Context) error
- func (zs *ZetaSupplyChecker) GetAmountOfZetaInTransit(ctx context.Context) (sdkmath.Int, error)
- func (zs *ZetaSupplyChecker) GetPendingCCTXInTransit(ctx context.Context, receivingChains []chains.Chain) []*types.CrossChainTx
- func (zs *ZetaSupplyChecker) Start(ctx context.Context)
- func (zs *ZetaSupplyChecker) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ZetaSupplyCheckLogs ¶
type ZetaSupplyCheckLogs struct { Logger zerolog.Logger AbortedTxAmounts sdkmath.Int `json:"aborted_tx_amounts"` ZetaInTransit sdkmath.Int `json:"zeta_in_transit"` ExternalChainTotalSupply sdkmath.Int `json:"external_chain_total_supply"` ZetaTokenSupplyOnNode sdkmath.Int `json:"zeta_token_supply_on_node"` EthLockedAmount sdkmath.Int `json:"eth_locked_amount"` NodeAmounts sdkmath.Int `json:"node_amounts"` LHS sdkmath.Int `json:"LHS"` RHS sdkmath.Int `json:"RHS"` SupplyCheckSuccess bool `json:"supply_check_success"` }
ZetaSupplyCheckLogs is a struct to log the output of the ZetaSupplyChecker
func (ZetaSupplyCheckLogs) LogOutput ¶
func (z ZetaSupplyCheckLogs) LogOutput()
LogOutput logs the output of the ZetaSupplyChecker
type ZetaSupplyChecker ¶
type ZetaSupplyChecker struct {
// contains filtered or unexported fields
}
ZetaSupplyChecker is a utility to check the total supply of Zeta tokens
func NewZetaSupplyChecker ¶
func NewZetaSupplyChecker( ctx context.Context, zetaClient *zetacore.Client, logger zerolog.Logger, ) (*ZetaSupplyChecker, error)
NewZetaSupplyChecker creates a new ZetaSupplyChecker
func (*ZetaSupplyChecker) AbortedTxAmount ¶
AbortedTxAmount returns the amount of Zeta tokens in aborted transactions
func (*ZetaSupplyChecker) CheckZetaTokenSupply ¶
func (zs *ZetaSupplyChecker) CheckZetaTokenSupply(ctx context.Context) error
CheckZetaTokenSupply checks the total supply of Zeta tokens
func (*ZetaSupplyChecker) GetAmountOfZetaInTransit ¶
GetAmountOfZetaInTransit returns the amount of Zeta tokens in transit
func (*ZetaSupplyChecker) GetPendingCCTXInTransit ¶
func (zs *ZetaSupplyChecker) GetPendingCCTXInTransit( ctx context.Context, receivingChains []chains.Chain, ) []*types.CrossChainTx
GetPendingCCTXInTransit returns the pending CCTX in transit
func (*ZetaSupplyChecker) Start ¶
func (zs *ZetaSupplyChecker) Start(ctx context.Context)
Start starts the ZetaSupplyChecker
func (*ZetaSupplyChecker) Stop ¶
func (zs *ZetaSupplyChecker) Stop()
Stop stops the ZetaSupplyChecker