@paraswap/dex-lib 4.7.26-balancer-v3-block-timestamp.0 → 4.7.27-0
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/dex/algebra-integral/algebra-integral-factory.d.ts +2 -0
- package/build/dex/algebra-integral/algebra-integral-factory.js +58 -0
- package/build/dex/algebra-integral/algebra-integral-factory.js.map +1 -1
- package/build/dex/algebra-integral/algebra-integral.d.ts +2 -0
- package/build/dex/algebra-integral/algebra-integral.js +25 -0
- package/build/dex/algebra-integral/algebra-integral.js.map +1 -1
- package/build/dex/algebra-integral/constants.d.ts +2 -0
- package/build/dex/algebra-integral/constants.js +5 -1
- package/build/dex/algebra-integral/constants.js.map +1 -1
- package/build/dex/balancer-v3/balancer-v3.js +1 -0
- package/build/dex/balancer-v3/balancer-v3.js.map +1 -1
- package/package.json +1 -1
- package/build/abi/PendleRouterStatic.json +0 -19
- package/build/abi/apex-defi/ApexDefiFactory.abi.json +0 -1749
- package/build/abi/apex-defi/ApexDefiRouter.abi.json +0 -1120
- package/build/abi/apex-defi/ApexDefiToken.abi.json +0 -229
- package/build/abi/apex-defi/ApexDefiWrapper.abi.json +0 -92
- package/build/abi/apex-defi/ApexDefiWrapperFactory.abi.json +0 -1107
- package/build/abi/ekubo-v3/core.json +0 -797
- package/build/abi/ekubo-v3/mev-capture-router.json +0 -936
- package/build/abi/ekubo-v3/quote-data-fetcher.json +0 -161
- package/build/abi/ekubo-v3/twamm-data-fetcher.json +0 -216
- package/build/abi/ekubo-v3/twamm.json +0 -613
- package/build/abi/idle-dao/idle-cdo-factory.json +0 -38
- package/build/abi/idle-dao/idle-cdo.json +0 -1245
- package/build/abi/infusion/InfusionFactory.json +0 -147
- package/build/abi/infusion/InfusionPair.json +0 -658
- package/build/abi/infusion/InfusionRouter.json +0 -442
- package/build/abi/maker-psm/pot.json +0 -322
- package/build/abi/maker-psm/psm.json +0 -243
- package/build/abi/maker-psm/vat.json +0 -363
- package/build/abi/nomiswap-v2/nomiswap-v2-pool.json +0 -773
- package/build/abi/pangolin-v3/PangolinV3StateMulticall.abi.json +0 -796
- package/build/abi/pendle/pendle-deployer.abi.json +0 -520
- package/build/abi/pendle/pendle-oracle.abi.json +0 -413
- package/build/abi/quick-perps/fast-price-events.json +0 -70
- package/build/abi/quick-perps/fast-price-feed.json +0 -741
- package/build/abi/quick-perps/reader.json +0 -313
- package/build/abi/quick-perps/vault-price-feed.json +0 -323
- package/build/abi/quick-perps/vault.json +0 -1953
- package/build/abi/ring-v2/few-wrapped-token.json +0 -587
- package/build/abi/ring-v2/ring-v2-factory.json +0 -125
- package/build/abi/ring-v2/ring-v2-pool.json +0 -461
- package/build/abi/ring-v2/ring-v2-router.json +0 -332
- package/build/abi/stabull/stabull-curve.json +0 -738
- package/build/abi/stabull/stabull-router.json +0 -76
- package/build/abi/uniswap-v2/excalibur-pool.json +0 -881
- package/build/abi/uniswap-v2/mdex-factory.json +0 -759
- package/build/abi/uniswap-v4/hooks/SpotDynamicFeeManager.json +0 -26
- package/build/abi/uniswap-v4/hooks/SpotHook.json +0 -54
- package/build/abi/uniswap-v4/hooks/SpotPolicyManager.json +0 -45
- package/build/abi/uniswap-v4/hooks/cabalcoin-hook.abi.json +0 -682
- package/build/abi/uniswap-v4/hooks/fee-hook.abi.json +0 -1335
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying-factory.d.ts +0 -29
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying-factory.js +0 -153
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying-factory.js.map +0 -1
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying.d.ts +0 -40
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying.js +0 -323
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying.js.map +0 -1
- package/build/dex/aave-pt-to-underlying/config.d.ts +0 -3
- package/build/dex/aave-pt-to-underlying/config.js +0 -24
- package/build/dex/aave-pt-to-underlying/config.js.map +0 -1
- package/build/dex/aave-pt-to-underlying/constants.d.ts +0 -2
- package/build/dex/aave-pt-to-underlying/constants.js +0 -6
- package/build/dex/aave-pt-to-underlying/constants.js.map +0 -1
- package/build/dex/aave-pt-to-underlying/types.d.ts +0 -24
- package/build/dex/aave-pt-to-underlying/types.js +0 -3
- package/build/dex/aave-pt-to-underlying/types.js.map +0 -1
- package/build/dex/aave-pt-to-usdc/aave-pt-to-usdc.d.ts +0 -39
- package/build/dex/aave-pt-to-usdc/aave-pt-to-usdc.js +0 -244
- package/build/dex/aave-pt-to-usdc/aave-pt-to-usdc.js.map +0 -1
- package/build/dex/aave-pt-to-usdc/config.d.ts +0 -3
- package/build/dex/aave-pt-to-usdc/config.js +0 -47
- package/build/dex/aave-pt-to-usdc/config.js.map +0 -1
- package/build/dex/aave-pt-to-usdc/constants.d.ts +0 -2
- package/build/dex/aave-pt-to-usdc/constants.js +0 -6
- package/build/dex/aave-pt-to-usdc/constants.js.map +0 -1
- package/build/dex/aave-pt-to-usdc/types.d.ts +0 -22
- package/build/dex/aave-pt-to-usdc/types.js +0 -3
- package/build/dex/aave-pt-to-usdc/types.js.map +0 -1
- package/build/dex/apex-defi/apex-defi-factory.d.ts +0 -26
- package/build/dex/apex-defi/apex-defi-factory.js +0 -53
- package/build/dex/apex-defi/apex-defi-factory.js.map +0 -1
- package/build/dex/apex-defi/apex-defi-pool.d.ts +0 -55
- package/build/dex/apex-defi/apex-defi-pool.js +0 -247
- package/build/dex/apex-defi/apex-defi-pool.js.map +0 -1
- package/build/dex/apex-defi/apex-defi-wrapper-factory.d.ts +0 -57
- package/build/dex/apex-defi/apex-defi-wrapper-factory.js +0 -250
- package/build/dex/apex-defi/apex-defi-wrapper-factory.js.map +0 -1
- package/build/dex/apex-defi/apex-defi.d.ts +0 -97
- package/build/dex/apex-defi/apex-defi.js +0 -1021
- package/build/dex/apex-defi/apex-defi.js.map +0 -1
- package/build/dex/apex-defi/config.d.ts +0 -4
- package/build/dex/apex-defi/config.js +0 -138
- package/build/dex/apex-defi/config.js.map +0 -1
- package/build/dex/apex-defi/types.d.ts +0 -32
- package/build/dex/apex-defi/types.js +0 -3
- package/build/dex/apex-defi/types.js.map +0 -1
- package/build/dex/apex-defi/utils.d.ts +0 -46
- package/build/dex/apex-defi/utils.js +0 -133
- package/build/dex/apex-defi/utils.js.map +0 -1
- package/build/dex/ekubo/pools/base-pool.d.ts +0 -47
- package/build/dex/ekubo/pools/base-pool.js +0 -184
- package/build/dex/ekubo/pools/base-pool.js.map +0 -1
- package/build/dex/ekubo/pools/iface.d.ts +0 -46
- package/build/dex/ekubo/pools/iface.js +0 -75
- package/build/dex/ekubo/pools/iface.js.map +0 -1
- package/build/dex/ekubo/pools/math/price.d.ts +0 -7
- package/build/dex/ekubo/pools/math/price.js +0 -112
- package/build/dex/ekubo/pools/math/price.js.map +0 -1
- package/build/dex/ekubo/pools/oracle-pool.d.ts +0 -10
- package/build/dex/ekubo/pools/oracle-pool.js +0 -19
- package/build/dex/ekubo/pools/oracle-pool.js.map +0 -1
- package/build/dex/ekubo/pools/pool-utils.d.ts +0 -44
- package/build/dex/ekubo/pools/pool-utils.js +0 -240
- package/build/dex/ekubo/pools/pool-utils.js.map +0 -1
- package/build/dex/ekubo-v3/config.d.ts +0 -13
- package/build/dex/ekubo-v3/config.js +0 -23
- package/build/dex/ekubo-v3/config.js.map +0 -1
- package/build/dex/ekubo-v3/ekubo-v3-pool-manager.d.ts +0 -34
- package/build/dex/ekubo-v3/ekubo-v3-pool-manager.js +0 -421
- package/build/dex/ekubo-v3/ekubo-v3-pool-manager.js.map +0 -1
- package/build/dex/ekubo-v3/ekubo-v3.d.ts +0 -38
- package/build/dex/ekubo-v3/ekubo-v3.js +0 -274
- package/build/dex/ekubo-v3/ekubo-v3.js.map +0 -1
- package/build/dex/ekubo-v3/pools/base.d.ts +0 -42
- package/build/dex/ekubo-v3/pools/base.js +0 -307
- package/build/dex/ekubo-v3/pools/base.js.map +0 -1
- package/build/dex/ekubo-v3/pools/full-range.d.ts +0 -25
- package/build/dex/ekubo-v3/pools/full-range.js +0 -105
- package/build/dex/ekubo-v3/pools/full-range.js.map +0 -1
- package/build/dex/ekubo-v3/pools/math/constants.d.ts +0 -12
- package/build/dex/ekubo-v3/pools/math/constants.js +0 -16
- package/build/dex/ekubo-v3/pools/math/constants.js.map +0 -1
- package/build/dex/ekubo-v3/pools/math/delta.d.ts +0 -2
- package/build/dex/ekubo-v3/pools/math/delta.js +0 -51
- package/build/dex/ekubo-v3/pools/math/delta.js.map +0 -1
- package/build/dex/ekubo-v3/pools/math/sqrt-ratio.d.ts +0 -8
- package/build/dex/ekubo-v3/pools/math/sqrt-ratio.js +0 -113
- package/build/dex/ekubo-v3/pools/math/sqrt-ratio.js.map +0 -1
- package/build/dex/ekubo-v3/pools/math/swap.d.ts +0 -18
- package/build/dex/ekubo-v3/pools/math/swap.js +0 -128
- package/build/dex/ekubo-v3/pools/math/swap.js.map +0 -1
- package/build/dex/ekubo-v3/pools/math/tick.d.ts +0 -8
- package/build/dex/ekubo-v3/pools/math/tick.js +0 -129
- package/build/dex/ekubo-v3/pools/math/tick.js.map +0 -1
- package/build/dex/ekubo-v3/pools/math/twamm/exp2.d.ts +0 -1
- package/build/dex/ekubo-v3/pools/math/twamm/exp2.js +0 -86
- package/build/dex/ekubo-v3/pools/math/twamm/exp2.js.map +0 -1
- package/build/dex/ekubo-v3/pools/math/twamm/sqrt-ratio.d.ts +0 -1
- package/build/dex/ekubo-v3/pools/math/twamm/sqrt-ratio.js +0 -56
- package/build/dex/ekubo-v3/pools/math/twamm/sqrt-ratio.js.map +0 -1
- package/build/dex/ekubo-v3/pools/mev-capture.d.ts +0 -8
- package/build/dex/ekubo-v3/pools/mev-capture.js +0 -42
- package/build/dex/ekubo-v3/pools/mev-capture.js.map +0 -1
- package/build/dex/ekubo-v3/pools/oracle.d.ts +0 -8
- package/build/dex/ekubo-v3/pools/oracle.js +0 -18
- package/build/dex/ekubo-v3/pools/oracle.js.map +0 -1
- package/build/dex/ekubo-v3/pools/pool.d.ts +0 -56
- package/build/dex/ekubo-v3/pools/pool.js +0 -88
- package/build/dex/ekubo-v3/pools/pool.js.map +0 -1
- package/build/dex/ekubo-v3/pools/stableswap.d.ts +0 -22
- package/build/dex/ekubo-v3/pools/stableswap.js +0 -123
- package/build/dex/ekubo-v3/pools/stableswap.js.map +0 -1
- package/build/dex/ekubo-v3/pools/twamm.d.ts +0 -40
- package/build/dex/ekubo-v3/pools/twamm.js +0 -265
- package/build/dex/ekubo-v3/pools/twamm.js.map +0 -1
- package/build/dex/ekubo-v3/pools/utils.d.ts +0 -62
- package/build/dex/ekubo-v3/pools/utils.js +0 -160
- package/build/dex/ekubo-v3/pools/utils.js.map +0 -1
- package/build/dex/ekubo-v3/types.d.ts +0 -58
- package/build/dex/ekubo-v3/types.js +0 -3
- package/build/dex/ekubo-v3/types.js.map +0 -1
- package/build/dex/ekubo-v3/utils.d.ts +0 -10
- package/build/dex/ekubo-v3/utils.js +0 -54
- package/build/dex/ekubo-v3/utils.js.map +0 -1
- package/build/dex/idle-dao/config.d.ts +0 -5
- package/build/dex/idle-dao/config.js +0 -24
- package/build/dex/idle-dao/config.js.map +0 -1
- package/build/dex/idle-dao/idle-dao.d.ts +0 -42
- package/build/dex/idle-dao/idle-dao.js +0 -279
- package/build/dex/idle-dao/idle-dao.js.map +0 -1
- package/build/dex/idle-dao/token_list.d.ts +0 -4
- package/build/dex/idle-dao/token_list.js +0 -289
- package/build/dex/idle-dao/token_list.js.map +0 -1
- package/build/dex/idle-dao/tokens.d.ts +0 -9
- package/build/dex/idle-dao/tokens.js +0 -68
- package/build/dex/idle-dao/tokens.js.map +0 -1
- package/build/dex/idle-dao/types.d.ts +0 -35
- package/build/dex/idle-dao/types.js +0 -11
- package/build/dex/idle-dao/types.js.map +0 -1
- package/build/dex/idle-dao/utils.d.ts +0 -8
- package/build/dex/idle-dao/utils.js +0 -149
- package/build/dex/idle-dao/utils.js.map +0 -1
- package/build/dex/infusion/config.d.ts +0 -3
- package/build/dex/infusion/config.js +0 -20
- package/build/dex/infusion/config.js.map +0 -1
- package/build/dex/infusion/infusion-stable-pool.d.ts +0 -4
- package/build/dex/infusion/infusion-stable-pool.js +0 -74
- package/build/dex/infusion/infusion-stable-pool.js.map +0 -1
- package/build/dex/infusion/infusion.d.ts +0 -51
- package/build/dex/infusion/infusion.js +0 -461
- package/build/dex/infusion/infusion.js.map +0 -1
- package/build/dex/infusion/types.d.ts +0 -45
- package/build/dex/infusion/types.js +0 -3
- package/build/dex/infusion/types.js.map +0 -1
- package/build/dex/infusion/utils/isStablePair.d.ts +0 -2
- package/build/dex/infusion/utils/isStablePair.js +0 -18
- package/build/dex/infusion/utils/isStablePair.js.map +0 -1
- package/build/dex/maker-psm/config.d.ts +0 -11
- package/build/dex/maker-psm/config.js +0 -53
- package/build/dex/maker-psm/config.js.map +0 -1
- package/build/dex/maker-psm/maker-psm-event-pool.d.ts +0 -43
- package/build/dex/maker-psm/maker-psm-event-pool.js +0 -132
- package/build/dex/maker-psm/maker-psm-event-pool.js.map +0 -1
- package/build/dex/maker-psm/maker-psm.d.ts +0 -103
- package/build/dex/maker-psm/maker-psm.js +0 -493
- package/build/dex/maker-psm/maker-psm.js.map +0 -1
- package/build/dex/maker-psm/types.d.ts +0 -39
- package/build/dex/maker-psm/types.js +0 -3
- package/build/dex/maker-psm/types.js.map +0 -1
- package/build/dex/miro-migrator/miro-migrator-state.d.ts +0 -27
- package/build/dex/miro-migrator/miro-migrator-state.js +0 -89
- package/build/dex/miro-migrator/miro-migrator-state.js.map +0 -1
- package/build/dex/quick-perps/config.d.ts +0 -11
- package/build/dex/quick-perps/config.js +0 -27
- package/build/dex/quick-perps/config.js.map +0 -1
- package/build/dex/quick-perps/fast-price-feed.d.ts +0 -26
- package/build/dex/quick-perps/fast-price-feed.js +0 -184
- package/build/dex/quick-perps/fast-price-feed.js.map +0 -1
- package/build/dex/quick-perps/pool.d.ts +0 -21
- package/build/dex/quick-perps/pool.js +0 -229
- package/build/dex/quick-perps/pool.js.map +0 -1
- package/build/dex/quick-perps/quick-perps.d.ts +0 -53
- package/build/dex/quick-perps/quick-perps.js +0 -247
- package/build/dex/quick-perps/quick-perps.js.map +0 -1
- package/build/dex/quick-perps/types.d.ts +0 -98
- package/build/dex/quick-perps/types.js +0 -3
- package/build/dex/quick-perps/types.js.map +0 -1
- package/build/dex/quick-perps/usdq.d.ts +0 -15
- package/build/dex/quick-perps/usdq.js +0 -62
- package/build/dex/quick-perps/usdq.js.map +0 -1
- package/build/dex/quick-perps/vault-price-feed.d.ts +0 -43
- package/build/dex/quick-perps/vault-price-feed.js +0 -203
- package/build/dex/quick-perps/vault-price-feed.js.map +0 -1
- package/build/dex/quick-perps/vault-utils.d.ts +0 -8
- package/build/dex/quick-perps/vault-utils.js +0 -42
- package/build/dex/quick-perps/vault-utils.js.map +0 -1
- package/build/dex/quick-perps/vault.d.ts +0 -46
- package/build/dex/quick-perps/vault.js +0 -182
- package/build/dex/quick-perps/vault.js.map +0 -1
- package/build/dex/solidly/forks-override/aerodrome.d.ts +0 -14
- package/build/dex/solidly/forks-override/aerodrome.js +0 -50
- package/build/dex/solidly/forks-override/aerodrome.js.map +0 -1
- package/build/dex/solidly/forks-override/chronos.d.ts +0 -23
- package/build/dex/solidly/forks-override/chronos.js +0 -141
- package/build/dex/solidly/forks-override/chronos.js.map +0 -1
- package/build/dex/solidly/forks-override/usdfi.d.ts +0 -8
- package/build/dex/solidly/forks-override/usdfi.js +0 -15
- package/build/dex/solidly/forks-override/usdfi.js.map +0 -1
- package/build/dex/solidly/forks-override/velocimeter.d.ts +0 -23
- package/build/dex/solidly/forks-override/velocimeter.js +0 -77
- package/build/dex/solidly/forks-override/velocimeter.js.map +0 -1
- package/build/dex/stabull/config.d.ts +0 -3
- package/build/dex/stabull/config.js +0 -177
- package/build/dex/stabull/config.js.map +0 -1
- package/build/dex/stabull/stabull-pool.d.ts +0 -46
- package/build/dex/stabull/stabull-pool.js +0 -113
- package/build/dex/stabull/stabull-pool.js.map +0 -1
- package/build/dex/stabull/stabull.d.ts +0 -55
- package/build/dex/stabull/stabull.js +0 -286
- package/build/dex/stabull/stabull.js.map +0 -1
- package/build/dex/stabull/types.d.ts +0 -21
- package/build/dex/stabull/types.js +0 -3
- package/build/dex/stabull/types.js.map +0 -1
- package/build/dex/uniswap-v2/dfyn.d.ts +0 -19
- package/build/dex/uniswap-v2/dfyn.js +0 -61
- package/build/dex/uniswap-v2/dfyn.js.map +0 -1
- package/build/dex/uniswap-v2/excalibur.d.ts +0 -24
- package/build/dex/uniswap-v2/excalibur.js +0 -47
- package/build/dex/uniswap-v2/excalibur.js.map +0 -1
- package/build/dex/uniswap-v2/mdex.d.ts +0 -24
- package/build/dex/uniswap-v2/mdex.js +0 -50
- package/build/dex/uniswap-v2/mdex.js.map +0 -1
- package/build/dex/uniswap-v2/nomiswap-v2.d.ts +0 -24
- package/build/dex/uniswap-v2/nomiswap-v2.js +0 -57
- package/build/dex/uniswap-v2/nomiswap-v2.js.map +0 -1
- package/build/dex/uniswap-v3/forks/pangolin-v3/utils.d.ts +0 -4
- package/build/dex/uniswap-v3/forks/pangolin-v3/utils.js +0 -56
- package/build/dex/uniswap-v3/forks/pangolin-v3/utils.js.map +0 -1
- package/build/dex/uniswap-v4/contract-math/Position.d.ts +0 -9
- package/build/dex/uniswap-v4/contract-math/Position.js +0 -39
- package/build/dex/uniswap-v4/contract-math/Position.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/arena.d.ts +0 -6
- package/build/dex/uniswap-v4/hooks/arena.js +0 -10
- package/build/dex/uniswap-v4/hooks/arena.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/base-fee/base-fee-hook.d.ts +0 -0
- package/build/dex/uniswap-v4/hooks/base-fee/base-fee-hook.js +0 -2
- package/build/dex/uniswap-v4/hooks/base-fee/base-fee-hook.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/cabalcoin-hook-pool.d.ts +0 -7
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/cabalcoin-hook-pool.js +0 -28
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/cabalcoin-hook-pool.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/types.d.ts +0 -0
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/types.js +0 -2
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/types.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/fee-hook/fee-hook-pool.d.ts +0 -7
- package/build/dex/uniswap-v4/hooks/fee-hook/fee-hook-pool.js +0 -28
- package/build/dex/uniswap-v4/hooks/fee-hook/fee-hook-pool.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/fee-hook/types.d.ts +0 -0
- package/build/dex/uniswap-v4/hooks/fee-hook/types.js +0 -2
- package/build/dex/uniswap-v4/hooks/fee-hook/types.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/index.d.ts +0 -1
- package/build/dex/uniswap-v4/hooks/index.js +0 -18
- package/build/dex/uniswap-v4/hooks/index.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/spot.d.ts +0 -15
- package/build/dex/uniswap-v4/hooks/spot.js +0 -109
- package/build/dex/uniswap-v4/hooks/spot.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/template.d.ts +0 -150
- package/build/dex/uniswap-v4/hooks/template.js +0 -104
- package/build/dex/uniswap-v4/hooks/template.js.map +0 -1
- package/build/dex/usdc-transmuter/usdc-transmuter-pool.d.ts +0 -26
- package/build/dex/usdc-transmuter/usdc-transmuter-pool.js +0 -75
- package/build/dex/usdc-transmuter/usdc-transmuter-pool.js.map +0 -1
- package/build/dex/usual/usual-usdc-usdc.d.ts +0 -17
- package/build/dex/usual/usual-usdc-usdc.js +0 -59
- package/build/dex/usual/usual-usdc-usdc.js.map +0 -1
- package/build/dex/yo/config.d.ts +0 -3
- package/build/dex/yo/config.js +0 -21
- package/build/dex/yo/config.js.map +0 -1
- package/build/dex/yo/types.d.ts +0 -13
- package/build/dex/yo/types.js +0 -3
- package/build/dex/yo/types.js.map +0 -1
- package/build/dex/yo/yo-pool.d.ts +0 -13
- package/build/dex/yo/yo-pool.js +0 -26
- package/build/dex/yo/yo-pool.js.map +0 -1
- package/build/dex/yo/yo.d.ts +0 -39
- package/build/dex/yo/yo.js +0 -248
- package/build/dex/yo/yo.js.map +0 -1
- package/build/implementations/api-paraswap-sdk.d.ts +0 -25
- package/build/implementations/api-paraswap-sdk.js +0 -102
- package/build/implementations/api-paraswap-sdk.js.map +0 -1
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { DeepReadonly } from 'ts-essentials';
|
|
2
|
-
import { Address, Log, Logger } from '../../types';
|
|
3
|
-
import { StatefulEventSubscriber } from '../../stateful-event-subscriber';
|
|
4
|
-
import { IDexHelper } from '../../dex-helper/idex-helper';
|
|
5
|
-
import { PoolState, PoolConfig } from './types';
|
|
6
|
-
export declare class MakerPsmEventPool extends StatefulEventSubscriber<PoolState> {
|
|
7
|
-
protected network: number;
|
|
8
|
-
protected dexHelper: IDexHelper;
|
|
9
|
-
poolConfig: PoolConfig;
|
|
10
|
-
protected vatAddress: Address;
|
|
11
|
-
handlers: {
|
|
12
|
-
[event: string]: (event: any, pool: PoolState, log: Log) => PoolState;
|
|
13
|
-
};
|
|
14
|
-
logDecoder: (log: Log) => any;
|
|
15
|
-
to18ConversionFactor: bigint;
|
|
16
|
-
bytes32Tout: string;
|
|
17
|
-
bytes32Tin: string;
|
|
18
|
-
constructor(parentName: string, network: number, dexHelper: IDexHelper, logger: Logger, poolConfig: PoolConfig, vatAddress: Address);
|
|
19
|
-
handleFile(event: any, pool: PoolState, log: Log): PoolState;
|
|
20
|
-
handleSellGem(event: any, pool: PoolState, log: Log): PoolState;
|
|
21
|
-
handleBuyGem(event: any, pool: PoolState, log: Log): PoolState;
|
|
22
|
-
getIdentifier(): string;
|
|
23
|
-
/**
|
|
24
|
-
* The function is called every time any of the subscribed
|
|
25
|
-
* addresses release log. The function accepts the current
|
|
26
|
-
* state, updates the state according to the log, and returns
|
|
27
|
-
* the updated state.
|
|
28
|
-
* @param state - Current state of event subscriber
|
|
29
|
-
* @param log - Log released by one of the subscribed addresses
|
|
30
|
-
* @returns Updates state of the event subscriber after the log
|
|
31
|
-
*/
|
|
32
|
-
protected processLog(state: DeepReadonly<PoolState>, log: Readonly<Log>): DeepReadonly<PoolState> | null;
|
|
33
|
-
/**
|
|
34
|
-
* The function generates state using on-chain calls. This
|
|
35
|
-
* function is called to regenerate state if the event based
|
|
36
|
-
* system fails to fetch events and the local state is no
|
|
37
|
-
* more correct.
|
|
38
|
-
* @param blockNumber - Blocknumber for which the state should
|
|
39
|
-
* should be generated
|
|
40
|
-
* @returns state of the event subscriber at blocknumber
|
|
41
|
-
*/
|
|
42
|
-
generateState(blockNumber: number): Promise<Readonly<PoolState>>;
|
|
43
|
-
}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.MakerPsmEventPool = void 0;
|
|
7
|
-
const abi_1 = require("@ethersproject/abi");
|
|
8
|
-
const stateful_event_subscriber_1 = require("../../stateful-event-subscriber");
|
|
9
|
-
const utils_1 = require("../../utils");
|
|
10
|
-
const psm_json_1 = __importDefault(require("../../abi/maker-psm/psm.json"));
|
|
11
|
-
const vat_json_1 = __importDefault(require("../../abi/maker-psm/vat.json"));
|
|
12
|
-
const vatInterface = new abi_1.Interface(vat_json_1.default);
|
|
13
|
-
const psmInterface = new abi_1.Interface(psm_json_1.default);
|
|
14
|
-
const bigIntify = (b) => BigInt(b.toString());
|
|
15
|
-
async function getOnChainState(multiContract, poolConfigs, vatAddress, blockNumber) {
|
|
16
|
-
const callData = poolConfigs
|
|
17
|
-
.map(c => [
|
|
18
|
-
{
|
|
19
|
-
target: c.psmAddress,
|
|
20
|
-
callData: psmInterface.encodeFunctionData('tin', []),
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
target: c.psmAddress,
|
|
24
|
-
callData: psmInterface.encodeFunctionData('tout', []),
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
target: vatAddress,
|
|
28
|
-
callData: vatInterface.encodeFunctionData('ilks', [c.identifier]),
|
|
29
|
-
},
|
|
30
|
-
])
|
|
31
|
-
.flat();
|
|
32
|
-
const res = await multiContract.methods
|
|
33
|
-
.aggregate(callData)
|
|
34
|
-
.call({}, blockNumber);
|
|
35
|
-
let i = 0;
|
|
36
|
-
return poolConfigs.map(c => {
|
|
37
|
-
const tin = bigIntify(psmInterface.decodeFunctionResult('tin', res.returnData[i++])[0]);
|
|
38
|
-
const tout = bigIntify(psmInterface.decodeFunctionResult('tout', res.returnData[i++])[0]);
|
|
39
|
-
const ilks = vatInterface.decodeFunctionResult('ilks', res.returnData[i++]);
|
|
40
|
-
const Art = bigIntify(ilks.Art);
|
|
41
|
-
const line = bigIntify(ilks.line);
|
|
42
|
-
const rate = bigIntify(ilks.rate);
|
|
43
|
-
return {
|
|
44
|
-
tin,
|
|
45
|
-
tout,
|
|
46
|
-
Art,
|
|
47
|
-
line,
|
|
48
|
-
rate,
|
|
49
|
-
};
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
class MakerPsmEventPool extends stateful_event_subscriber_1.StatefulEventSubscriber {
|
|
53
|
-
network;
|
|
54
|
-
dexHelper;
|
|
55
|
-
poolConfig;
|
|
56
|
-
vatAddress;
|
|
57
|
-
handlers = {};
|
|
58
|
-
logDecoder;
|
|
59
|
-
to18ConversionFactor;
|
|
60
|
-
bytes32Tout = '0x746f757400000000000000000000000000000000000000000000000000000000'; // bytes32('tout')
|
|
61
|
-
bytes32Tin = '0x74696e0000000000000000000000000000000000000000000000000000000000'; // bytes32('tin')
|
|
62
|
-
constructor(parentName, network, dexHelper, logger, poolConfig, vatAddress) {
|
|
63
|
-
super(parentName, poolConfig.identifier, dexHelper, logger);
|
|
64
|
-
this.network = network;
|
|
65
|
-
this.dexHelper = dexHelper;
|
|
66
|
-
this.poolConfig = poolConfig;
|
|
67
|
-
this.vatAddress = vatAddress;
|
|
68
|
-
this.logDecoder = (log) => psmInterface.parseLog(log);
|
|
69
|
-
this.addressesSubscribed = [poolConfig.psmAddress];
|
|
70
|
-
this.to18ConversionFactor = (0, utils_1.getBigIntPow)(18 - poolConfig.gem.decimals);
|
|
71
|
-
// Add handlers
|
|
72
|
-
this.handlers['File'] = this.handleFile.bind(this);
|
|
73
|
-
this.handlers['SellGem'] = this.handleSellGem.bind(this);
|
|
74
|
-
this.handlers['BuyGem'] = this.handleBuyGem.bind(this);
|
|
75
|
-
}
|
|
76
|
-
handleFile(event, pool, log) {
|
|
77
|
-
if (event.args.what === this.bytes32Tin) {
|
|
78
|
-
pool.tin = bigIntify(event.args.data);
|
|
79
|
-
}
|
|
80
|
-
else if (event.args.what === this.bytes32Tout) {
|
|
81
|
-
pool.tout = bigIntify(event.args.data);
|
|
82
|
-
}
|
|
83
|
-
return pool;
|
|
84
|
-
}
|
|
85
|
-
handleSellGem(event, pool, log) {
|
|
86
|
-
pool.Art += bigIntify(event.args.value) * this.to18ConversionFactor;
|
|
87
|
-
return pool;
|
|
88
|
-
}
|
|
89
|
-
handleBuyGem(event, pool, log) {
|
|
90
|
-
pool.Art -= bigIntify(event.args.value) * this.to18ConversionFactor;
|
|
91
|
-
return pool;
|
|
92
|
-
}
|
|
93
|
-
getIdentifier() {
|
|
94
|
-
return `${this.parentName}_${this.poolConfig.psmAddress}`.toLowerCase();
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* The function is called every time any of the subscribed
|
|
98
|
-
* addresses release log. The function accepts the current
|
|
99
|
-
* state, updates the state according to the log, and returns
|
|
100
|
-
* the updated state.
|
|
101
|
-
* @param state - Current state of event subscriber
|
|
102
|
-
* @param log - Log released by one of the subscribed addresses
|
|
103
|
-
* @returns Updates state of the event subscriber after the log
|
|
104
|
-
*/
|
|
105
|
-
processLog(state, log) {
|
|
106
|
-
try {
|
|
107
|
-
const event = this.logDecoder(log);
|
|
108
|
-
if (event.name in this.handlers) {
|
|
109
|
-
return this.handlers[event.name](event, state, log);
|
|
110
|
-
}
|
|
111
|
-
return state;
|
|
112
|
-
}
|
|
113
|
-
catch (e) {
|
|
114
|
-
this.logger.error(`Error_${this.parentName}_processLog could not parse the log with topic ${log.topics}:`, e);
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* The function generates state using on-chain calls. This
|
|
120
|
-
* function is called to regenerate state if the event based
|
|
121
|
-
* system fails to fetch events and the local state is no
|
|
122
|
-
* more correct.
|
|
123
|
-
* @param blockNumber - Blocknumber for which the state should
|
|
124
|
-
* should be generated
|
|
125
|
-
* @returns state of the event subscriber at blocknumber
|
|
126
|
-
*/
|
|
127
|
-
async generateState(blockNumber) {
|
|
128
|
-
return (await getOnChainState(this.dexHelper.multiContract, [this.poolConfig], this.vatAddress, blockNumber))[0];
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
exports.MakerPsmEventPool = MakerPsmEventPool;
|
|
132
|
-
//# sourceMappingURL=maker-psm-event-pool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"maker-psm-event-pool.js","sourceRoot":"","sources":["../../../src/dex/maker-psm/maker-psm-event-pool.ts"],"names":[],"mappings":";;;;;;AAAA,4CAA+C;AAI/C,+EAA0E;AAC1E,uCAA2C;AAG3C,4EAAkD;AAClD,4EAAkD;AAElD,MAAM,YAAY,GAAG,IAAI,eAAS,CAAC,kBAAM,CAAC,CAAC;AAC3C,MAAM,YAAY,GAAG,IAAI,eAAS,CAAC,kBAAM,CAAC,CAAC;AAE3C,MAAM,SAAS,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,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G,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YACnC,IAAI,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAChC,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;YACtD,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,SAAS,IAAI,CAAC,UAAU,kDAAkD,GAAG,CAAC,MAAM,GAAG,EACvF,CAAC,CACF,CAAC;YACF,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,aAAa,CAAC,WAAmB;QACrC,OAAO,CACL,MAAM,eAAe,CACnB,IAAI,CAAC,SAAS,CAAC,aAAa,EAC5B,CAAC,IAAI,CAAC,UAAU,CAAC,EACjB,IAAI,CAAC,UAAU,EACf,WAAW,CACZ,CACF,CAAC,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAvGD,8CAuGC"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { DeepReadonly } from 'ts-essentials';
|
|
2
|
-
import { Token, Address, ExchangePrices, PoolPrices, Log, AdapterExchangeParam, SimpleExchangeParam, PoolLiquidity, Logger, NumberAsString, DexExchangeParam, ExchangeTxInfo, PreprocessTransactionOptions } from '../../types';
|
|
3
|
-
import { SwapSide, Network } from '../../constants';
|
|
4
|
-
import { StatefulEventSubscriber } from '../../stateful-event-subscriber';
|
|
5
|
-
import { IDex } from '../../dex/idex';
|
|
6
|
-
import { IDexHelper } from '../../dex-helper/idex-helper';
|
|
7
|
-
import { MakerPsmData, PoolState, PoolConfig, MakerPsmDirectPayload } from './types';
|
|
8
|
-
import { SimpleExchange } from '../simple-exchange';
|
|
9
|
-
import { OptimalSwapExchange } from '@paraswap/core';
|
|
10
|
-
export declare class MakerPsmEventPool extends StatefulEventSubscriber<PoolState> {
|
|
11
|
-
protected network: number;
|
|
12
|
-
protected dexHelper: IDexHelper;
|
|
13
|
-
poolConfig: PoolConfig;
|
|
14
|
-
protected vatAddress: Address;
|
|
15
|
-
handlers: {
|
|
16
|
-
[event: string]: (event: any, pool: PoolState, log: Log) => PoolState;
|
|
17
|
-
};
|
|
18
|
-
logDecoder: (log: Log) => any;
|
|
19
|
-
to18ConversionFactor: bigint;
|
|
20
|
-
bytes32Tout: string;
|
|
21
|
-
bytes32Tin: string;
|
|
22
|
-
constructor(parentName: string, network: number, dexHelper: IDexHelper, logger: Logger, poolConfig: PoolConfig, vatAddress: Address);
|
|
23
|
-
handleFile(event: any, pool: PoolState, log: Log): PoolState;
|
|
24
|
-
handleSellGem(event: any, pool: PoolState, log: Log): PoolState;
|
|
25
|
-
handleBuyGem(event: any, pool: PoolState, log: Log): PoolState;
|
|
26
|
-
getIdentifier(): string;
|
|
27
|
-
/**
|
|
28
|
-
* The function is called every time any of the subscribed
|
|
29
|
-
* addresses release log. The function accepts the current
|
|
30
|
-
* state, updates the state according to the log, and returns
|
|
31
|
-
* the updated state.
|
|
32
|
-
* @param state - Current state of event subscriber
|
|
33
|
-
* @param log - Log released by one of the subscribed addresses
|
|
34
|
-
* @returns Updates state of the event subscriber after the log
|
|
35
|
-
*/
|
|
36
|
-
protected processLog(state: DeepReadonly<PoolState>, log: Readonly<Log>): DeepReadonly<PoolState> | null;
|
|
37
|
-
/**
|
|
38
|
-
* The function generates state using on-chain calls. This
|
|
39
|
-
* function is called to regenerate state if the event based
|
|
40
|
-
* system fails to fetch events and the local state is no
|
|
41
|
-
* more correct.
|
|
42
|
-
* @param blockNumber - Blocknumber for which the state should
|
|
43
|
-
* should be generated
|
|
44
|
-
* @returns state of the event subscriber at blocknumber
|
|
45
|
-
*/
|
|
46
|
-
generateState(blockNumber: number): Promise<Readonly<PoolState>>;
|
|
47
|
-
}
|
|
48
|
-
export declare class MakerPsm extends SimpleExchange implements IDex<MakerPsmData, MakerPsmDirectPayload> {
|
|
49
|
-
protected network: Network;
|
|
50
|
-
protected dexHelper: IDexHelper;
|
|
51
|
-
protected adapters: {
|
|
52
|
-
[side: string]: {
|
|
53
|
-
name: string;
|
|
54
|
-
index: number;
|
|
55
|
-
}[] | null;
|
|
56
|
-
};
|
|
57
|
-
protected dai: Token;
|
|
58
|
-
protected vatAddress: Address;
|
|
59
|
-
protected poolConfigs: PoolConfig[];
|
|
60
|
-
protected eventPools: {
|
|
61
|
-
[gemAddress: string]: MakerPsmEventPool;
|
|
62
|
-
};
|
|
63
|
-
readonly hasConstantPriceLargeAmounts = true;
|
|
64
|
-
readonly isFeeOnTransferSupported = false;
|
|
65
|
-
static dexKeysWithNetwork: {
|
|
66
|
-
key: string;
|
|
67
|
-
networks: Network[];
|
|
68
|
-
}[];
|
|
69
|
-
logger: Logger;
|
|
70
|
-
constructor(network: Network, dexKey: string, dexHelper: IDexHelper, adapters?: {
|
|
71
|
-
[side: string]: {
|
|
72
|
-
name: string;
|
|
73
|
-
index: number;
|
|
74
|
-
}[] | null;
|
|
75
|
-
}, dai?: Token, vatAddress?: Address, poolConfigs?: PoolConfig[]);
|
|
76
|
-
static getDirectFunctionNameV6(): string[];
|
|
77
|
-
initializePricing(blockNumber: number): Promise<void>;
|
|
78
|
-
getAdapters(side: SwapSide): {
|
|
79
|
-
name: string;
|
|
80
|
-
index: number;
|
|
81
|
-
}[] | null;
|
|
82
|
-
getEventPool(srcToken: Token, destToken: Token): MakerPsmEventPool | null;
|
|
83
|
-
getPoolIdentifiers(srcToken: Token, destToken: Token, side: SwapSide, blockNumber: number): Promise<string[]>;
|
|
84
|
-
getPoolState(pool: MakerPsmEventPool, blockNumber: number): Promise<PoolState>;
|
|
85
|
-
computePrices(isSrcDai: boolean, to18ConversionFactor: bigint, side: SwapSide, amounts: bigint[], poolState: PoolState): bigint[];
|
|
86
|
-
getPricesVolume(srcToken: Token, destToken: Token, amounts: bigint[], side: SwapSide, blockNumber: number, limitPools?: string[]): Promise<null | ExchangePrices<MakerPsmData>>;
|
|
87
|
-
getCalldataGasCost(poolPrices: PoolPrices<MakerPsmData>): number | number[];
|
|
88
|
-
getPsmParams(srcToken: string, srcAmount: string, destAmount: string, data: MakerPsmData, side: SwapSide): {
|
|
89
|
-
isGemSell: boolean;
|
|
90
|
-
gemAmount: string;
|
|
91
|
-
};
|
|
92
|
-
getAdapterParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: MakerPsmData, side: SwapSide): AdapterExchangeParam;
|
|
93
|
-
getSimpleParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: MakerPsmData, side: SwapSide): Promise<SimpleExchangeParam>;
|
|
94
|
-
getTokenFromAddress(address: Address): Token;
|
|
95
|
-
preProcessTransaction?(optimalSwapExchange: OptimalSwapExchange<MakerPsmData>, srcToken: Token, destToken: Token, side: SwapSide, options: PreprocessTransactionOptions): Promise<[OptimalSwapExchange<MakerPsmData>, ExchangeTxInfo]>;
|
|
96
|
-
getDexParam(srcToken: Address, destToken: Address, srcAmount: NumberAsString, destAmount: NumberAsString, recipient: Address, data: MakerPsmData, side: SwapSide): DexExchangeParam;
|
|
97
|
-
getDirectParamV6(srcToken: Address, destToken: Address, fromAmount: NumberAsString, toAmount: NumberAsString, quotedAmount: NumberAsString, data: MakerPsmData, side: SwapSide, permit: string, uuid: string, partnerAndFee: string, beneficiary: string, blockNumber: number, contractMethod: string): {
|
|
98
|
-
params: MakerPsmDirectPayload;
|
|
99
|
-
encoder: (...params: (string | MakerPsmDirectPayload)[]) => string;
|
|
100
|
-
networkFee: string;
|
|
101
|
-
};
|
|
102
|
-
getTopPoolsForToken(tokenAddress: Address, limit: number): Promise<PoolLiquidity[]>;
|
|
103
|
-
}
|