Documentation ¶
Index ¶
- func AssertEqual(t *testing.T, exp, got any)
- type TestSuite
- func (s *TestSuite) AddLiquidity(ownerAddr sdk.AccAddress, poolId uint64, lowerPrice, upperPrice sdk.Dec, ...) (position ammtypes.Position, liquidity sdk.Int, amt sdk.Coins)
- func (s *TestSuite) AddLiquidityByLiquidity(ownerAddr sdk.AccAddress, poolId uint64, lowerPrice, upperPrice sdk.Dec, ...) (position ammtypes.Position, liquidity sdk.Int, amt sdk.Coins)
- func (s *TestSuite) AdvanceRewardsAuctions()
- func (s *TestSuite) AssertEqual(exp, got any)
- func (s *TestSuite) BeginBlock(blockTimeDelta time.Duration)
- func (s *TestSuite) BurnShare(senderAddr sdk.AccAddress, publicPositionId uint64, share sdk.Coin) (removedLiquidity sdk.Int, position ammtypes.Position, amt sdk.Coins)
- func (s *TestSuite) CancelAllOrders(ordererAddr sdk.AccAddress, marketId uint64) (orders []exchangetypes.Order)
- func (s *TestSuite) CancelOrder(ordererAddr sdk.AccAddress, orderId uint64) (order exchangetypes.Order)
- func (s *TestSuite) CheckEvent(evtType proto.Message, attrs map[string][]byte)
- func (s *TestSuite) Collect(ownerAddr sdk.AccAddress, positionId uint64, amt sdk.Coins)
- func (s *TestSuite) CollectibleCoins(positionId uint64) (fee, farmingRewards sdk.Coins)
- func (s *TestSuite) CreateMarket(baseDenom, quoteDenom string) exchangetypes.Market
- func (s *TestSuite) CreatePool(marketId uint64, price sdk.Dec) ammtypes.Pool
- func (s *TestSuite) CreatePrivateFarmingPlan(creatorAddr sdk.AccAddress, description string, termAddr sdk.AccAddress, ...) (plan ammtypes.FarmingPlan)
- func (s *TestSuite) CreatePublicFarmingPlan(description string, farmingPoolAddr sdk.AccAddress, termAddr sdk.AccAddress, ...) (plan ammtypes.FarmingPlan)
- func (s *TestSuite) CreatePublicPosition(poolId uint64, lowerPrice, upperPrice sdk.Dec, minBidAmt sdk.Int, ...) (publicPosition liquidammtypes.PublicPosition)
- func (s *TestSuite) EndBlock()
- func (s *TestSuite) FundAccount(addr sdk.AccAddress, amt sdk.Coins)
- func (s *TestSuite) FundedAccount(addrNum int, amt sdk.Coins) sdk.AccAddress
- func (s *TestSuite) GetAllBalances(addr sdk.AccAddress) sdk.Coins
- func (s *TestSuite) GetBalance(addr sdk.AccAddress, denom string) sdk.Coin
- func (s *TestSuite) MakeLastPrice(marketId uint64, ordererAddr sdk.AccAddress, lastPrice sdk.Dec)
- func (s *TestSuite) MintShare(senderAddr sdk.AccAddress, publicPositionId uint64, desiredAmt sdk.Coins, ...) (mintedShare sdk.Coin, position ammtypes.Position, liquidity sdk.Int, ...)
- func (s *TestSuite) NextBlock()
- func (s *TestSuite) PlaceBatchLimitOrder(marketId uint64, ordererAddr sdk.AccAddress, isBuy bool, price, qty sdk.Dec, ...) (order exchangetypes.Order)
- func (s *TestSuite) PlaceBid(bidderAddr sdk.AccAddress, publicPositionId, auctionId uint64, share sdk.Coin) (bid liquidammtypes.Bid)
- func (s *TestSuite) PlaceLimitOrder(marketId uint64, ordererAddr sdk.AccAddress, isBuy bool, price, qty sdk.Dec, ...) (orderId uint64, order exchangetypes.Order, ...)
- func (s *TestSuite) PlaceMMBatchLimitOrder(marketId uint64, ordererAddr sdk.AccAddress, isBuy bool, price, qty sdk.Dec, ...) (order exchangetypes.Order)
- func (s *TestSuite) PlaceMMLimitOrder(marketId uint64, ordererAddr sdk.AccAddress, isBuy bool, price, qty sdk.Dec, ...) (orderId uint64, order exchangetypes.Order, ...)
- func (s *TestSuite) PlaceMarketOrder(marketId uint64, ordererAddr sdk.AccAddress, isBuy bool, qty sdk.Dec) (orderId uint64, res exchangetypes.ExecuteOrderResult)
- func (s *TestSuite) RemoveLiquidity(ownerAddr sdk.AccAddress, positionId uint64, liquidity sdk.Int) (position ammtypes.Position, amt sdk.Coins)
- func (s *TestSuite) SetupTest()
- func (s *TestSuite) SwapExactAmountIn(ordererAddr sdk.AccAddress, routes []uint64, input, minOutput sdk.DecCoin, ...) (output sdk.DecCoin, results []exchangetypes.SwapRouteResult)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEqual ¶
Types ¶
type TestSuite ¶
func (*TestSuite) AddLiquidity ¶
func (*TestSuite) AddLiquidityByLiquidity ¶
func (*TestSuite) AdvanceRewardsAuctions ¶
func (s *TestSuite) AdvanceRewardsAuctions()
func (*TestSuite) AssertEqual ¶
func (*TestSuite) BeginBlock ¶
func (*TestSuite) CancelAllOrders ¶
func (s *TestSuite) CancelAllOrders(ordererAddr sdk.AccAddress, marketId uint64) (orders []exchangetypes.Order)
func (*TestSuite) CancelOrder ¶
func (s *TestSuite) CancelOrder(ordererAddr sdk.AccAddress, orderId uint64) (order exchangetypes.Order)
func (*TestSuite) CheckEvent ¶
func (*TestSuite) CollectibleCoins ¶
func (*TestSuite) CreateMarket ¶
func (s *TestSuite) CreateMarket(baseDenom, quoteDenom string) exchangetypes.Market
func (*TestSuite) CreatePool ¶
func (*TestSuite) CreatePrivateFarmingPlan ¶
func (s *TestSuite) CreatePrivateFarmingPlan(creatorAddr sdk.AccAddress, description string, termAddr sdk.AccAddress, rewardAllocs []ammtypes.FarmingRewardAllocation, startTime, endTime time.Time, initialFunds sdk.Coins, fundFee bool) (plan ammtypes.FarmingPlan)
func (*TestSuite) CreatePublicFarmingPlan ¶
func (s *TestSuite) CreatePublicFarmingPlan(description string, farmingPoolAddr sdk.AccAddress, termAddr sdk.AccAddress, rewardAllocs []ammtypes.FarmingRewardAllocation, startTime, endTime time.Time) (plan ammtypes.FarmingPlan)
func (*TestSuite) CreatePublicPosition ¶
func (s *TestSuite) CreatePublicPosition(poolId uint64, lowerPrice, upperPrice sdk.Dec, minBidAmt sdk.Int, feeRate sdk.Dec) (publicPosition liquidammtypes.PublicPosition)
func (*TestSuite) FundAccount ¶
func (s *TestSuite) FundAccount( addr sdk.AccAddress, amt sdk.Coins)
func (*TestSuite) FundedAccount ¶
func (*TestSuite) GetAllBalances ¶
func (s *TestSuite) GetAllBalances(addr sdk.AccAddress) sdk.Coins
func (*TestSuite) GetBalance ¶
func (*TestSuite) MakeLastPrice ¶
func (*TestSuite) PlaceBatchLimitOrder ¶
func (*TestSuite) PlaceBid ¶
func (s *TestSuite) PlaceBid(bidderAddr sdk.AccAddress, publicPositionId, auctionId uint64, share sdk.Coin) (bid liquidammtypes.Bid)
func (*TestSuite) PlaceLimitOrder ¶
func (s *TestSuite) PlaceLimitOrder( marketId uint64, ordererAddr sdk.AccAddress, isBuy bool, price, qty sdk.Dec, lifespan time.Duration) (orderId uint64, order exchangetypes.Order, res exchangetypes.ExecuteOrderResult)
func (*TestSuite) PlaceMMBatchLimitOrder ¶
func (*TestSuite) PlaceMMLimitOrder ¶
func (s *TestSuite) PlaceMMLimitOrder( marketId uint64, ordererAddr sdk.AccAddress, isBuy bool, price, qty sdk.Dec, lifespan time.Duration) (orderId uint64, order exchangetypes.Order, res exchangetypes.ExecuteOrderResult)
func (*TestSuite) PlaceMarketOrder ¶
func (s *TestSuite) PlaceMarketOrder( marketId uint64, ordererAddr sdk.AccAddress, isBuy bool, qty sdk.Dec) (orderId uint64, res exchangetypes.ExecuteOrderResult)
func (*TestSuite) RemoveLiquidity ¶
func (*TestSuite) SwapExactAmountIn ¶
func (s *TestSuite) SwapExactAmountIn( ordererAddr sdk.AccAddress, routes []uint64, input, minOutput sdk.DecCoin, simulate bool) (output sdk.DecCoin, results []exchangetypes.SwapRouteResult)
Click to show internal directories.
Click to hide internal directories.