Documentation ¶
Index ¶
- Variables
- func NewIsAssetStub(id string, dp uint64, quantum *num.Decimal) *assets.Asset
- type AssetParty
- type AssetStub
- func (a *AssetStub) ApplyAssetUpdate(_ context.Context, assetID string) error
- func (AssetStub) Enable(_ context.Context, assetID string) error
- func (a *AssetStub) Get(id string) (*assets.Asset, error)
- func (a *AssetStub) Register(id string, decimals uint64, quantum *num.Decimal)
- func (a *AssetStub) SetPermissive()
- func (a *AssetStub) SetStrict()
- type BridgeViewStub
- func (*BridgeViewStub) FindAssetLimitsUpdated(w *types.ERC20AssetLimitsUpdated, blockNumber, logIndex uint64, ...) error
- func (*BridgeViewStub) FindAssetList(al *types.ERC20AssetList, blockNumber, logIndex uint64, txHash string) error
- func (*BridgeViewStub) FindBridgeResumed(al *types.ERC20EventBridgeResumed, blockNumber, logIndex uint64, txHash string) error
- func (*BridgeViewStub) FindBridgeStopped(al *types.ERC20EventBridgeStopped, blockNumber, logIndex uint64, txHash string) error
- func (*BridgeViewStub) FindDeposit(d *types.ERC20Deposit, blockNumber, logIndex uint64, ethAssetAddress string, ...) error
- type BrokerStub
- func (b *BrokerStub) ClearAllEvents()
- func (b *BrokerStub) ClearOrderByReference(party, ref string) error
- func (b *BrokerStub) ClearTransferResponseEvents()
- func (b *BrokerStub) GetAccountEvents() []events.Acc
- func (b *BrokerStub) GetAccounts() []vegapb.Account
- func (b *BrokerStub) GetActiveOrderDepth(marketID string) (sell []*vegapb.Order, buy []*vegapb.Order)
- func (b *BrokerStub) GetAllEvents() []events.Event
- func (b *BrokerStub) GetAllEventsSinceCleared() []events.Event
- func (b *BrokerStub) GetAssetGlobalInsuranceAccount(asset string) (vegapb.Account, error)
- func (b *BrokerStub) GetAssetNetworkTreasuryAccount(asset string) (vegapb.Account, error)
- func (b *BrokerStub) GetAuctionEvents() []events.Auction
- func (b *BrokerStub) GetBatch(t events.Type) []events.Event
- func (b *BrokerStub) GetBookDepth(market string) (sell map[string]uint64, buy map[string]uint64)
- func (b *BrokerStub) GetByReference(party, ref string) (vegapb.Order, error)
- func (b *BrokerStub) GetCurrentEpoch() *events.EpochEvent
- func (b *BrokerStub) GetDelegationBalance(epochSeq string) []vegapb.Delegation
- func (b *BrokerStub) GetDelegationBalanceEvents(epochSeq string) []events.DelegationBalance
- func (b *BrokerStub) GetDeposits() []vegapb.Deposit
- func (b *BrokerStub) GetDistressedOrders() []events.DistressedOrders
- func (b *BrokerStub) GetFirstByReference(party, ref string) (vegapb.Order, error)
- func (b *BrokerStub) GetImmBatch(t events.Type) []events.Event
- func (b *BrokerStub) GetLPEvents() []events.LiquidityProvision
- func (b *BrokerStub) GetLPSErrors() []events.TxErr
- func (b *BrokerStub) GetLastMarketUpdateState(marketID string) *vegapb.Market
- func (b *BrokerStub) GetLedgerMovements(mutable bool) []events.LedgerMovements
- func (b *BrokerStub) GetLossSocializationEvents() []events.LossSocialization
- func (b *BrokerStub) GetMarginByPartyAndMarket(partyID, marketID string) (vegapb.MarginLevels, error)
- func (b *BrokerStub) GetMarket(marketID string) *vegapb.Market
- func (b *BrokerStub) GetMarketInfrastructureFeePoolAccount(asset string) (vegapb.Account, error)
- func (b *BrokerStub) GetMarketInsurancePoolAccount(market string) (vegapb.Account, error)
- func (b *BrokerStub) GetMarketLPLiquidityBondAccount(party, market string) (vegapb.Account, error)
- func (b *BrokerStub) GetMarketLPLiquidityFeePoolAccount(party, market string) (vegapb.Account, error)
- func (b *BrokerStub) GetMarketLiquidityFeePoolAccount(market string) (vegapb.Account, error)
- func (b *BrokerStub) GetMarketSettlementAccount(market string) (vegapb.Account, error)
- func (b *BrokerStub) GetOrderEvents() []events.Order
- func (b *BrokerStub) GetOrdersByPartyAndMarket(party, market string) []vegapb.Order
- func (b *BrokerStub) GetPartyBondAccount(party, asset string) (ba vegapb.Account, err error)
- func (b *BrokerStub) GetPartyBondAccountForMarket(party, asset, marketID string) (ba vegapb.Account, err error)
- func (b *BrokerStub) GetPartyGeneralAccount(party, asset string) (vegapb.Account, error)
- func (b *BrokerStub) GetPartyHoldingAccount(party, asset string) (ga vegapb.Account, err error)
- func (b *BrokerStub) GetPartyMarginAccount(party, market string) (vegapb.Account, error)
- func (b *BrokerStub) GetPartyVestedAccount(party, asset string) (ga vegapb.Account, err error)
- func (b *BrokerStub) GetPartyVestedAccountForMarket(party, asset, marketID string) (vegapb.Account, error)
- func (b *BrokerStub) GetPartyVestingAccount(party, asset string) (ga vegapb.Account, err error)
- func (b *BrokerStub) GetPartyVestingAccountForMarket(party, asset, marketID string) (vegapb.Account, error)
- func (b *BrokerStub) GetRejectedOrderAmendments() []events.TxErr
- func (b *BrokerStub) GetRewardAccountBalance(accountType, asset string) (ga vegapb.Account, err error)
- func (b *BrokerStub) GetRewards(epochSeq string) map[AssetParty]events.RewardPayout
- func (b *BrokerStub) GetSettleDistressed() []events.SettleDistressed
- func (b *BrokerStub) GetStakingRewardAccount(asset string) (vegapb.Account, error)
- func (b *BrokerStub) GetStopByReference(party, ref string) (eventspb.StopOrderEvent, error)
- func (b *BrokerStub) GetStopOrderEvents() []events.StopOrder
- func (b *BrokerStub) GetTradeEvents() []events.Trade
- func (b *BrokerStub) GetTrades() []vegapb.Trade
- func (b *BrokerStub) GetTransfers(mutable bool) []*vegapb.LedgerEntry
- func (b *BrokerStub) GetTxErrors() []events.TxErr
- func (b *BrokerStub) GetValidatorScores(epochSeq string) map[string]events.ValidatorScore
- func (b *BrokerStub) GetWithdrawals() []vegapb.Withdrawal
- func (b *BrokerStub) PartyActivityStreaks() []eventspb.PartyActivityStreak
- func (b *BrokerStub) ReferralSetStats() []*types.ReferralSetStats
- func (b *BrokerStub) Reset()
- func (b *BrokerStub) ResetType(t events.Type)
- func (b *BrokerStub) Send(e events.Event)
- func (b *BrokerStub) SendBatch(evts []events.Event)
- func (b *BrokerStub) SetStreaming(v bool) bool
- func (b *BrokerStub) Subscribe(sub broker.Subscriber) int
- func (b *BrokerStub) SubscribeBatch(subs ...broker.Subscriber)
- func (b *BrokerStub) Unsubscribe(k int)
- func (b *BrokerStub) VestingStats() []eventspb.VestingStatsUpdated
- func (b *BrokerStub) VolumeDiscountStats() []eventspb.VolumeDiscountStatsUpdated
- type CommanderStub
- type ReferralDiscountRewardService
- func (*ReferralDiscountRewardService) GetReferrer(referee types.PartyID) (types.PartyID, error)
- func (*ReferralDiscountRewardService) ReferralDiscountFactorForParty(party types.PartyID) num.Decimal
- func (*ReferralDiscountRewardService) RewardsFactorMultiplierAppliedForParty(party types.PartyID) num.Decimal
- type StakingAccountStub
- func (t *StakingAccountStub) DecrementBalance(party string, amount *num.Uint) error
- func (t *StakingAccountStub) GetAvailableBalance(party string) (*num.Uint, error)
- func (t *StakingAccountStub) GetAvailableBalanceInRange(party string, from, _ time.Time) (*num.Uint, error)
- func (t *StakingAccountStub) IncrementBalance(party string, amount *num.Uint) error
- func (t *StakingAccountStub) OnEpochEvent(ctx context.Context, epoch types.Epoch)
- func (t *StakingAccountStub) OnEpochRestore(_ context.Context, _ types.Epoch)
- type StateVarStub
- func (e *StateVarStub) NewEvent(asset, market string, eventType statevar.EventType)
- func (e *StateVarStub) OnFloatingPointUpdatesDurationUpdate(ctx context.Context, updateFrequency time.Duration) error
- func (e *StateVarStub) OnTick(ctx context.Context, t time.Time)
- func (e *StateVarStub) ReadyForTimeTrigger(asset, mktID string)
- func (e *StateVarStub) RegisterStateVariable(asset, market, name string, converter statevar.Converter, ...) error
- func (e *StateVarStub) UnregisterStateVariable(asset, market string)
- type TimeStub
- type TopologyStub
- func (ts *TopologyStub) AddValidator(node string, pubkey string)
- func (ts *TopologyStub) AllNodeIDs() []string
- func (ts *TopologyStub) AllVegaPubKeys() []string
- func (ts *TopologyStub) Get(key string) *validators.ValidatorData
- func (ts *TopologyStub) GetRewardsScores(ctx context.Context, epochSeq string, delegationState []*types.ValidatorData, ...) (*types.ScoreData, *types.ScoreData)
- func (*TopologyStub) GetTotalVotingPower() int64
- func (*TopologyStub) GetVotingPower(pubkey string) int64
- func (ts *TopologyStub) IsTendermintValidator(pubKey string) bool
- func (ts *TopologyStub) IsValidator() bool
- func (ts *TopologyStub) IsValidatorNodeID(nodeID string) bool
- func (ts *TopologyStub) IsValidatorVegaPubKey(pubKey string) bool
- func (ts *TopologyStub) Len() int
- func (ts *TopologyStub) OnMinDelegationUpdated(_ context.Context, minDelegation num.Decimal) error
- func (ts *TopologyStub) RecalcValidatorSet(ctx context.Context, epochSeq string, delegationState []*types.ValidatorData, ...) []*types.PartyContributionScore
- func (ts *TopologyStub) SelfNodeID() string
- func (ts *TopologyStub) SelfVegaPubKey() string
- func (ts *TopologyStub) ValidatorPerformanceScore(nodeID string) num.Decimal
- type VolumeDiscountService
Constants ¶
This section is empty.
Variables ¶
var AccountDoesNotExistErr = errors.New("account does not exist")
Functions ¶
Types ¶
type AssetParty ¶
type AssetParty struct {
Asset, Party string
}
type AssetStub ¶
type AssetStub struct {
// contains filtered or unexported fields
}
func NewAssetStub ¶
func NewAssetStub() *AssetStub
func (*AssetStub) ApplyAssetUpdate ¶
func (*AssetStub) SetPermissive ¶
func (a *AssetStub) SetPermissive()
type BridgeViewStub ¶
type BridgeViewStub struct{}
func NewBridgeViewStub ¶
func NewBridgeViewStub() *BridgeViewStub
func (*BridgeViewStub) FindAssetLimitsUpdated ¶
func (*BridgeViewStub) FindAssetLimitsUpdated(w *types.ERC20AssetLimitsUpdated, blockNumber, logIndex uint64, ethAssetAddress string, txHash string) error
func (*BridgeViewStub) FindAssetList ¶
func (*BridgeViewStub) FindAssetList(al *types.ERC20AssetList, blockNumber, logIndex uint64, txHash string) error
func (*BridgeViewStub) FindBridgeResumed ¶
func (*BridgeViewStub) FindBridgeResumed(al *types.ERC20EventBridgeResumed, blockNumber, logIndex uint64, txHash string) error
func (*BridgeViewStub) FindBridgeStopped ¶
func (*BridgeViewStub) FindBridgeStopped(al *types.ERC20EventBridgeStopped, blockNumber, logIndex uint64, txHash string) error
func (*BridgeViewStub) FindDeposit ¶
func (*BridgeViewStub) FindDeposit(d *types.ERC20Deposit, blockNumber, logIndex uint64, ethAssetAddress string, txHash string) error
type BrokerStub ¶
type BrokerStub struct {
// contains filtered or unexported fields
}
func NewBrokerStub ¶
func NewBrokerStub() *BrokerStub
func (*BrokerStub) ClearAllEvents ¶
func (b *BrokerStub) ClearAllEvents()
func (*BrokerStub) ClearOrderByReference ¶
func (b *BrokerStub) ClearOrderByReference(party, ref string) error
func (*BrokerStub) ClearTransferResponseEvents ¶
func (b *BrokerStub) ClearTransferResponseEvents()
func (*BrokerStub) GetAccountEvents ¶
func (b *BrokerStub) GetAccountEvents() []events.Acc
func (*BrokerStub) GetAccounts ¶
func (b *BrokerStub) GetAccounts() []vegapb.Account
func (*BrokerStub) GetActiveOrderDepth ¶
func (*BrokerStub) GetAllEvents ¶
func (b *BrokerStub) GetAllEvents() []events.Event
func (*BrokerStub) GetAllEventsSinceCleared ¶ added in v0.68.0
func (b *BrokerStub) GetAllEventsSinceCleared() []events.Event
func (*BrokerStub) GetAssetGlobalInsuranceAccount ¶ added in v0.73.0
func (b *BrokerStub) GetAssetGlobalInsuranceAccount(asset string) (vegapb.Account, error)
func (*BrokerStub) GetAssetNetworkTreasuryAccount ¶
func (b *BrokerStub) GetAssetNetworkTreasuryAccount(asset string) (vegapb.Account, error)
func (*BrokerStub) GetAuctionEvents ¶
func (b *BrokerStub) GetAuctionEvents() []events.Auction
func (*BrokerStub) GetBookDepth ¶
func (*BrokerStub) GetByReference ¶
func (b *BrokerStub) GetByReference(party, ref string) (vegapb.Order, error)
func (*BrokerStub) GetCurrentEpoch ¶ added in v0.73.0
func (b *BrokerStub) GetCurrentEpoch() *events.EpochEvent
func (*BrokerStub) GetDelegationBalance ¶
func (b *BrokerStub) GetDelegationBalance(epochSeq string) []vegapb.Delegation
func (*BrokerStub) GetDelegationBalanceEvents ¶
func (b *BrokerStub) GetDelegationBalanceEvents(epochSeq string) []events.DelegationBalance
func (*BrokerStub) GetDeposits ¶ added in v0.68.0
func (b *BrokerStub) GetDeposits() []vegapb.Deposit
func (*BrokerStub) GetDistressedOrders ¶ added in v0.71.0
func (b *BrokerStub) GetDistressedOrders() []events.DistressedOrders
func (*BrokerStub) GetFirstByReference ¶
func (b *BrokerStub) GetFirstByReference(party, ref string) (vegapb.Order, error)
func (*BrokerStub) GetImmBatch ¶
func (b *BrokerStub) GetImmBatch(t events.Type) []events.Event
func (*BrokerStub) GetLPEvents ¶
func (b *BrokerStub) GetLPEvents() []events.LiquidityProvision
func (*BrokerStub) GetLPSErrors ¶
func (b *BrokerStub) GetLPSErrors() []events.TxErr
func (*BrokerStub) GetLastMarketUpdateState ¶ added in v0.72.0
func (b *BrokerStub) GetLastMarketUpdateState(marketID string) *vegapb.Market
func (*BrokerStub) GetLedgerMovements ¶ added in v0.56.0
func (b *BrokerStub) GetLedgerMovements(mutable bool) []events.LedgerMovements
GetLedgerMovements returns ledger movements, `mutable` argument specifies if these should be all the scenario events or events that can be cleared by the user.
func (*BrokerStub) GetLossSocializationEvents ¶ added in v0.71.0
func (b *BrokerStub) GetLossSocializationEvents() []events.LossSocialization
func (*BrokerStub) GetMarginByPartyAndMarket ¶
func (b *BrokerStub) GetMarginByPartyAndMarket(partyID, marketID string) (vegapb.MarginLevels, error)
func (*BrokerStub) GetMarketInfrastructureFeePoolAccount ¶
func (b *BrokerStub) GetMarketInfrastructureFeePoolAccount(asset string) (vegapb.Account, error)
func (*BrokerStub) GetMarketInsurancePoolAccount ¶
func (b *BrokerStub) GetMarketInsurancePoolAccount(market string) (vegapb.Account, error)
func (*BrokerStub) GetMarketLPLiquidityBondAccount ¶ added in v0.73.0
func (b *BrokerStub) GetMarketLPLiquidityBondAccount(party, market string) (vegapb.Account, error)
func (*BrokerStub) GetMarketLPLiquidityFeePoolAccount ¶ added in v0.73.0
func (b *BrokerStub) GetMarketLPLiquidityFeePoolAccount(party, market string) (vegapb.Account, error)
func (*BrokerStub) GetMarketLiquidityFeePoolAccount ¶
func (b *BrokerStub) GetMarketLiquidityFeePoolAccount(market string) (vegapb.Account, error)
func (*BrokerStub) GetMarketSettlementAccount ¶
func (b *BrokerStub) GetMarketSettlementAccount(market string) (vegapb.Account, error)
func (*BrokerStub) GetOrderEvents ¶
func (b *BrokerStub) GetOrderEvents() []events.Order
func (*BrokerStub) GetOrdersByPartyAndMarket ¶
func (b *BrokerStub) GetOrdersByPartyAndMarket(party, market string) []vegapb.Order
func (*BrokerStub) GetPartyBondAccount ¶
func (b *BrokerStub) GetPartyBondAccount(party, asset string) (ba vegapb.Account, err error)
func (*BrokerStub) GetPartyBondAccountForMarket ¶
func (b *BrokerStub) GetPartyBondAccountForMarket(party, asset, marketID string) (ba vegapb.Account, err error)
func (*BrokerStub) GetPartyGeneralAccount ¶
func (b *BrokerStub) GetPartyGeneralAccount(party, asset string) (vegapb.Account, error)
GetPartyGeneralAccount returns the latest event WRT the party's general account.
func (*BrokerStub) GetPartyHoldingAccount ¶ added in v0.73.0
func (b *BrokerStub) GetPartyHoldingAccount(party, asset string) (ga vegapb.Account, err error)
GetPartyGeneralAccount returns the latest event WRT the party's general account.
func (*BrokerStub) GetPartyMarginAccount ¶
func (b *BrokerStub) GetPartyMarginAccount(party, market string) (vegapb.Account, error)
func (*BrokerStub) GetPartyVestedAccount ¶ added in v0.73.0
func (b *BrokerStub) GetPartyVestedAccount(party, asset string) (ga vegapb.Account, err error)
GetPartyVestingAccount returns the latest event WRT the party's general account.
func (*BrokerStub) GetPartyVestedAccountForMarket ¶ added in v0.73.0
func (b *BrokerStub) GetPartyVestedAccountForMarket(party, asset, marketID string) (vegapb.Account, error)
func (*BrokerStub) GetPartyVestingAccount ¶ added in v0.73.0
func (b *BrokerStub) GetPartyVestingAccount(party, asset string) (ga vegapb.Account, err error)
GetPartyVestingAccount returns the latest event WRT the party's general account.
func (*BrokerStub) GetPartyVestingAccountForMarket ¶ added in v0.73.0
func (b *BrokerStub) GetPartyVestingAccountForMarket(party, asset, marketID string) (vegapb.Account, error)
func (*BrokerStub) GetRejectedOrderAmendments ¶
func (b *BrokerStub) GetRejectedOrderAmendments() []events.TxErr
func (*BrokerStub) GetRewardAccountBalance ¶
func (b *BrokerStub) GetRewardAccountBalance(accountType, asset string) (ga vegapb.Account, err error)
GetRewardAccountBalance returns the latest event WRT the reward accounts with the given type for the asset.
func (*BrokerStub) GetRewards ¶
func (b *BrokerStub) GetRewards(epochSeq string) map[AssetParty]events.RewardPayout
func (*BrokerStub) GetSettleDistressed ¶ added in v0.71.0
func (b *BrokerStub) GetSettleDistressed() []events.SettleDistressed
func (*BrokerStub) GetStakingRewardAccount ¶ added in v0.73.0
func (b *BrokerStub) GetStakingRewardAccount(asset string) (vegapb.Account, error)
func (*BrokerStub) GetStopByReference ¶ added in v0.72.0
func (b *BrokerStub) GetStopByReference(party, ref string) (eventspb.StopOrderEvent, error)
func (*BrokerStub) GetStopOrderEvents ¶ added in v0.72.0
func (b *BrokerStub) GetStopOrderEvents() []events.StopOrder
func (*BrokerStub) GetTradeEvents ¶
func (b *BrokerStub) GetTradeEvents() []events.Trade
func (*BrokerStub) GetTrades ¶
func (b *BrokerStub) GetTrades() []vegapb.Trade
func (*BrokerStub) GetTransfers ¶ added in v0.68.0
func (b *BrokerStub) GetTransfers(mutable bool) []*vegapb.LedgerEntry
GetTransfers returns ledger entries, mutable argument specifies if these should be all the scenario events or events that can be cleared by the user.
func (*BrokerStub) GetTxErrors ¶
func (b *BrokerStub) GetTxErrors() []events.TxErr
func (*BrokerStub) GetValidatorScores ¶
func (b *BrokerStub) GetValidatorScores(epochSeq string) map[string]events.ValidatorScore
func (*BrokerStub) GetWithdrawals ¶ added in v0.68.0
func (b *BrokerStub) GetWithdrawals() []vegapb.Withdrawal
func (*BrokerStub) PartyActivityStreaks ¶ added in v0.73.0
func (b *BrokerStub) PartyActivityStreaks() []eventspb.PartyActivityStreak
func (*BrokerStub) ReferralSetStats ¶ added in v0.73.0
func (b *BrokerStub) ReferralSetStats() []*types.ReferralSetStats
func (*BrokerStub) Reset ¶
func (b *BrokerStub) Reset()
func (*BrokerStub) ResetType ¶
func (b *BrokerStub) ResetType(t events.Type)
func (*BrokerStub) Send ¶
func (b *BrokerStub) Send(e events.Event)
func (*BrokerStub) SendBatch ¶
func (b *BrokerStub) SendBatch(evts []events.Event)
func (*BrokerStub) SetStreaming ¶
func (b *BrokerStub) SetStreaming(v bool) bool
func (*BrokerStub) Subscribe ¶
func (b *BrokerStub) Subscribe(sub broker.Subscriber) int
func (*BrokerStub) SubscribeBatch ¶
func (b *BrokerStub) SubscribeBatch(subs ...broker.Subscriber)
func (*BrokerStub) Unsubscribe ¶
func (b *BrokerStub) Unsubscribe(k int)
func (*BrokerStub) VestingStats ¶ added in v0.73.0
func (b *BrokerStub) VestingStats() []eventspb.VestingStatsUpdated
func (*BrokerStub) VolumeDiscountStats ¶ added in v0.73.0
func (b *BrokerStub) VolumeDiscountStats() []eventspb.VolumeDiscountStatsUpdated
type CommanderStub ¶
type CommanderStub struct{}
func NewCommanderStub ¶
func NewCommanderStub() *CommanderStub
func (*CommanderStub) CommandSync ¶
type ReferralDiscountRewardService ¶ added in v0.73.0
type ReferralDiscountRewardService struct{}
func (*ReferralDiscountRewardService) GetReferrer ¶ added in v0.73.0
func (*ReferralDiscountRewardService) ReferralDiscountFactorForParty ¶ added in v0.73.0
func (*ReferralDiscountRewardService) ReferralDiscountFactorForParty(party types.PartyID) num.Decimal
func (*ReferralDiscountRewardService) RewardsFactorMultiplierAppliedForParty ¶ added in v0.73.0
func (*ReferralDiscountRewardService) RewardsFactorMultiplierAppliedForParty(party types.PartyID) num.Decimal
type StakingAccountStub ¶
type StakingAccountStub struct {
// contains filtered or unexported fields
}
func NewStakingAccountStub ¶
func NewStakingAccountStub() *StakingAccountStub
func (*StakingAccountStub) DecrementBalance ¶
func (t *StakingAccountStub) DecrementBalance(party string, amount *num.Uint) error
func (*StakingAccountStub) GetAvailableBalance ¶
func (t *StakingAccountStub) GetAvailableBalance(party string) (*num.Uint, error)
func (*StakingAccountStub) GetAvailableBalanceInRange ¶
func (*StakingAccountStub) IncrementBalance ¶
func (t *StakingAccountStub) IncrementBalance(party string, amount *num.Uint) error
func (*StakingAccountStub) OnEpochEvent ¶
func (t *StakingAccountStub) OnEpochEvent(ctx context.Context, epoch types.Epoch)
func (*StakingAccountStub) OnEpochRestore ¶
func (t *StakingAccountStub) OnEpochRestore(_ context.Context, _ types.Epoch)
type StateVarStub ¶
type StateVarStub struct {
// contains filtered or unexported fields
}
func NewStateVar ¶
func NewStateVar() *StateVarStub
func (*StateVarStub) NewEvent ¶
func (e *StateVarStub) NewEvent(asset, market string, eventType statevar.EventType)
func (*StateVarStub) OnFloatingPointUpdatesDurationUpdate ¶
func (*StateVarStub) ReadyForTimeTrigger ¶
func (e *StateVarStub) ReadyForTimeTrigger(asset, mktID string)
func (*StateVarStub) RegisterStateVariable ¶
func (e *StateVarStub) RegisterStateVariable(asset, market, name string, converter statevar.Converter, startCalculation func(string, statevar.FinaliseCalculation), trigger []statevar.EventType, result func(context.Context, statevar.StateVariableResult) error) error
func (*StateVarStub) UnregisterStateVariable ¶
func (e *StateVarStub) UnregisterStateVariable(asset, market string)
type TimeStub ¶
type TimeStub struct {
// contains filtered or unexported fields
}
func NewTimeStub ¶
func NewTimeStub() *TimeStub
func (*TimeStub) GetTimeNow ¶
func (*TimeStub) NotifyOnTick ¶
type TopologyStub ¶
type TopologyStub struct {
// contains filtered or unexported fields
}
func NewTopologyStub ¶
func NewTopologyStub(nodeID string, broker *BrokerStub) *TopologyStub
func (*TopologyStub) AddValidator ¶
func (ts *TopologyStub) AddValidator(node string, pubkey string)
func (*TopologyStub) AllNodeIDs ¶
func (ts *TopologyStub) AllNodeIDs() []string
func (*TopologyStub) AllVegaPubKeys ¶
func (ts *TopologyStub) AllVegaPubKeys() []string
func (*TopologyStub) Get ¶
func (ts *TopologyStub) Get(key string) *validators.ValidatorData
func (*TopologyStub) GetRewardsScores ¶
func (ts *TopologyStub) GetRewardsScores(ctx context.Context, epochSeq string, delegationState []*types.ValidatorData, stakeScoreParams types.StakeScoreParams) (*types.ScoreData, *types.ScoreData)
func (*TopologyStub) GetTotalVotingPower ¶ added in v0.64.0
func (*TopologyStub) GetTotalVotingPower() int64
func (*TopologyStub) GetVotingPower ¶ added in v0.64.0
func (*TopologyStub) GetVotingPower(pubkey string) int64
func (*TopologyStub) IsTendermintValidator ¶
func (ts *TopologyStub) IsTendermintValidator(pubKey string) bool
func (*TopologyStub) IsValidator ¶
func (ts *TopologyStub) IsValidator() bool
func (*TopologyStub) IsValidatorNodeID ¶
func (ts *TopologyStub) IsValidatorNodeID(nodeID string) bool
func (*TopologyStub) IsValidatorVegaPubKey ¶
func (ts *TopologyStub) IsValidatorVegaPubKey(pubKey string) bool
func (*TopologyStub) Len ¶
func (ts *TopologyStub) Len() int
func (*TopologyStub) OnMinDelegationUpdated ¶
func (*TopologyStub) RecalcValidatorSet ¶
func (ts *TopologyStub) RecalcValidatorSet(ctx context.Context, epochSeq string, delegationState []*types.ValidatorData, stakeScoreParams types.StakeScoreParams) []*types.PartyContributionScore
func (*TopologyStub) SelfNodeID ¶
func (ts *TopologyStub) SelfNodeID() string
func (*TopologyStub) SelfVegaPubKey ¶
func (ts *TopologyStub) SelfVegaPubKey() string
func (*TopologyStub) ValidatorPerformanceScore ¶
func (ts *TopologyStub) ValidatorPerformanceScore(nodeID string) num.Decimal
type VolumeDiscountService ¶ added in v0.73.0
type VolumeDiscountService struct{}
func (*VolumeDiscountService) VolumeDiscountFactorForParty ¶ added in v0.73.0
func (*VolumeDiscountService) VolumeDiscountFactorForParty(party types.PartyID) num.Decimal