@paraswap/dex-lib 2.50.3 → 2.50.4-angle-staked.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/abi/Redstone.json +739 -0
- package/build/abi/angle/stagToken.json +963 -0
- package/build/{dex/lighter-v1/abi/erc20.json → abi/angle-transmuter/MorphoOracle.json} +97 -126
- package/build/abi/angle-transmuter/MorphoVault.json +2506 -0
- package/build/abi/angle-transmuter/Pyth.json +1534 -0
- package/build/abi/angle-transmuter/Transmuter.json +1711 -0
- package/build/abi/pharaoh/PharaohPool.abi.json +1582 -0
- package/build/abi/smardex/smardex-factory.json +185 -0
- package/build/abi/smardex/smardex-pool.json +578 -0
- package/build/abi/smardex/smardex-router.json +648 -0
- package/build/abi/trader-joe-v2_1/FactoryABI.json +1208 -0
- package/build/abi/trader-joe-v2_1/PairABI.json +1493 -0
- package/build/abi/trader-joe-v2_1/RouterABI.json +1489 -0
- package/build/abi/trader-joe-v2_1/StateMulticall.json +193 -0
- package/build/abi/{integral/relayer.json → wombat/pool.json} +587 -446
- package/build/config.js +12 -9
- package/build/config.js.map +1 -1
- package/build/dex/angle-staked-stable/angle-staked-stable-pool.d.ts +55 -0
- package/build/dex/angle-staked-stable/angle-staked-stable-pool.js +183 -0
- package/build/dex/angle-staked-stable/angle-staked-stable-pool.js.map +1 -0
- package/build/dex/angle-staked-stable/angle-staked-stable.d.ts +50 -0
- package/build/dex/angle-staked-stable/angle-staked-stable.js +228 -0
- package/build/dex/angle-staked-stable/angle-staked-stable.js.map +1 -0
- package/build/dex/{woo-fi → angle-staked-stable}/config.d.ts +1 -1
- package/build/dex/angle-staked-stable/config.js +139 -0
- package/build/dex/angle-staked-stable/config.js.map +1 -0
- package/build/dex/angle-staked-stable/types.d.ts +15 -0
- package/build/dex/angle-staked-stable/types.js.map +1 -0
- package/build/dex/angle-transmuter/angle-transmuter-pool.d.ts +61 -0
- package/build/dex/angle-transmuter/angle-transmuter-pool.js +415 -0
- package/build/dex/angle-transmuter/angle-transmuter-pool.js.map +1 -0
- package/build/dex/{lighter-v1/lighter-v1.d.ts → angle-transmuter/angle-transmuter.d.ts} +31 -17
- package/build/dex/angle-transmuter/angle-transmuter.js +262 -0
- package/build/dex/angle-transmuter/angle-transmuter.js.map +1 -0
- package/build/dex/angle-transmuter/backedOracle.d.ts +19 -0
- package/build/dex/angle-transmuter/backedOracle.js +56 -0
- package/build/dex/angle-transmuter/backedOracle.js.map +1 -0
- package/build/dex/{ramses-v2 → angle-transmuter}/config.d.ts +1 -1
- package/build/dex/angle-transmuter/config.js +30 -0
- package/build/dex/angle-transmuter/config.js.map +1 -0
- package/build/dex/angle-transmuter/constants.d.ts +77 -0
- package/build/dex/angle-transmuter/constants.js +94 -0
- package/build/dex/angle-transmuter/constants.js.map +1 -0
- package/build/dex/{integral/integral-pool.d.ts → angle-transmuter/morphoOracle.d.ts} +15 -12
- package/build/dex/angle-transmuter/morphoOracle.js +179 -0
- package/build/dex/angle-transmuter/morphoOracle.js.map +1 -0
- package/build/dex/angle-transmuter/morphoVault.d.ts +19 -0
- package/build/dex/angle-transmuter/morphoVault.js +78 -0
- package/build/dex/angle-transmuter/morphoVault.js.map +1 -0
- package/build/dex/angle-transmuter/pyth.d.ts +19 -0
- package/build/dex/angle-transmuter/pyth.js +70 -0
- package/build/dex/angle-transmuter/pyth.js.map +1 -0
- package/build/dex/angle-transmuter/redstone.d.ts +20 -0
- package/build/dex/angle-transmuter/redstone.js +73 -0
- package/build/dex/angle-transmuter/redstone.js.map +1 -0
- package/build/dex/angle-transmuter/transmuter.d.ts +52 -0
- package/build/dex/angle-transmuter/transmuter.js +374 -0
- package/build/dex/angle-transmuter/transmuter.js.map +1 -0
- package/build/dex/angle-transmuter/types.d.ts +188 -0
- package/build/dex/angle-transmuter/types.js +33 -0
- package/build/dex/angle-transmuter/types.js.map +1 -0
- package/build/dex/angle-transmuter/utils.d.ts +9 -0
- package/build/dex/angle-transmuter/utils.js +252 -0
- package/build/dex/angle-transmuter/utils.js.map +1 -0
- package/build/dex/curve-v1-factory/config.js +7 -7
- package/build/dex/curve-v1-factory/config.js.map +1 -1
- package/build/dex/curve-v1-factory/constants.d.ts +0 -1
- package/build/dex/curve-v1-factory/constants.js +1 -2
- package/build/dex/curve-v1-factory/constants.js.map +1 -1
- package/build/dex/index.js +2 -0
- package/build/dex/index.js.map +1 -1
- package/build/dex/smardex/subgraph-queries.d.ts +1 -0
- package/build/dex/smardex/subgraph-queries.js +17 -0
- package/build/dex/smardex/subgraph-queries.js.map +1 -0
- package/build/dex/smardex/usd-reserves.d.ts +23 -0
- package/build/dex/smardex/usd-reserves.js +86 -0
- package/build/dex/smardex/usd-reserves.js.map +1 -0
- package/build/dex/{integral → trader-joe-v2-1-2}/config.d.ts +1 -1
- package/build/dex/trader-joe-v2-1-2/config.js +47 -0
- package/build/dex/trader-joe-v2-1-2/config.js.map +1 -0
- package/build/dex/trader-joe-v2-1-2/constants.d.ts +20 -0
- package/build/dex/trader-joe-v2-1-2/constants.js +22 -0
- package/build/dex/trader-joe-v2-1-2/constants.js.map +1 -0
- package/build/dex/trader-joe-v2-1-2/math/index.d.ts +37 -0
- package/build/dex/trader-joe-v2-1-2/math/index.js +291 -0
- package/build/dex/trader-joe-v2-1-2/math/index.js.map +1 -0
- package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2-pool.d.ts +60 -0
- package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2-pool.js +248 -0
- package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2-pool.js.map +1 -0
- package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2.d.ts +53 -0
- package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2.js +307 -0
- package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2.js.map +1 -0
- package/build/dex/trader-joe-v2-1-2/types.d.ts +82 -0
- package/build/dex/trader-joe-v2-1-2/types.js +9 -0
- package/build/dex/trader-joe-v2-1-2/types.js.map +1 -0
- package/build/dex/{lighter-v1 → trader-joe-v2_1}/config.d.ts +1 -1
- package/build/dex/trader-joe-v2_1/config.js +47 -0
- package/build/dex/trader-joe-v2_1/config.js.map +1 -0
- package/build/dex/trader-joe-v2_1/constants.d.ts +20 -0
- package/build/dex/trader-joe-v2_1/constants.js +22 -0
- package/build/dex/trader-joe-v2_1/constants.js.map +1 -0
- package/build/dex/trader-joe-v2_1/math/index.d.ts +37 -0
- package/build/dex/trader-joe-v2_1/math/index.js +291 -0
- package/build/dex/trader-joe-v2_1/math/index.js.map +1 -0
- package/build/dex/trader-joe-v2_1/trader-joe-v2.1.d.ts +0 -0
- package/build/dex/trader-joe-v2_1/trader-joe-v2.1.js +384 -0
- package/build/dex/trader-joe-v2_1/trader-joe-v2.1.js.map +1 -0
- package/build/dex/trader-joe-v2_1/trader-joe-v2_1-pool.d.ts +60 -0
- package/build/dex/trader-joe-v2_1/trader-joe-v2_1-pool.js +247 -0
- package/build/dex/trader-joe-v2_1/trader-joe-v2_1-pool.js.map +1 -0
- package/build/dex/trader-joe-v2_1/trader-joe-v2_1.d.ts +53 -0
- package/build/dex/trader-joe-v2_1/trader-joe-v2_1.js +307 -0
- package/build/dex/trader-joe-v2_1/trader-joe-v2_1.js.map +1 -0
- package/build/dex/trader-joe-v2_1/types.d.ts +82 -0
- package/build/dex/trader-joe-v2_1/types.js +9 -0
- package/build/dex/trader-joe-v2_1/types.js.map +1 -0
- package/build/dex/wombat/wombat-pool-poller.d.ts +22 -0
- package/build/dex/wombat/wombat-pool-poller.js +164 -0
- package/build/dex/wombat/wombat-pool-poller.js.map +1 -0
- package/build/dex/woo-fi-v2/config.js +4 -4
- package/build/dex-helper/Cache.d.ts +31 -0
- package/build/dex-helper/Cache.js +106 -0
- package/build/dex-helper/Cache.js.map +1 -0
- package/build/dex-helper/RedisBatcher.d.ts +20 -0
- package/build/dex-helper/RedisBatcher.js +75 -0
- package/build/dex-helper/RedisBatcher.js.map +1 -0
- package/build/dex-helper/RedisWrapper.d.ts +37 -0
- package/build/dex-helper/RedisWrapper.js +165 -0
- package/build/dex-helper/RedisWrapper.js.map +1 -0
- package/package.json +1 -1
- package/src/abi/angle/stagToken.json +963 -0
- package/src/config.ts +12 -9
- package/src/dex/angle-staked-stable/angle-staked-stable-e2e.test.ts +146 -0
- package/src/dex/angle-staked-stable/angle-staked-stable-events.test.ts +95 -0
- package/src/dex/angle-staked-stable/angle-staked-stable-integration.test.ts +474 -0
- package/src/dex/angle-staked-stable/angle-staked-stable-pool.ts +297 -0
- package/src/dex/angle-staked-stable/angle-staked-stable.ts +314 -0
- package/src/dex/angle-staked-stable/config.ts +139 -0
- package/src/dex/angle-staked-stable/types.ts +16 -0
- package/src/dex/curve-v1-factory/config.ts +8 -8
- package/src/dex/curve-v1-factory/constants.ts +0 -2
- package/src/dex/index.ts +2 -0
- package/src/dex/woo-fi-v2/config.ts +4 -4
- package/tests/constants-e2e.ts +112 -1
- package/.idea/aws.xml +0 -17
- package/.idea/codeStyles/Project.xml +0 -19
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/paraswap-dex-lib.iml +0 -9
- package/.idea/prettier.xml +0 -7
- package/.idea/vcs.xml +0 -6
- package/build/abi/AugustusV6.abi.json +0 -395
- package/build/abi/algebra/AlgebraPool.abi.json +0 -727
- package/build/abi/curve-v1/StableSwapFRXETH.json +0 -889
- package/build/abi/curve-v1/StableSwapWBETH.json +0 -1223
- package/build/abi/sushiswap-v3/QuoterV2.json +0 -267
- package/build/abi/sushiswap-v3/RouterProcessor3.json +0 -289
- package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +0 -193
- package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3QuoterV2.abi.json +0 -285
- package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3Router.abi.json +0 -583
- package/build/abi/wBETH.json +0 -1527
- package/build/abi/woo-fi/WooFeeManager.abi.json +0 -318
- package/build/abi/woo-fi/WooPP.abi.json +0 -548
- package/build/abi/woo-fi/Wooracle.abi.json +0 -260
- package/build/dex/aave-v3/tokens/arbitrum.json +0 -50
- package/build/dex/aave-v3/tokens/avalanche.json +0 -74
- package/build/dex/aave-v3/tokens/fantom.json +0 -62
- package/build/dex/aave-v3/tokens/optimism.json +0 -50
- package/build/dex/aave-v3/tokens/polygon.json +0 -116
- package/build/dex/algebra/algebra-pool.d.ts +0 -114
- package/build/dex/algebra/algebra-pool.js +0 -448
- package/build/dex/algebra/algebra-pool.js.map +0 -1
- package/build/dex/balancer-v2/Gyro3Pool.d.ts +0 -43
- package/build/dex/balancer-v2/Gyro3Pool.js +0 -160
- package/build/dex/balancer-v2/Gyro3Pool.js.map +0 -1
- package/build/dex/balancer-v2/LinearMath.d.ts +0 -88
- package/build/dex/balancer-v2/LinearMath.js +0 -285
- package/build/dex/balancer-v2/LinearMath.js.map +0 -1
- package/build/dex/balancer-v2/LinearPool.d.ts +0 -81
- package/build/dex/balancer-v2/LinearPool.js +0 -444
- package/build/dex/balancer-v2/LinearPool.js.map +0 -1
- package/build/dex/balancer-v2/PhantomStablePool.d.ts +0 -90
- package/build/dex/balancer-v2/PhantomStablePool.js +0 -418
- package/build/dex/balancer-v2/PhantomStablePool.js.map +0 -1
- package/build/dex/balancer-v2/StableMath.d.ts +0 -9
- package/build/dex/balancer-v2/StableMath.js +0 -272
- package/build/dex/balancer-v2/StableMath.js.map +0 -1
- package/build/dex/balancer-v2/balancer-v2-pool.d.ts +0 -140
- package/build/dex/balancer-v2/balancer-v2-pool.js +0 -647
- package/build/dex/balancer-v2/balancer-v2-pool.js.map +0 -1
- package/build/dex/curve-v1/pools/frxETHpool.d.ts +0 -7
- package/build/dex/curve-v1/pools/frxETHpool.js +0 -27
- package/build/dex/curve-v1/pools/frxETHpool.js.map +0 -1
- package/build/dex/curve-v1/pools/wbETHpool.d.ts +0 -29
- package/build/dex/curve-v1/pools/wbETHpool.js +0 -408
- package/build/dex/curve-v1/pools/wbETHpool.js.map +0 -1
- package/build/dex/integral/config.js +0 -18
- package/build/dex/integral/config.js.map +0 -1
- package/build/dex/integral/integral-pool.js +0 -67
- package/build/dex/integral/integral-pool.js.map +0 -1
- package/build/dex/integral/integral.d.ts +0 -48
- package/build/dex/integral/integral.js +0 -402
- package/build/dex/integral/integral.js.map +0 -1
- package/build/dex/integral/types.d.ts +0 -25
- package/build/dex/integral/types.js +0 -9
- package/build/dex/integral/types.js.map +0 -1
- package/build/dex/lighter-v1/abi/factory.json +0 -291
- package/build/dex/lighter-v1/abi/order_book.json +0 -594
- package/build/dex/lighter-v1/abi/order_book_helper.json +0 -176
- package/build/dex/lighter-v1/abi/router.json +0 -488
- package/build/dex/lighter-v1/config.js +0 -17
- package/build/dex/lighter-v1/config.js.map +0 -1
- package/build/dex/lighter-v1/constants.d.ts +0 -2
- package/build/dex/lighter-v1/constants.js +0 -13
- package/build/dex/lighter-v1/constants.js.map +0 -1
- package/build/dex/lighter-v1/lighter-v1-pool.d.ts +0 -57
- package/build/dex/lighter-v1/lighter-v1-pool.js +0 -310
- package/build/dex/lighter-v1/lighter-v1-pool.js.map +0 -1
- package/build/dex/lighter-v1/lighter-v1.js +0 -331
- package/build/dex/lighter-v1/lighter-v1.js.map +0 -1
- package/build/dex/lighter-v1/types.d.ts +0 -40
- package/build/dex/lighter-v1/types.js.map +0 -1
- package/build/dex/pancakeswap-v3/types.d.ts +0 -14
- package/build/dex/pancakeswap-v3/types.js +0 -3
- package/build/dex/pancakeswap-v3/types.js.map +0 -1
- package/build/dex/quickswap/camelot-v3.d.ts +0 -6
- package/build/dex/quickswap/camelot-v3.js +0 -19
- package/build/dex/quickswap/camelot-v3.js.map +0 -1
- package/build/dex/quickswap/zyberswap-v3.d.ts +0 -6
- package/build/dex/quickswap/zyberswap-v3.js +0 -19
- package/build/dex/quickswap/zyberswap-v3.js.map +0 -1
- package/build/dex/quickswap-v3.d.ts +0 -21
- package/build/dex/quickswap-v3.js +0 -40
- package/build/dex/quickswap-v3.js.map +0 -1
- package/build/dex/ramses-v2/config.js +0 -28
- package/build/dex/ramses-v2/config.js.map +0 -1
- package/build/dex/ramses-v2/constants.d.ts +0 -28
- package/build/dex/ramses-v2/constants.js +0 -35
- package/build/dex/ramses-v2/constants.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/BitMath.d.ts +0 -4
- package/build/dex/ramses-v2/contract-math/BitMath.js +0 -93
- package/build/dex/ramses-v2/contract-math/BitMath.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/FixedPoint128.d.ts +0 -3
- package/build/dex/ramses-v2/contract-math/FixedPoint128.js +0 -8
- package/build/dex/ramses-v2/contract-math/FixedPoint128.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/FixedPoint96.d.ts +0 -4
- package/build/dex/ramses-v2/contract-math/FixedPoint96.js +0 -9
- package/build/dex/ramses-v2/contract-math/FixedPoint96.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/FullMath.d.ts +0 -4
- package/build/dex/ramses-v2/contract-math/FullMath.js +0 -19
- package/build/dex/ramses-v2/contract-math/FullMath.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/LiquidityMath.d.ts +0 -3
- package/build/dex/ramses-v2/contract-math/LiquidityMath.js +0 -22
- package/build/dex/ramses-v2/contract-math/LiquidityMath.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/Oracle.d.ts +0 -10
- package/build/dex/ramses-v2/contract-math/Oracle.js +0 -133
- package/build/dex/ramses-v2/contract-math/Oracle.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/SqrtPriceMath.d.ts +0 -10
- package/build/dex/ramses-v2/contract-math/SqrtPriceMath.js +0 -91
- package/build/dex/ramses-v2/contract-math/SqrtPriceMath.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/SwapMath.d.ts +0 -8
- package/build/dex/ramses-v2/contract-math/SwapMath.js +0 -70
- package/build/dex/ramses-v2/contract-math/SwapMath.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/Tick.d.ts +0 -7
- package/build/dex/ramses-v2/contract-math/Tick.js +0 -45
- package/build/dex/ramses-v2/contract-math/Tick.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/TickBitMap.d.ts +0 -8
- package/build/dex/ramses-v2/contract-math/TickBitMap.js +0 -87
- package/build/dex/ramses-v2/contract-math/TickBitMap.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/TickMath.d.ts +0 -8
- package/build/dex/ramses-v2/contract-math/TickMath.js +0 -162
- package/build/dex/ramses-v2/contract-math/TickMath.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/UnsafeMath.d.ts +0 -3
- package/build/dex/ramses-v2/contract-math/UnsafeMath.js +0 -10
- package/build/dex/ramses-v2/contract-math/UnsafeMath.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/uniswap-v3-math.d.ts +0 -18
- package/build/dex/ramses-v2/contract-math/uniswap-v3-math.js +0 -392
- package/build/dex/ramses-v2/contract-math/uniswap-v3-math.js.map +0 -1
- package/build/dex/ramses-v2/contract-math/utils.d.ts +0 -3
- package/build/dex/ramses-v2/contract-math/utils.js +0 -16
- package/build/dex/ramses-v2/contract-math/utils.js.map +0 -1
- package/build/dex/ramses-v2/ramses-v2-pool.d.ts +0 -42
- package/build/dex/ramses-v2/ramses-v2-pool.js +0 -307
- package/build/dex/ramses-v2/ramses-v2-pool.js.map +0 -1
- package/build/dex/ramses-v2/ramses-v2.d.ts +0 -61
- package/build/dex/ramses-v2/ramses-v2.js +0 -690
- package/build/dex/ramses-v2/ramses-v2.js.map +0 -1
- package/build/dex/ramses-v2/types.d.ts +0 -154
- package/build/dex/ramses-v2/types.js +0 -9
- package/build/dex/ramses-v2/types.js.map +0 -1
- package/build/dex/ramses-v2/utils.d.ts +0 -6
- package/build/dex/ramses-v2/utils.js +0 -71
- package/build/dex/ramses-v2/utils.js.map +0 -1
- package/build/dex/solidly/forks-override/fvm.d.ts +0 -20
- package/build/dex/solidly/forks-override/fvm.js +0 -42
- package/build/dex/solidly/forks-override/fvm.js.map +0 -1
- package/build/dex/sushiswap-v3/config.d.ts +0 -4
- package/build/dex/sushiswap-v3/config.js +0 -132
- package/build/dex/sushiswap-v3/config.js.map +0 -1
- package/build/dex/sushiswap-v3/constants.d.ts +0 -4
- package/build/dex/sushiswap-v3/constants.js +0 -32
- package/build/dex/sushiswap-v3/constants.js.map +0 -1
- package/build/dex/sushiswap-v3/sushiswap-v3-original.d.ts +0 -56
- package/build/dex/sushiswap-v3/sushiswap-v3-original.js +0 -598
- package/build/dex/sushiswap-v3/sushiswap-v3-original.js.map +0 -1
- package/build/dex/sushiswap-v3/sushiswap-v3-pool.d.ts +0 -1
- package/build/dex/sushiswap-v3/sushiswap-v3-pool.js +0 -6
- package/build/dex/sushiswap-v3/sushiswap-v3-pool.js.map +0 -1
- package/build/dex/sushiswap-v3/sushiswap-v3.d.ts +0 -21
- package/build/dex/sushiswap-v3/sushiswap-v3.js +0 -58
- package/build/dex/sushiswap-v3/sushiswap-v3.js.map +0 -1
- package/build/dex/sushiswap-v3/token.d.ts +0 -6
- package/build/dex/sushiswap-v3/token.js +0 -23
- package/build/dex/sushiswap-v3/token.js.map +0 -1
- package/build/dex/sushiswap-v3/types.d.ts +0 -15
- package/build/dex/sushiswap-v3/types.js +0 -18
- package/build/dex/sushiswap-v3/types.js.map +0 -1
- package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.d.ts +0 -12
- package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js +0 -23
- package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js.map +0 -1
- package/build/dex/woo-fi/config.js +0 -141
- package/build/dex/woo-fi/config.js.map +0 -1
- package/build/dex/woo-fi/constants.d.ts +0 -5
- package/build/dex/woo-fi/constants.js +0 -20
- package/build/dex/woo-fi/constants.js.map +0 -1
- package/build/dex/woo-fi/types.d.ts +0 -48
- package/build/dex/woo-fi/types.js +0 -3
- package/build/dex/woo-fi/types.js.map +0 -1
- package/build/dex/woo-fi/woo-fi-decimal-math.d.ts +0 -14
- package/build/dex/woo-fi/woo-fi-decimal-math.js +0 -42
- package/build/dex/woo-fi/woo-fi-decimal-math.js.map +0 -1
- package/build/dex/woo-fi/woo-fi-math.d.ts +0 -31
- package/build/dex/woo-fi/woo-fi-math.js +0 -300
- package/build/dex/woo-fi/woo-fi-math.js.map +0 -1
- package/build/dex/woo-fi/woo-fi.d.ts +0 -65
- package/build/dex/woo-fi/woo-fi.js +0 -480
- package/build/dex/woo-fi/woo-fi.js.map +0 -1
- package/build/executor/Executor01BytecodeBuilder.d.ts +0 -77
- package/build/executor/Executor01BytecodeBuilder.js +0 -359
- package/build/executor/Executor01BytecodeBuilder.js.map +0 -1
- package/build/executor/Executor02BytecodeBuilder.d.ts +0 -12
- package/build/executor/Executor02BytecodeBuilder.js +0 -14
- package/build/executor/Executor02BytecodeBuilder.js.map +0 -1
- package/build/executor/ExecutorDetector.d.ts +0 -28
- package/build/executor/ExecutorDetector.js +0 -89
- package/build/executor/ExecutorDetector.js.map +0 -1
- package/build/executor/IExecutorBytecodeBuilder.d.ts +0 -6
- package/build/executor/IExecutorBytecodeBuilder.js +0 -3
- package/build/executor/IExecutorBytecodeBuilder.js.map +0 -1
- package/build/generic-swap-transaction-builder.d.ts +0 -39
- package/build/generic-swap-transaction-builder.js +0 -156
- package/build/generic-swap-transaction-builder.js.map +0 -1
- /package/build/dex/{lighter-v1 → angle-staked-stable}/types.js +0 -0
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
import dotenv from 'dotenv';
|
|
3
|
+
dotenv.config();
|
|
4
|
+
|
|
5
|
+
import { Interface, Result } from '@ethersproject/abi';
|
|
6
|
+
import { DummyDexHelper } from '../../dex-helper/index';
|
|
7
|
+
import { Network, SwapSide } from '../../constants';
|
|
8
|
+
import { BI_POWS } from '../../bigint-constants';
|
|
9
|
+
import { AngleStakedStable } from './angle-staked-stable';
|
|
10
|
+
import {
|
|
11
|
+
checkPoolPrices,
|
|
12
|
+
checkPoolsLiquidity,
|
|
13
|
+
checkConstantPoolPrices,
|
|
14
|
+
} from '../../../tests/utils';
|
|
15
|
+
import { Tokens } from '../../../tests/constants-e2e';
|
|
16
|
+
import { AngleStakedStableEventPool } from './angle-staked-stable-pool';
|
|
17
|
+
|
|
18
|
+
function getReaderCalldata(
|
|
19
|
+
exchangeAddress: string,
|
|
20
|
+
readerIface: Interface,
|
|
21
|
+
amounts: bigint[],
|
|
22
|
+
funcName: string,
|
|
23
|
+
) {
|
|
24
|
+
return amounts.map(amount => ({
|
|
25
|
+
target: exchangeAddress,
|
|
26
|
+
callData: readerIface.encodeFunctionData(funcName, [amount]),
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function decodeReaderResult(
|
|
31
|
+
results: Result,
|
|
32
|
+
readerIface: Interface,
|
|
33
|
+
funcName: string,
|
|
34
|
+
) {
|
|
35
|
+
return results.map(result => {
|
|
36
|
+
const parsed = readerIface.decodeFunctionResult(funcName, result);
|
|
37
|
+
return BigInt(parsed[0]._hex);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async function checkOnChainPricing(
|
|
42
|
+
angleStakedStable: AngleStakedStable,
|
|
43
|
+
funcName: string,
|
|
44
|
+
blockNumber: number,
|
|
45
|
+
exchangeAddress: string,
|
|
46
|
+
prices: bigint[],
|
|
47
|
+
amounts: bigint[],
|
|
48
|
+
) {
|
|
49
|
+
// Normally you can get it from angleStakedStable.Iface or from eventPool.
|
|
50
|
+
// It depends on your implementation
|
|
51
|
+
const readerIface = AngleStakedStableEventPool.angleStakedStableIface;
|
|
52
|
+
|
|
53
|
+
const readerCallData = getReaderCalldata(
|
|
54
|
+
exchangeAddress,
|
|
55
|
+
readerIface,
|
|
56
|
+
amounts.slice(1),
|
|
57
|
+
funcName,
|
|
58
|
+
);
|
|
59
|
+
const readerResult = (
|
|
60
|
+
await angleStakedStable.dexHelper.multiContract.methods
|
|
61
|
+
.aggregate(readerCallData)
|
|
62
|
+
.call({}, blockNumber)
|
|
63
|
+
).returnData;
|
|
64
|
+
|
|
65
|
+
const expectedPrices = [0n].concat(
|
|
66
|
+
decodeReaderResult(readerResult, readerIface, funcName),
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
// No exact computation because of the bigInt approx
|
|
70
|
+
for (let i = 0; i < expectedPrices.length; ++i) {
|
|
71
|
+
expect(prices[i]).toBeGreaterThanOrEqual(
|
|
72
|
+
(expectedPrices[i] * 99999n) / 100000n,
|
|
73
|
+
);
|
|
74
|
+
expect(prices[i]).toBeLessThanOrEqual(
|
|
75
|
+
(expectedPrices[i] * 100001n) / 100000n,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async function testPricingOnNetwork(
|
|
81
|
+
angleStakedStable: AngleStakedStable,
|
|
82
|
+
network: Network,
|
|
83
|
+
dexKey: string,
|
|
84
|
+
blockNumber: number,
|
|
85
|
+
srcTokenSymbol: string,
|
|
86
|
+
destTokenSymbol: string,
|
|
87
|
+
side: SwapSide,
|
|
88
|
+
amounts: bigint[],
|
|
89
|
+
funcNameToCheck: string,
|
|
90
|
+
) {
|
|
91
|
+
const networkTokens = Tokens[network];
|
|
92
|
+
|
|
93
|
+
const pools = await angleStakedStable.getPoolIdentifiers(
|
|
94
|
+
networkTokens[srcTokenSymbol],
|
|
95
|
+
networkTokens[destTokenSymbol],
|
|
96
|
+
side,
|
|
97
|
+
blockNumber,
|
|
98
|
+
);
|
|
99
|
+
console.log(
|
|
100
|
+
`${srcTokenSymbol} <> ${destTokenSymbol} Pool Identifiers: `,
|
|
101
|
+
pools,
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
expect(pools.length).toBeGreaterThan(0);
|
|
105
|
+
|
|
106
|
+
const poolPrices = await angleStakedStable.getPricesVolume(
|
|
107
|
+
networkTokens[srcTokenSymbol],
|
|
108
|
+
networkTokens[destTokenSymbol],
|
|
109
|
+
amounts,
|
|
110
|
+
side,
|
|
111
|
+
blockNumber,
|
|
112
|
+
pools,
|
|
113
|
+
);
|
|
114
|
+
console.log(
|
|
115
|
+
`${srcTokenSymbol} <> ${destTokenSymbol} Pool Prices: `,
|
|
116
|
+
poolPrices,
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
expect(poolPrices).not.toBeNull();
|
|
120
|
+
if (angleStakedStable.hasConstantPriceLargeAmounts) {
|
|
121
|
+
checkConstantPoolPrices(poolPrices!, amounts, dexKey);
|
|
122
|
+
} else {
|
|
123
|
+
checkPoolPrices(poolPrices!, amounts, side, dexKey);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const exchange =
|
|
127
|
+
srcTokenSymbol === 'stEUR' || srcTokenSymbol === 'stUSD'
|
|
128
|
+
? networkTokens[srcTokenSymbol].address
|
|
129
|
+
: networkTokens[destTokenSymbol].address;
|
|
130
|
+
|
|
131
|
+
// Check if onchain pricing equals to calculated ones
|
|
132
|
+
await checkOnChainPricing(
|
|
133
|
+
angleStakedStable,
|
|
134
|
+
funcNameToCheck,
|
|
135
|
+
blockNumber,
|
|
136
|
+
exchange,
|
|
137
|
+
poolPrices![0].prices,
|
|
138
|
+
amounts,
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
describe('AngleStakedStable', () => {
|
|
143
|
+
describe('Mainnet USD', () => {
|
|
144
|
+
let blockNumber: number;
|
|
145
|
+
let angleStakedStable: AngleStakedStable;
|
|
146
|
+
const dexKey = 'AngleStakedStableUSD';
|
|
147
|
+
const network = Network.MAINNET;
|
|
148
|
+
const dexHelper = new DummyDexHelper(network);
|
|
149
|
+
|
|
150
|
+
const tokens = Tokens[network];
|
|
151
|
+
|
|
152
|
+
const srcTokenSymbolUSDEnter = 'USDA';
|
|
153
|
+
const destTokenSymbolUSDEnter = 'stUSD';
|
|
154
|
+
const funcNameSellEnter = 'previewDeposit';
|
|
155
|
+
const funcNameBuyEnter = 'previewMint';
|
|
156
|
+
|
|
157
|
+
const destTokenSymbolUSDExit = 'USDA';
|
|
158
|
+
const srcTokenSymbolUSDExit = 'stUSD';
|
|
159
|
+
const funcNameSellExit = 'previewRedeem';
|
|
160
|
+
const funcNameBuyExit = 'previewWithdraw';
|
|
161
|
+
|
|
162
|
+
const exchangeSTUSD = `${dexKey}_${tokens.stUSD.address.toLowerCase()}`;
|
|
163
|
+
|
|
164
|
+
const amountsForSell = [
|
|
165
|
+
0n,
|
|
166
|
+
1n * BI_POWS[tokens[srcTokenSymbolUSDEnter].decimals],
|
|
167
|
+
2n * BI_POWS[tokens[srcTokenSymbolUSDEnter].decimals],
|
|
168
|
+
3n * BI_POWS[tokens[srcTokenSymbolUSDEnter].decimals],
|
|
169
|
+
4n * BI_POWS[tokens[srcTokenSymbolUSDEnter].decimals],
|
|
170
|
+
5n * BI_POWS[tokens[srcTokenSymbolUSDEnter].decimals],
|
|
171
|
+
6n * BI_POWS[tokens[srcTokenSymbolUSDEnter].decimals],
|
|
172
|
+
7n * BI_POWS[tokens[srcTokenSymbolUSDEnter].decimals],
|
|
173
|
+
8n * BI_POWS[tokens[srcTokenSymbolUSDEnter].decimals],
|
|
174
|
+
9n * BI_POWS[tokens[srcTokenSymbolUSDEnter].decimals],
|
|
175
|
+
10n * BI_POWS[tokens[srcTokenSymbolUSDEnter].decimals],
|
|
176
|
+
];
|
|
177
|
+
|
|
178
|
+
const amountsForBuy = [
|
|
179
|
+
0n,
|
|
180
|
+
1n * BI_POWS[tokens[destTokenSymbolUSDEnter].decimals],
|
|
181
|
+
2n * BI_POWS[tokens[destTokenSymbolUSDEnter].decimals],
|
|
182
|
+
3n * BI_POWS[tokens[destTokenSymbolUSDEnter].decimals],
|
|
183
|
+
4n * BI_POWS[tokens[destTokenSymbolUSDEnter].decimals],
|
|
184
|
+
5n * BI_POWS[tokens[destTokenSymbolUSDEnter].decimals],
|
|
185
|
+
6n * BI_POWS[tokens[destTokenSymbolUSDEnter].decimals],
|
|
186
|
+
7n * BI_POWS[tokens[destTokenSymbolUSDEnter].decimals],
|
|
187
|
+
8n * BI_POWS[tokens[destTokenSymbolUSDEnter].decimals],
|
|
188
|
+
9n * BI_POWS[tokens[destTokenSymbolUSDEnter].decimals],
|
|
189
|
+
10n * BI_POWS[tokens[destTokenSymbolUSDEnter].decimals],
|
|
190
|
+
];
|
|
191
|
+
|
|
192
|
+
beforeAll(async () => {
|
|
193
|
+
blockNumber = await dexHelper.web3Provider.eth.getBlockNumber();
|
|
194
|
+
angleStakedStable = new AngleStakedStable(network, dexKey, dexHelper);
|
|
195
|
+
if (angleStakedStable.initializePricing) {
|
|
196
|
+
await angleStakedStable.initializePricing(blockNumber);
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
it('getPoolIdentifiers and getPricesVolume SELL - USDA', async () => {
|
|
200
|
+
await testPricingOnNetwork(
|
|
201
|
+
angleStakedStable,
|
|
202
|
+
network,
|
|
203
|
+
dexKey,
|
|
204
|
+
blockNumber,
|
|
205
|
+
srcTokenSymbolUSDEnter,
|
|
206
|
+
destTokenSymbolUSDEnter,
|
|
207
|
+
SwapSide.SELL,
|
|
208
|
+
amountsForSell,
|
|
209
|
+
funcNameSellEnter,
|
|
210
|
+
);
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
it('getPoolIdentifiers and getPricesVolume BUY - stUSD', async () => {
|
|
214
|
+
await testPricingOnNetwork(
|
|
215
|
+
angleStakedStable,
|
|
216
|
+
network,
|
|
217
|
+
dexKey,
|
|
218
|
+
blockNumber,
|
|
219
|
+
srcTokenSymbolUSDEnter,
|
|
220
|
+
destTokenSymbolUSDEnter,
|
|
221
|
+
SwapSide.BUY,
|
|
222
|
+
amountsForBuy,
|
|
223
|
+
funcNameBuyEnter,
|
|
224
|
+
);
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
it('getPoolIdentifiers and getPricesVolume SELL - stUSD', async () => {
|
|
228
|
+
await testPricingOnNetwork(
|
|
229
|
+
angleStakedStable,
|
|
230
|
+
network,
|
|
231
|
+
dexKey,
|
|
232
|
+
blockNumber,
|
|
233
|
+
srcTokenSymbolUSDExit,
|
|
234
|
+
destTokenSymbolUSDExit,
|
|
235
|
+
SwapSide.SELL,
|
|
236
|
+
amountsForSell,
|
|
237
|
+
funcNameSellExit,
|
|
238
|
+
);
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
it('getPoolIdentifiers and getPricesVolume BUY - USDA', async () => {
|
|
242
|
+
await testPricingOnNetwork(
|
|
243
|
+
angleStakedStable,
|
|
244
|
+
network,
|
|
245
|
+
dexKey,
|
|
246
|
+
blockNumber,
|
|
247
|
+
srcTokenSymbolUSDExit,
|
|
248
|
+
destTokenSymbolUSDExit,
|
|
249
|
+
SwapSide.BUY,
|
|
250
|
+
amountsForBuy,
|
|
251
|
+
funcNameBuyExit,
|
|
252
|
+
);
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
it('getTopPoolsForToken - USDA', async () => {
|
|
256
|
+
// We have to check without calling initializePricing, because
|
|
257
|
+
// pool-tracker is not calling that function
|
|
258
|
+
const newAngleStakedStable = new AngleStakedStable(
|
|
259
|
+
network,
|
|
260
|
+
dexKey,
|
|
261
|
+
dexHelper,
|
|
262
|
+
);
|
|
263
|
+
if (newAngleStakedStable.updatePoolState) {
|
|
264
|
+
await newAngleStakedStable.updatePoolState();
|
|
265
|
+
}
|
|
266
|
+
const poolLiquidity = await newAngleStakedStable.getTopPoolsForToken(
|
|
267
|
+
tokens[srcTokenSymbolUSDEnter].address,
|
|
268
|
+
10,
|
|
269
|
+
);
|
|
270
|
+
console.log(`${srcTokenSymbolUSDEnter} Top Pools:`, poolLiquidity);
|
|
271
|
+
|
|
272
|
+
if (!newAngleStakedStable.hasConstantPriceLargeAmounts) {
|
|
273
|
+
checkPoolsLiquidity(
|
|
274
|
+
poolLiquidity,
|
|
275
|
+
Tokens[network][srcTokenSymbolUSDEnter].address,
|
|
276
|
+
exchangeSTUSD,
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
it('getTopPoolsForToken - stUSD', async () => {
|
|
282
|
+
// We have to check without calling initializePricing, because
|
|
283
|
+
// pool-tracker is not calling that function
|
|
284
|
+
const newAngleStakedStable = new AngleStakedStable(
|
|
285
|
+
network,
|
|
286
|
+
dexKey,
|
|
287
|
+
dexHelper,
|
|
288
|
+
);
|
|
289
|
+
if (newAngleStakedStable.updatePoolState) {
|
|
290
|
+
await newAngleStakedStable.updatePoolState();
|
|
291
|
+
}
|
|
292
|
+
const poolLiquidity = await newAngleStakedStable.getTopPoolsForToken(
|
|
293
|
+
tokens[srcTokenSymbolUSDExit].address,
|
|
294
|
+
10,
|
|
295
|
+
);
|
|
296
|
+
console.log(`${srcTokenSymbolUSDExit} Top Pools:`, poolLiquidity);
|
|
297
|
+
|
|
298
|
+
if (!newAngleStakedStable.hasConstantPriceLargeAmounts) {
|
|
299
|
+
checkPoolsLiquidity(
|
|
300
|
+
poolLiquidity,
|
|
301
|
+
Tokens[network][srcTokenSymbolUSDExit].address,
|
|
302
|
+
exchangeSTUSD,
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
describe('Mainnet EUR', () => {
|
|
309
|
+
let blockNumber: number;
|
|
310
|
+
let angleStakedStable: AngleStakedStable;
|
|
311
|
+
const dexKey = 'AngleStakedStableEUR';
|
|
312
|
+
const network = Network.MAINNET;
|
|
313
|
+
const dexHelper = new DummyDexHelper(network);
|
|
314
|
+
|
|
315
|
+
const tokens = Tokens[network];
|
|
316
|
+
|
|
317
|
+
// Don't forget to update relevant tokens in constant-e2e.ts
|
|
318
|
+
const srcTokenSymbolEUREnter = 'EURA';
|
|
319
|
+
const destTokenSymbolEUREnter = 'stEUR';
|
|
320
|
+
const funcNameSellEnter = 'previewDeposit';
|
|
321
|
+
const funcNameBuyEnter = 'previewMint';
|
|
322
|
+
|
|
323
|
+
const srcTokenSymbolEURExit = 'stEUR';
|
|
324
|
+
const destTokenSymbolEURExit = 'EURA';
|
|
325
|
+
const funcNameSellExit = 'previewRedeem';
|
|
326
|
+
const funcNameBuyExit = 'previewWithdraw';
|
|
327
|
+
|
|
328
|
+
const exchangeSTEUR = `${dexKey}_${tokens.stEUR.address.toLowerCase()}`;
|
|
329
|
+
|
|
330
|
+
const amountsForSell = [
|
|
331
|
+
0n,
|
|
332
|
+
1n * BI_POWS[tokens[srcTokenSymbolEUREnter].decimals],
|
|
333
|
+
2n * BI_POWS[tokens[srcTokenSymbolEUREnter].decimals],
|
|
334
|
+
3n * BI_POWS[tokens[srcTokenSymbolEUREnter].decimals],
|
|
335
|
+
4n * BI_POWS[tokens[srcTokenSymbolEUREnter].decimals],
|
|
336
|
+
5n * BI_POWS[tokens[srcTokenSymbolEUREnter].decimals],
|
|
337
|
+
6n * BI_POWS[tokens[srcTokenSymbolEUREnter].decimals],
|
|
338
|
+
7n * BI_POWS[tokens[srcTokenSymbolEUREnter].decimals],
|
|
339
|
+
8n * BI_POWS[tokens[srcTokenSymbolEUREnter].decimals],
|
|
340
|
+
9n * BI_POWS[tokens[srcTokenSymbolEUREnter].decimals],
|
|
341
|
+
10n * BI_POWS[tokens[srcTokenSymbolEUREnter].decimals],
|
|
342
|
+
];
|
|
343
|
+
|
|
344
|
+
const amountsForBuy = [
|
|
345
|
+
0n,
|
|
346
|
+
1n * BI_POWS[tokens[destTokenSymbolEUREnter].decimals],
|
|
347
|
+
2n * BI_POWS[tokens[destTokenSymbolEUREnter].decimals],
|
|
348
|
+
3n * BI_POWS[tokens[destTokenSymbolEUREnter].decimals],
|
|
349
|
+
4n * BI_POWS[tokens[destTokenSymbolEUREnter].decimals],
|
|
350
|
+
5n * BI_POWS[tokens[destTokenSymbolEUREnter].decimals],
|
|
351
|
+
6n * BI_POWS[tokens[destTokenSymbolEUREnter].decimals],
|
|
352
|
+
7n * BI_POWS[tokens[destTokenSymbolEUREnter].decimals],
|
|
353
|
+
8n * BI_POWS[tokens[destTokenSymbolEUREnter].decimals],
|
|
354
|
+
9n * BI_POWS[tokens[destTokenSymbolEUREnter].decimals],
|
|
355
|
+
10n * BI_POWS[tokens[destTokenSymbolEUREnter].decimals],
|
|
356
|
+
];
|
|
357
|
+
|
|
358
|
+
beforeAll(async () => {
|
|
359
|
+
blockNumber = await dexHelper.web3Provider.eth.getBlockNumber();
|
|
360
|
+
angleStakedStable = new AngleStakedStable(network, dexKey, dexHelper);
|
|
361
|
+
if (angleStakedStable.initializePricing) {
|
|
362
|
+
await angleStakedStable.initializePricing(blockNumber);
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
it('getPoolIdentifiers and getPricesVolume SELL - EURA', async () => {
|
|
367
|
+
await testPricingOnNetwork(
|
|
368
|
+
angleStakedStable,
|
|
369
|
+
network,
|
|
370
|
+
dexKey,
|
|
371
|
+
blockNumber,
|
|
372
|
+
srcTokenSymbolEUREnter,
|
|
373
|
+
destTokenSymbolEUREnter,
|
|
374
|
+
SwapSide.SELL,
|
|
375
|
+
amountsForSell,
|
|
376
|
+
funcNameSellEnter,
|
|
377
|
+
);
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
it('getPoolIdentifiers and getPricesVolume BUY - stEUR', async () => {
|
|
381
|
+
await testPricingOnNetwork(
|
|
382
|
+
angleStakedStable,
|
|
383
|
+
network,
|
|
384
|
+
dexKey,
|
|
385
|
+
blockNumber,
|
|
386
|
+
srcTokenSymbolEUREnter,
|
|
387
|
+
destTokenSymbolEUREnter,
|
|
388
|
+
SwapSide.BUY,
|
|
389
|
+
amountsForBuy,
|
|
390
|
+
funcNameBuyEnter,
|
|
391
|
+
);
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
it('getPoolIdentifiers and getPricesVolume SELL - stEUR', async () => {
|
|
395
|
+
await testPricingOnNetwork(
|
|
396
|
+
angleStakedStable,
|
|
397
|
+
network,
|
|
398
|
+
dexKey,
|
|
399
|
+
blockNumber,
|
|
400
|
+
srcTokenSymbolEURExit,
|
|
401
|
+
destTokenSymbolEURExit,
|
|
402
|
+
SwapSide.SELL,
|
|
403
|
+
amountsForSell,
|
|
404
|
+
funcNameSellExit,
|
|
405
|
+
);
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
it('getPoolIdentifiers and getPricesVolume BUY - EURA', async () => {
|
|
409
|
+
await testPricingOnNetwork(
|
|
410
|
+
angleStakedStable,
|
|
411
|
+
network,
|
|
412
|
+
dexKey,
|
|
413
|
+
blockNumber,
|
|
414
|
+
srcTokenSymbolEURExit,
|
|
415
|
+
destTokenSymbolEURExit,
|
|
416
|
+
SwapSide.BUY,
|
|
417
|
+
amountsForBuy,
|
|
418
|
+
funcNameBuyExit,
|
|
419
|
+
);
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
it('getTopPoolsForToken -EURA', async () => {
|
|
423
|
+
// We have to check without calling initializePricing, because
|
|
424
|
+
// pool-tracker is not calling that function
|
|
425
|
+
const newAngleStakedStable = new AngleStakedStable(
|
|
426
|
+
network,
|
|
427
|
+
dexKey,
|
|
428
|
+
dexHelper,
|
|
429
|
+
);
|
|
430
|
+
if (newAngleStakedStable.updatePoolState) {
|
|
431
|
+
await newAngleStakedStable.updatePoolState();
|
|
432
|
+
}
|
|
433
|
+
const poolLiquidity = await newAngleStakedStable.getTopPoolsForToken(
|
|
434
|
+
tokens[srcTokenSymbolEUREnter].address,
|
|
435
|
+
10,
|
|
436
|
+
);
|
|
437
|
+
console.log(`${srcTokenSymbolEUREnter} Top Pools:`, poolLiquidity);
|
|
438
|
+
|
|
439
|
+
if (!newAngleStakedStable.hasConstantPriceLargeAmounts) {
|
|
440
|
+
checkPoolsLiquidity(
|
|
441
|
+
poolLiquidity,
|
|
442
|
+
Tokens[network][srcTokenSymbolEUREnter].address,
|
|
443
|
+
exchangeSTEUR,
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
|
|
448
|
+
it('getTopPoolsForToken - stEUR', async () => {
|
|
449
|
+
// We have to check without calling initializePricing, because
|
|
450
|
+
// pool-tracker is not calling that function
|
|
451
|
+
const newAngleStakedStable = new AngleStakedStable(
|
|
452
|
+
network,
|
|
453
|
+
dexKey,
|
|
454
|
+
dexHelper,
|
|
455
|
+
);
|
|
456
|
+
if (newAngleStakedStable.updatePoolState) {
|
|
457
|
+
await newAngleStakedStable.updatePoolState();
|
|
458
|
+
}
|
|
459
|
+
const poolLiquidity = await newAngleStakedStable.getTopPoolsForToken(
|
|
460
|
+
tokens[srcTokenSymbolEURExit].address,
|
|
461
|
+
10,
|
|
462
|
+
);
|
|
463
|
+
console.log(`${srcTokenSymbolEURExit} Top Pools:`, poolLiquidity);
|
|
464
|
+
|
|
465
|
+
if (!newAngleStakedStable.hasConstantPriceLargeAmounts) {
|
|
466
|
+
checkPoolsLiquidity(
|
|
467
|
+
poolLiquidity,
|
|
468
|
+
Tokens[network][srcTokenSymbolEURExit].address,
|
|
469
|
+
exchangeSTEUR,
|
|
470
|
+
);
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
});
|
|
474
|
+
});
|