Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultPoolID = uint64(1)
Variables ¶
View Source
var ( // Concentrated liquidity constants ETH = apptesting.ETH USDC = apptesting.USDC USDT = "usdt" Denom0 = ETH Denom1 = USDC DefaultCurrentTick = apptesting.DefaultCurrTick DefaultAmt0 = apptesting.DefaultAmt0 DefaultAmt1 = apptesting.DefaultAmt1 DefaultCoin0 = apptesting.DefaultCoin0 DefaultCoin1 = apptesting.DefaultCoin1 DefaultLiquidityAmt = apptesting.DefaultLiquidityAmt // router specific variables DefaultTickModel = &domain.TickModel{ Ticks: []domain.LiquidityDepthsWithRange{}, CurrentTickIndex: 0, HasNoLiquidity: false, } NoTakerFee = osmomath.ZeroDec() DefaultTakerFee = osmomath.MustNewDecFromStr("0.002") DefaultPoolBalances = sdk.NewCoins( sdk.NewCoin(DenomOne, DefaultAmt0), sdk.NewCoin(DenomTwo, DefaultAmt1), ) DefaultSpreadFactor = osmomath.MustNewDecFromStr("0.005") DefaultPool = &mocks.MockRoutablePool{ ID: DefaultPoolID, Denoms: []string{DenomOne, DenomTwo}, TotalValueLockedUSDC: osmomath.NewInt(10), PoolType: poolmanagertypes.Balancer, Balances: DefaultPoolBalances, TakerFee: DefaultTakerFee, SpreadFactor: DefaultSpreadFactor, } EmptyRoute = route.RouteImpl{} // Test denoms DenomOne = denomNum(1) DenomTwo = denomNum(2) DenomThree = denomNum(3) DenomFour = denomNum(4) DenomFive = denomNum(5) DenomSix = denomNum(6) )
Functions ¶
func WithCandidateRoutePools ¶
func WithCandidateRoutePools(r route.CandidateRoute, pools []route.CandidatePool) route.CandidateRoute
Note that it does not deep copy pools
func WithRoutePools ¶
Note that it does not deep copy pools
Types ¶
type RouterTestHelper ¶
type RouterTestHelper struct {
apptesting.ConcentratedKeeperTestHelper
}
func (*RouterTestHelper) ValidateRoutePools ¶
func (s *RouterTestHelper) ValidateRoutePools(expectedPools []domain.RoutablePool, actualPools []domain.RoutablePool)
ValidateRoutePools validates that the expected pools are equal to the actual pools. Specifically, validates the following fields: - ID - Type - Balances - Spread Factor - Token Out Denom - Taker Fee
Click to show internal directories.
Click to hide internal directories.