Documentation ¶
Index ¶
- func AMMShouldBeEqual(pair asset.Pair, ammCheckers ...AMMChecker) ammShouldBeEqual
- func ContainsLiquidateEvent(expectedEvent *types.LiquidationFailedEvent) action.Action
- func MarketShouldBeEqual(pair asset.Pair, marketCheckers ...MarketChecker) marketShouldBeEqual
- func ModuleBalanceShouldBeEqualTo(module string, expectedBalance sdk.Coins) action.Action
- func PositionChangedEventShouldBeEqual(expectedEvent *types.PositionChangedEvent) action.Action
- func PositionNotionalTWAPShouldBeEqualTo(pair asset.Pair, trader sdk.AccAddress, twapLookbackWindow time.Duration, ...) action.Action
- func PositionShouldBeEqual(account sdk.AccAddress, pair asset.Pair, positionCheckers ...PositionChecker) action.Action
- func PositionShouldNotExist(account sdk.AccAddress, pair asset.Pair) action.Action
- func TwapShouldBe(pair asset.Pair, twapCalcOpt types.TwapCalcOption, dir types.Direction, ...) action.Action
- type AMMChecker
- func AMM_BaseReserveShouldBeEqual(expectedBaseReserve sdk.Dec) AMMChecker
- func AMM_BiasShouldBeEqual(expectedBias sdk.Dec) AMMChecker
- func AMM_PriceMultiplierShouldBeEqual(expectedPriceMultiplier sdk.Dec) AMMChecker
- func AMM_QuoteReserveShouldBeEqual(expectedQuoteReserve sdk.Dec) AMMChecker
- func AMM_SqrtDepthShouldBeEqual(expectedSqrtDepth sdk.Dec) AMMChecker
- func AMM_SwapInvariantShouldBeEqual(expectedSwapInvariant sdk.Dec) AMMChecker
- type MarketChecker
- type PositionChecker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AMMShouldBeEqual ¶
func AMMShouldBeEqual(pair asset.Pair, ammCheckers ...AMMChecker) ammShouldBeEqual
func ContainsLiquidateEvent ¶ added in v0.21.4
func ContainsLiquidateEvent( expectedEvent *types.LiquidationFailedEvent, ) action.Action
ContainsLiquidateEvent checks if a typed event (proto.Message) is contained in the event manager of the app context.
func MarketShouldBeEqual ¶
func MarketShouldBeEqual(pair asset.Pair, marketCheckers ...MarketChecker) marketShouldBeEqual
func PositionChangedEventShouldBeEqual ¶
func PositionChangedEventShouldBeEqual( expectedEvent *types.PositionChangedEvent, ) action.Action
PositionChangedEventShouldBeEqual checks that the position changed event is equal to the expected event.
func PositionShouldBeEqual ¶
func PositionShouldBeEqual( account sdk.AccAddress, pair asset.Pair, positionCheckers ...PositionChecker, ) action.Action
func PositionShouldNotExist ¶
Types ¶
type AMMChecker ¶
func AMM_BaseReserveShouldBeEqual ¶
func AMM_BaseReserveShouldBeEqual(expectedBaseReserve sdk.Dec) AMMChecker
func AMM_BiasShouldBeEqual ¶
func AMM_BiasShouldBeEqual(expectedBias sdk.Dec) AMMChecker
func AMM_PriceMultiplierShouldBeEqual ¶
func AMM_PriceMultiplierShouldBeEqual(expectedPriceMultiplier sdk.Dec) AMMChecker
func AMM_QuoteReserveShouldBeEqual ¶
func AMM_QuoteReserveShouldBeEqual(expectedQuoteReserve sdk.Dec) AMMChecker
func AMM_SqrtDepthShouldBeEqual ¶
func AMM_SqrtDepthShouldBeEqual(expectedSqrtDepth sdk.Dec) AMMChecker
func AMM_SwapInvariantShouldBeEqual ¶
func AMM_SwapInvariantShouldBeEqual(expectedSwapInvariant sdk.Dec) AMMChecker
type MarketChecker ¶
func Market_EnableShouldBeEqualTo ¶
func Market_EnableShouldBeEqualTo(expectedEnabled bool) MarketChecker
func Market_LatestCPFShouldBeEqualTo ¶
func Market_LatestCPFShouldBeEqualTo(expectedCPF sdk.Dec) MarketChecker
func Market_PrepaidBadDebtShouldBeEqualTo ¶
func Market_PrepaidBadDebtShouldBeEqualTo(expectedAmount sdkmath.Int) MarketChecker
type PositionChecker ¶
func Position_PositionShouldBeEqualTo ¶
func Position_PositionShouldBeEqualTo(expectedPosition types.Position) PositionChecker
Position_PositionShouldBeEqualTo checks if the position is equal to the expected position
func Position_PositionSizeShouldBeEqualTo ¶
func Position_PositionSizeShouldBeEqualTo(expectedSize sdk.Dec) PositionChecker
Position_PositionSizeShouldBeEqualTo checks if the position size is equal to the expected position size
Click to show internal directories.
Click to hide internal directories.