@orbs-network/spot-ui 0.0.36 → 0.0.39
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/dist/spot-ui.js +439 -435
- package/dist/spot-ui.umd.cjs +8 -8
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/lib/build-repermit-order-data.d.ts +1 -0
- package/dist/src/lib/build-repermit-order-data.d.ts.map +1 -1
- package/dist/src/lib/consts.d.ts.map +1 -1
- package/dist/src/lib/submit-order.d.ts.map +1 -1
- package/dist/src/lib/types.d.ts +7 -0
- package/dist/src/lib/types.d.ts.map +1 -1
- package/dist/src/lib/utils.d.ts +1 -1
- package/dist/src/lib/utils.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/spot-ui.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var it = Object.defineProperty;
|
|
2
2
|
var ot = (e, n, r) => n in e ? it(e, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[n] = r;
|
|
3
|
-
var
|
|
4
|
-
const dt = { chainName: "ftm", chainId: 250, twapVersion: 4, twapAddress: "0xd3B290FEB04E353d1821bc0a12397FdEa9a846C0", lensAddress: "0x0221EfDF1Fd3212AF87F23cceB7693a65fAF1d7f", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SpookySwap", partner: "Orbs:TWAP:SpookySwap", exchangeAddress: "0xdF7CCd5fc7077E9de5f27a7b7bfDC837c82f8496", exchangeType: "ExchangeV2", pathfinderKey: "" }, ct = { chainName: "sonic", chainId: 146, twapVersion: 4, twapAddress: "0x8963992816b4EafE5a22b7DB2A99513c18be9afA", lensAddress: "0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SpookySwapSonic", partner: "Orbs:TWAP:SpookySwap", exchangeAddress: "0x6699bE3aF75e5c1B807b1031dBde6dA9A67739F3", exchangeType: "ExchangeV2", pathfinderKey: "" }, pt = { chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4", lensAddress: "0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "QuickSwap", partner: "Orbs:TWAP:QuickSwap", exchangeAddress: "0x8FCc245209bE85C49D738D0CE5613F74E5d91E86", exchangeType: "ParaswapExchange", pathfinderKey: "QuickSwap,QuickSwapV3" }, ut = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "QuickSwap", partner: "Orbs:TWAP:QuickSwap", exchangeAddress: "0xb7a3d74895bfd3aff6780525e36d79fcf26a895f", exchangeType: "ExchangeV2", pathfinderKey: "" }, lt = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Chronos", partner: "Orbs:TWAP:Chronos", exchangeAddress: "0x0178e50adAF3b925F27aC518FCd952CE7F9A3B36", exchangeType: "ExchangeV2", pathfinderKey: "Chronos Stable,Chronos Volatile,Chronos V3" }, ft = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "BaseSwap", partner: "Orbs:TWAP:BaseSwap", exchangeAddress: "0xAca3155c17530C4aA96746F226fcC049658490d2", exchangeType: "ExchangeV2", pathfinderKey: "BaseSwap,BaseSwapX" }, mt = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Arbidex", partner: "Orbs:TWAP:Arbidex", exchangeAddress: "0x49d21052f4695d16C7cce6eF561301Aa4d840420", exchangeType: "ExchangeV2", pathfinderKey: "Arbidex Classic,Arbidex Quantum" }, yt = { chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994", lensAddress: "0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Thena", partner: "Orbs:TWAP:Thena", exchangeAddress: "0x2B2fABDbfa4a15da0d351F947C14F4520db0bDc1", exchangeType: "ExchangeV2", pathfinderKey: "43,47" }, ht = { chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994", lensAddress: "0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0x1A2bb6B75D58b740d88413ef4840D6fa3F637940", exchangeType: "P2Exchange", pathfinderKey: "" }, At = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0xb37cB9A058c03081Ae6EF934313588cD53d408e7", exchangeType: "P2Exchange", pathfinderKey: "" }, bt = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0xb37cB9A058c03081Ae6EF934313588cD53d408e7", exchangeType: "P2Exchange", pathfinderKey: "" }, gt = { chainName: "linea", chainId: 59144, twapVersion: 4, twapAddress: "0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78", lensAddress: "0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 100, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0xb37cB9A058c03081Ae6EF934313588cD53d408e7", exchangeType: "P2Exchange", pathfinderKey: "" }, Et = { chainName: "linea", chainId: 59144, twapVersion: 4, twapAddress: "0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78", lensAddress: "0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 100, name: "Lynex", partner: "Orbs:TWAP:Lynex", exchangeAddress: "0x04C06C96d7D19977156016DD408B5992af0570a2", exchangeType: "ExchangeV2", pathfinderKey: "19,18" }, xt = { chainName: "zkSync", chainId: 324, twapVersion: 4, twapAddress: "0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68", lensAddress: "0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9", takers: ["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC", "0xBE452F03Be354CAC397C3F0c8397672067D44531"], bidDelaySeconds: 60, minChunkSizeUsd: 100, name: "SyncSwap", partner: "Orbs:TWAP:SyncSwap", exchangeAddress: "0x422623a40c42f026Ed33A9910078Aa843FD66e27", exchangeType: "ExchangeV2", pathfinderKey: "2,3" }, Tt = { chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4", lensAddress: "0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "Retro", partner: "Orbs:TWAP:Retro", exchangeAddress: "0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F", exchangeType: "ExchangeV2", pathfinderKey: "retro,retro-v3" }, wt = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "SushiArb", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad", exchangeType: "ExchangeV2", pathfinderKey: "" }, Ft = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "SushiBase", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad", exchangeType: "ExchangeV2", pathfinderKey: "" }, Ct = { chainName: "eth", chainId: 1, twapVersion: 4, twapAddress: "0xb1ed8BCAD1EaC8a1DF0764700472391800D12946", lensAddress: "0x0967f448c4d4dbd14c355E635AE9CbF68cc44A60", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 200, name: "SushiEth", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad", exchangeType: "ExchangeV2", pathfinderKey: "" }, Dt = { chainName: "katana", chainId: 747474, twapVersion: 4, twapAddress: "0xf2d96E7BE676153d202e1453804E2749923C7c5b", lensAddress: "0x1579EED0527781B1A748043AA1f59a3858Ace4a7", takers: ["0xF74437A3Fc45a518640828E5D6A3E8c9A9BbDC3a", "0x07A6C715063e94c0D95e809efefFCbF4EBEdfD55"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "SushiKatana", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x92209481507e6B2d14C9b5b70Ed287024177220E", exchangeType: "ExchangeV2", pathfinderKey: "" }, St = { chainName: "sei", chainId: 1329, twapVersion: 4, twapAddress: "0xde737dB24548F8d41A4a3Ca2Bac8aaaDc4DBA099", lensAddress: "0xa1376f2Bb80D3cF6c2D8ebEf34b3d122e9af4020", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "DragonSwap", partner: "Orbs:TWAP:DragonSwap", exchangeAddress: "0xf2F933FafbDB97062CfA3c447ff373e76A90Efd6", exchangeType: "ExchangeV2", pathfinderKey: "" }, kt = { chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4", lensAddress: "0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "TeaFi", partner: "Orbs:TWAP:TeaFi", exchangeAddress: "0xE9D3b4Cf5B0CC392e78C1a4DD9885D449EEF9793", exchangeType: "ParaswapExchange", pathfinderKey: "AaveV2,AaveV3,AaveV3Stata,AngleStakedStableEUR,AngleStakedStableUSD,ApeSwap,AugustusRFQ,BalancerV2,ComethSwap,CurveV1,CurveV1Factory,CurveV1StableNg,CurveV2,Dfyn,DODOV2,Dystopia,Hashflow,IronV2,JarvisV6,KyberDmm,QuickSwap,QuickSwapV3,Retro,SushiSwap,SushiSwapV3,SwaapV2,Synapse,UniswapV2,UniswapV3,WaultFinance,Wmatic,WooFiV2,wUSDM" }, Bt = { chainName: "flare", chainId: 14, twapVersion: 4, twapAddress: "0x9D70B0b90915Bb8b9bdAC7e6a7e6435bBF1feC4D", lensAddress: "0xf2d96E7BE676153d202e1453804E2749923C7c5b", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SparkDEX", partner: "Orbs:TWAP:SparkDEX", exchangeAddress: "0xe59c53C76bB7EEc01401A18fA8215B94bC65Bf56", exchangeType: "P2Exchange" }, _t = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Ramses", partner: "Orbs:TWAP:Ramses", exchangeAddress: "0x8FCc245209bE85C49D738D0CE5613F74E5d91E86", exchangeType: "ParaswapExchange", pathfinderKey: "" }, Ot = { chainName: "sonic", chainId: 146, twapVersion: 4, twapAddress: "0x8963992816b4EafE5a22b7DB2A99513c18be9afA", lensAddress: "0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SwapX", partner: "Orbs:TWAP:SwapX", exchangeAddress: "0xDA902994b7F7a1ecDd8De02E4a17dbFF2E6F67b7", exchangeType: "ExchangeV2", pathfinderKey: "" }, vt = { chainName: "cronos-zkevm", chainId: 388, twapVersion: 4, twapAddress: "0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68", lensAddress: "0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9", takers: ["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC", "0xBE452F03Be354CAC397C3F0c8397672067D44531"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "H2Finance", partner: "Orbs:TWAP:H2Finance", exchangeAddress: "0x2f1f10dc311722Be609e6B427bF3FBac6e44093B", exchangeType: "ExchangeV2" }, Rt = { chainName: "sonic", chainId: 146, twapVersion: 4, twapAddress: "0x8963992816b4EafE5a22b7DB2A99513c18be9afA", lensAddress: "0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "Shadow", partner: "Orbs:TWAP:Shadow", exchangeAddress: "0x69e3c891450161b7BF27f181eE85E7bAE69E5b07", exchangeType: "ExchangeV2" }, Pt = { chainName: "berachain", chainId: 80094, twapVersion: 4, twapAddress: "0xD13609A8ace04D11Ea2FFE176B69dF77C6d9375E", lensAddress: "0xA0b07F9a11dFb01388149abBdbc5B4f2196600AB", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "Kodiak", partner: "Orbs:TWAP:Kodiak", exchangeAddress: "0x69B7aE1250B8d1309954CaD65b6607ae478Ec6eE", exchangeType: "ExchangeV2" }, It = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "OmniBase", partner: "Orbs:TWAP:OmniBase", exchangeAddress: "0x54435FcFDF3A08150Ed799b6EF472A20a432303F", exchangeType: "ParaswapExchange" }, Nt = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "OmniArb", partner: "Orbs:TWAP:OmniArb", exchangeAddress: "0xF0607785424d342Cceb33E708f4579CA97a3b392", exchangeType: "ParaswapExchange" }, Mt = { chainName: "avax", chainId: 43114, twapVersion: 4, twapAddress: "0xf77Ad005aBF7e31f669ce89a6568B2f39Ca92cDe", lensAddress: "0x48466B82Ce1575c5c9eCa168ac1090048dD47fA3", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "BlackholeAvax", partner: "Orbs:TWAP:BlackholeAvax", exchangeAddress: "0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F", exchangeType: "ExchangeV2" }, Ut = { chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994", lensAddress: "0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "NewEraBnb", partner: "Orbs:TWAP:NewEraBnb", exchangeAddress: "0xA22D7Df24d9Ea4D4EF6dC96b2204bd550430eC42", exchangeType: "ExchangeV2" }, _ = {
|
|
3
|
+
var Ce = (e, n, r) => ot(e, typeof n != "symbol" ? n + "" : n, r);
|
|
4
|
+
const dt = { chainName: "ftm", chainId: 250, twapVersion: 4, twapAddress: "0xd3B290FEB04E353d1821bc0a12397FdEa9a846C0", lensAddress: "0x0221EfDF1Fd3212AF87F23cceB7693a65fAF1d7f", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SpookySwap", partner: "Orbs:TWAP:SpookySwap", exchangeAddress: "0xdF7CCd5fc7077E9de5f27a7b7bfDC837c82f8496", exchangeType: "ExchangeV2", pathfinderKey: "" }, ct = { chainName: "sonic", chainId: 146, twapVersion: 4, twapAddress: "0x8963992816b4EafE5a22b7DB2A99513c18be9afA", lensAddress: "0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SpookySwapSonic", partner: "Orbs:TWAP:SpookySwap", exchangeAddress: "0x6699bE3aF75e5c1B807b1031dBde6dA9A67739F3", exchangeType: "ExchangeV2", pathfinderKey: "" }, pt = { chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4", lensAddress: "0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "QuickSwap", partner: "Orbs:TWAP:QuickSwap", exchangeAddress: "0x8FCc245209bE85C49D738D0CE5613F74E5d91E86", exchangeType: "ParaswapExchange", pathfinderKey: "QuickSwap,QuickSwapV3" }, ut = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "QuickSwap", partner: "Orbs:TWAP:QuickSwap", exchangeAddress: "0xb7a3d74895bfd3aff6780525e36d79fcf26a895f", exchangeType: "ExchangeV2", pathfinderKey: "" }, lt = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Chronos", partner: "Orbs:TWAP:Chronos", exchangeAddress: "0x0178e50adAF3b925F27aC518FCd952CE7F9A3B36", exchangeType: "ExchangeV2", pathfinderKey: "Chronos Stable,Chronos Volatile,Chronos V3" }, ft = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "BaseSwap", partner: "Orbs:TWAP:BaseSwap", exchangeAddress: "0xAca3155c17530C4aA96746F226fcC049658490d2", exchangeType: "ExchangeV2", pathfinderKey: "BaseSwap,BaseSwapX" }, mt = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Arbidex", partner: "Orbs:TWAP:Arbidex", exchangeAddress: "0x49d21052f4695d16C7cce6eF561301Aa4d840420", exchangeType: "ExchangeV2", pathfinderKey: "Arbidex Classic,Arbidex Quantum" }, yt = { chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994", lensAddress: "0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Thena", partner: "Orbs:TWAP:Thena", exchangeAddress: "0x2B2fABDbfa4a15da0d351F947C14F4520db0bDc1", exchangeType: "ExchangeV2", pathfinderKey: "43,47" }, ht = { chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994", lensAddress: "0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0x1A2bb6B75D58b740d88413ef4840D6fa3F637940", exchangeType: "P2Exchange", pathfinderKey: "" }, At = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0xb37cB9A058c03081Ae6EF934313588cD53d408e7", exchangeType: "P2Exchange", pathfinderKey: "" }, bt = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0xb37cB9A058c03081Ae6EF934313588cD53d408e7", exchangeType: "P2Exchange", pathfinderKey: "" }, gt = { chainName: "linea", chainId: 59144, twapVersion: 4, twapAddress: "0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78", lensAddress: "0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 100, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0xb37cB9A058c03081Ae6EF934313588cD53d408e7", exchangeType: "P2Exchange", pathfinderKey: "" }, Et = { chainName: "linea", chainId: 59144, twapVersion: 4, twapAddress: "0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78", lensAddress: "0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 100, name: "Lynex", partner: "Orbs:TWAP:Lynex", exchangeAddress: "0x04C06C96d7D19977156016DD408B5992af0570a2", exchangeType: "ExchangeV2", pathfinderKey: "19,18" }, xt = { chainName: "zkSync", chainId: 324, twapVersion: 4, twapAddress: "0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68", lensAddress: "0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9", takers: ["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC", "0xBE452F03Be354CAC397C3F0c8397672067D44531"], bidDelaySeconds: 60, minChunkSizeUsd: 100, name: "SyncSwap", partner: "Orbs:TWAP:SyncSwap", exchangeAddress: "0x422623a40c42f026Ed33A9910078Aa843FD66e27", exchangeType: "ExchangeV2", pathfinderKey: "2,3" }, Tt = { chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4", lensAddress: "0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "Retro", partner: "Orbs:TWAP:Retro", exchangeAddress: "0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F", exchangeType: "ExchangeV2", pathfinderKey: "retro,retro-v3" }, wt = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "SushiArb", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad", exchangeType: "ExchangeV2", pathfinderKey: "" }, Ct = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "SushiBase", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad", exchangeType: "ExchangeV2", pathfinderKey: "" }, Ft = { chainName: "eth", chainId: 1, twapVersion: 4, twapAddress: "0xb1ed8BCAD1EaC8a1DF0764700472391800D12946", lensAddress: "0x0967f448c4d4dbd14c355E635AE9CbF68cc44A60", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 200, name: "SushiEth", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad", exchangeType: "ExchangeV2", pathfinderKey: "" }, Dt = { chainName: "katana", chainId: 747474, twapVersion: 4, twapAddress: "0xf2d96E7BE676153d202e1453804E2749923C7c5b", lensAddress: "0x1579EED0527781B1A748043AA1f59a3858Ace4a7", takers: ["0xF74437A3Fc45a518640828E5D6A3E8c9A9BbDC3a", "0x07A6C715063e94c0D95e809efefFCbF4EBEdfD55"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "SushiKatana", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x92209481507e6B2d14C9b5b70Ed287024177220E", exchangeType: "ExchangeV2", pathfinderKey: "" }, St = { chainName: "sei", chainId: 1329, twapVersion: 4, twapAddress: "0xde737dB24548F8d41A4a3Ca2Bac8aaaDc4DBA099", lensAddress: "0xa1376f2Bb80D3cF6c2D8ebEf34b3d122e9af4020", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "DragonSwap", partner: "Orbs:TWAP:DragonSwap", exchangeAddress: "0xf2F933FafbDB97062CfA3c447ff373e76A90Efd6", exchangeType: "ExchangeV2", pathfinderKey: "" }, kt = { chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4", lensAddress: "0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "TeaFi", partner: "Orbs:TWAP:TeaFi", exchangeAddress: "0xE9D3b4Cf5B0CC392e78C1a4DD9885D449EEF9793", exchangeType: "ParaswapExchange", pathfinderKey: "AaveV2,AaveV3,AaveV3Stata,AngleStakedStableEUR,AngleStakedStableUSD,ApeSwap,AugustusRFQ,BalancerV2,ComethSwap,CurveV1,CurveV1Factory,CurveV1StableNg,CurveV2,Dfyn,DODOV2,Dystopia,Hashflow,IronV2,JarvisV6,KyberDmm,QuickSwap,QuickSwapV3,Retro,SushiSwap,SushiSwapV3,SwaapV2,Synapse,UniswapV2,UniswapV3,WaultFinance,Wmatic,WooFiV2,wUSDM" }, Bt = { chainName: "flare", chainId: 14, twapVersion: 4, twapAddress: "0x9D70B0b90915Bb8b9bdAC7e6a7e6435bBF1feC4D", lensAddress: "0xf2d96E7BE676153d202e1453804E2749923C7c5b", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SparkDEX", partner: "Orbs:TWAP:SparkDEX", exchangeAddress: "0xe59c53C76bB7EEc01401A18fA8215B94bC65Bf56", exchangeType: "P2Exchange" }, _t = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Ramses", partner: "Orbs:TWAP:Ramses", exchangeAddress: "0x8FCc245209bE85C49D738D0CE5613F74E5d91E86", exchangeType: "ParaswapExchange", pathfinderKey: "" }, Ot = { chainName: "sonic", chainId: 146, twapVersion: 4, twapAddress: "0x8963992816b4EafE5a22b7DB2A99513c18be9afA", lensAddress: "0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SwapX", partner: "Orbs:TWAP:SwapX", exchangeAddress: "0xDA902994b7F7a1ecDd8De02E4a17dbFF2E6F67b7", exchangeType: "ExchangeV2", pathfinderKey: "" }, Rt = { chainName: "cronos-zkevm", chainId: 388, twapVersion: 4, twapAddress: "0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68", lensAddress: "0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9", takers: ["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC", "0xBE452F03Be354CAC397C3F0c8397672067D44531"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "H2Finance", partner: "Orbs:TWAP:H2Finance", exchangeAddress: "0x2f1f10dc311722Be609e6B427bF3FBac6e44093B", exchangeType: "ExchangeV2" }, vt = { chainName: "sonic", chainId: 146, twapVersion: 4, twapAddress: "0x8963992816b4EafE5a22b7DB2A99513c18be9afA", lensAddress: "0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "Shadow", partner: "Orbs:TWAP:Shadow", exchangeAddress: "0x69e3c891450161b7BF27f181eE85E7bAE69E5b07", exchangeType: "ExchangeV2" }, Pt = { chainName: "berachain", chainId: 80094, twapVersion: 4, twapAddress: "0xD13609A8ace04D11Ea2FFE176B69dF77C6d9375E", lensAddress: "0xA0b07F9a11dFb01388149abBdbc5B4f2196600AB", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "Kodiak", partner: "Orbs:TWAP:Kodiak", exchangeAddress: "0x69B7aE1250B8d1309954CaD65b6607ae478Ec6eE", exchangeType: "ExchangeV2" }, It = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "OmniBase", partner: "Orbs:TWAP:OmniBase", exchangeAddress: "0x54435FcFDF3A08150Ed799b6EF472A20a432303F", exchangeType: "ParaswapExchange" }, Nt = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "OmniArb", partner: "Orbs:TWAP:OmniArb", exchangeAddress: "0xF0607785424d342Cceb33E708f4579CA97a3b392", exchangeType: "ParaswapExchange" }, Mt = { chainName: "avax", chainId: 43114, twapVersion: 4, twapAddress: "0xf77Ad005aBF7e31f669ce89a6568B2f39Ca92cDe", lensAddress: "0x48466B82Ce1575c5c9eCa168ac1090048dD47fA3", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "BlackholeAvax", partner: "Orbs:TWAP:BlackholeAvax", exchangeAddress: "0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F", exchangeType: "ExchangeV2" }, Lt = { chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994", lensAddress: "0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "NewEraBnb", partner: "Orbs:TWAP:NewEraBnb", exchangeAddress: "0xA22D7Df24d9Ea4D4EF6dC96b2204bd550430eC42", exchangeType: "ExchangeV2" }, _ = {
|
|
5
5
|
SpookySwap: dt,
|
|
6
6
|
SpookySwapSonic: ct,
|
|
7
7
|
QuickSwap: pt,
|
|
@@ -18,22 +18,22 @@ const dt = { chainName: "ftm", chainId: 250, twapVersion: 4, twapAddress: "0xd3B
|
|
|
18
18
|
SyncSwap: xt,
|
|
19
19
|
Retro: Tt,
|
|
20
20
|
SushiArb: wt,
|
|
21
|
-
SushiBase:
|
|
22
|
-
SushiEth:
|
|
21
|
+
SushiBase: Ct,
|
|
22
|
+
SushiEth: Ft,
|
|
23
23
|
SushiKatana: Dt,
|
|
24
24
|
DragonSwap: St,
|
|
25
25
|
TeaFi: kt,
|
|
26
26
|
SparkDEX: Bt,
|
|
27
27
|
Ramses: _t,
|
|
28
28
|
SwapX: Ot,
|
|
29
|
-
H2Finance:
|
|
30
|
-
Shadow:
|
|
29
|
+
H2Finance: Rt,
|
|
30
|
+
Shadow: vt,
|
|
31
31
|
Kodiak: Pt,
|
|
32
32
|
OmniBase: It,
|
|
33
33
|
OmniArb: Nt,
|
|
34
34
|
BlackholeAvax: Mt,
|
|
35
|
-
NewEraBnb:
|
|
36
|
-
},
|
|
35
|
+
NewEraBnb: Lt
|
|
36
|
+
}, Ut = [
|
|
37
37
|
{
|
|
38
38
|
constant: !1,
|
|
39
39
|
inputs: [
|
|
@@ -690,15 +690,15 @@ const dt = { chainName: "ftm", chainId: 250, twapVersion: 4, twapAddress: "0xd3B
|
|
|
690
690
|
}
|
|
691
691
|
]
|
|
692
692
|
}
|
|
693
|
-
],
|
|
694
|
-
var z = /* @__PURE__ */ ((e) => (e.TWAP = "TWAP", e.LIMIT = "LIMIT", e.STOP_LOSS = "STOP_LOSS", e.TAKE_PROFIT = "TAKE_PROFIT", e))(z || {}),
|
|
695
|
-
const
|
|
693
|
+
], Wn = Ut, zn = Vt, $n = zt, Hn = Wt;
|
|
694
|
+
var z = /* @__PURE__ */ ((e) => (e.TWAP = "TWAP", e.LIMIT = "LIMIT", e.STOP_LOSS = "STOP_LOSS", e.TAKE_PROFIT = "TAKE_PROFIT", e))(z || {}), ie = /* @__PURE__ */ ((e) => (e.Open = "OPEN", e.Canceled = "CANCELED", e.Completed = "COMPLETED", e.Expired = "EXPIRED", e))(ie || {}), $t = /* @__PURE__ */ ((e) => (e.All = "ALL", e.Open = "OPEN", e.Canceled = "CANCELED", e.Completed = "COMPLETED", e.Expired = "EXPIRED", e))($t || {}), se = /* @__PURE__ */ ((e) => (e[e.Minutes = 6e4] = "Minutes", e[e.Hours = 36e5] = "Hours", e[e.Weeks = 6048e5] = "Weeks", e[e.Days = 864e5] = "Days", e[e.Months = 2592e6] = "Months", e[e.Years = 31536e6] = "Years", e))(se || {}), q = /* @__PURE__ */ ((e) => (e.LIMIT = "limit", e.TWAP_LIMIT = "twap-limit", e.TWAP_MARKET = "twap-market", e.TAKE_PROFIT = "take-profit", e.STOP_LOSS_LIMIT = "stop-loss-limit", e.STOP_LOSS_MARKET = "stop-loss-market", e))(q || {}), ce = /* @__PURE__ */ ((e) => (e.Arbidex = "arbidex", e.Blackhole = "blackhole", e.Chronos = "chronos", e.Dragon = "dragon", e.Kodiak = "kodiak", e.Lynex = "lynex", e.Nami = "nami", e.Newera = "newera", e.Omni = "omni", e.Pancake = "pancake", e.Quick = "quick", e.Ramses = "ramses", e.Shadow = "shadow", e.Spark = "spark", e.Spooky = "spooky", e.Swapx = "swapx", e.Teafi = "teafi", e.Thena = "thena", e.Yowie = "yowie", e.Pangolin = "pangolin", e.Sushiswap = "sushiswap", e.Agent = "agent", e))(ce || {}), Ht = /* @__PURE__ */ ((e) => (e[e.EMPTY_LIMIT_PRICE = 0] = "EMPTY_LIMIT_PRICE", e[e.MAX_CHUNKS = 1] = "MAX_CHUNKS", e[e.MIN_CHUNKS = 2] = "MIN_CHUNKS", e[e.MIN_TRADE_SIZE = 3] = "MIN_TRADE_SIZE", e[e.MAX_FILL_DELAY = 4] = "MAX_FILL_DELAY", e[e.MIN_FILL_DELAY = 5] = "MIN_FILL_DELAY", e[e.MAX_ORDER_DURATION = 6] = "MAX_ORDER_DURATION", e[e.MIN_ORDER_DURATION = 7] = "MIN_ORDER_DURATION", e[e.MISSING_LIMIT_PRICE = 8] = "MISSING_LIMIT_PRICE", e[e.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE = 9] = "STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE", e[e.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE = 10] = "TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE", e[e.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE = 11] = "TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE", e[e.EMPTY_TRIGGER_PRICE = 12] = "EMPTY_TRIGGER_PRICE", e[e.INSUFFICIENT_BALANCE = 13] = "INSUFFICIENT_BALANCE", e[e.MAX_ORDER_SIZE = 14] = "MAX_ORDER_SIZE", e[e.MIN_TRADE_SIZE_ERROR = 15] = "MIN_TRADE_SIZE_ERROR", e))(Ht || {});
|
|
695
|
+
const U = "0x0000000000000000000000000000000000000000", K = {
|
|
696
696
|
eth: {
|
|
697
697
|
id: 1,
|
|
698
698
|
name: "Ethereum",
|
|
699
699
|
shortname: "eth",
|
|
700
700
|
native: {
|
|
701
|
-
address:
|
|
701
|
+
address: U,
|
|
702
702
|
symbol: "ETH",
|
|
703
703
|
decimals: 18,
|
|
704
704
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -719,7 +719,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
719
719
|
name: "BinanceSmartChain",
|
|
720
720
|
shortname: "bsc",
|
|
721
721
|
native: {
|
|
722
|
-
address:
|
|
722
|
+
address: U,
|
|
723
723
|
symbol: "BNB",
|
|
724
724
|
decimals: 18,
|
|
725
725
|
logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"
|
|
@@ -740,7 +740,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
740
740
|
name: "Polygon",
|
|
741
741
|
shortname: "poly",
|
|
742
742
|
native: {
|
|
743
|
-
address:
|
|
743
|
+
address: U,
|
|
744
744
|
symbol: "POL",
|
|
745
745
|
decimals: 18,
|
|
746
746
|
logoUrl: "https://s2.coinmarketcap.com/static/img/coins/64x64/28321.png"
|
|
@@ -761,7 +761,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
761
761
|
name: "Arbitrum",
|
|
762
762
|
shortname: "arb",
|
|
763
763
|
native: {
|
|
764
|
-
address:
|
|
764
|
+
address: U,
|
|
765
765
|
symbol: "ETH",
|
|
766
766
|
decimals: 18,
|
|
767
767
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -782,7 +782,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
782
782
|
name: "Sei",
|
|
783
783
|
shortname: "sei",
|
|
784
784
|
native: {
|
|
785
|
-
address:
|
|
785
|
+
address: U,
|
|
786
786
|
symbol: "SEI",
|
|
787
787
|
decimals: 18,
|
|
788
788
|
logoUrl: "https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png"
|
|
@@ -803,7 +803,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
803
803
|
name: "Avalanche",
|
|
804
804
|
shortname: "avax",
|
|
805
805
|
native: {
|
|
806
|
-
address:
|
|
806
|
+
address: U,
|
|
807
807
|
symbol: "AVAX",
|
|
808
808
|
decimals: 18,
|
|
809
809
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/avalanche.svg"
|
|
@@ -824,7 +824,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
824
824
|
name: "Fantom",
|
|
825
825
|
shortname: "ftm",
|
|
826
826
|
native: {
|
|
827
|
-
address:
|
|
827
|
+
address: U,
|
|
828
828
|
symbol: "FTM",
|
|
829
829
|
decimals: 18,
|
|
830
830
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/fantom.svg"
|
|
@@ -845,7 +845,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
845
845
|
name: "Base",
|
|
846
846
|
shortname: "base",
|
|
847
847
|
native: {
|
|
848
|
-
address:
|
|
848
|
+
address: U,
|
|
849
849
|
symbol: "ETH",
|
|
850
850
|
decimals: 18,
|
|
851
851
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -866,7 +866,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
866
866
|
name: "Linea",
|
|
867
867
|
shortname: "linea",
|
|
868
868
|
native: {
|
|
869
|
-
address:
|
|
869
|
+
address: U,
|
|
870
870
|
symbol: "ETH",
|
|
871
871
|
decimals: 18,
|
|
872
872
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -887,7 +887,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
887
887
|
name: "zksync",
|
|
888
888
|
shortname: "zksync",
|
|
889
889
|
native: {
|
|
890
|
-
address:
|
|
890
|
+
address: U,
|
|
891
891
|
symbol: "ETH",
|
|
892
892
|
decimals: 18,
|
|
893
893
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -908,7 +908,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
908
908
|
name: "zkevm",
|
|
909
909
|
shortname: "zkevm",
|
|
910
910
|
native: {
|
|
911
|
-
address:
|
|
911
|
+
address: U,
|
|
912
912
|
symbol: "ETH",
|
|
913
913
|
decimals: 18,
|
|
914
914
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -929,7 +929,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
929
929
|
name: "manta",
|
|
930
930
|
shortname: "manta",
|
|
931
931
|
native: {
|
|
932
|
-
address:
|
|
932
|
+
address: U,
|
|
933
933
|
symbol: "ETH",
|
|
934
934
|
decimals: 18,
|
|
935
935
|
logoUrl: "https://icons.llamao.fi/icons/chains/rsz_manta.jpg"
|
|
@@ -950,7 +950,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
950
950
|
name: "blast",
|
|
951
951
|
shortname: "blast",
|
|
952
952
|
native: {
|
|
953
|
-
address:
|
|
953
|
+
address: U,
|
|
954
954
|
symbol: "ETH",
|
|
955
955
|
decimals: 18,
|
|
956
956
|
logoUrl: "https://icons.llamao.fi/icons/chains/rsz_blast"
|
|
@@ -971,7 +971,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
971
971
|
name: "sonic",
|
|
972
972
|
shortname: "sonic",
|
|
973
973
|
native: {
|
|
974
|
-
address:
|
|
974
|
+
address: U,
|
|
975
975
|
symbol: "S",
|
|
976
976
|
decimals: 18,
|
|
977
977
|
logoUrl: "https://icons.llamao.fi/icons/chains/rsz_sonic"
|
|
@@ -992,7 +992,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
992
992
|
name: "scroll",
|
|
993
993
|
shortname: "scroll",
|
|
994
994
|
native: {
|
|
995
|
-
address:
|
|
995
|
+
address: U,
|
|
996
996
|
symbol: "ETH",
|
|
997
997
|
decimals: 18,
|
|
998
998
|
logoUrl: "https://icons.llamao.fi/icons/chains/rsz_scroll"
|
|
@@ -1013,7 +1013,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
1013
1013
|
name: "Zircuit",
|
|
1014
1014
|
shortname: "zircuit",
|
|
1015
1015
|
native: {
|
|
1016
|
-
address:
|
|
1016
|
+
address: U,
|
|
1017
1017
|
symbol: "ETH",
|
|
1018
1018
|
decimals: 18,
|
|
1019
1019
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -1034,7 +1034,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
1034
1034
|
name: "flare",
|
|
1035
1035
|
shortname: "flare",
|
|
1036
1036
|
native: {
|
|
1037
|
-
address:
|
|
1037
|
+
address: U,
|
|
1038
1038
|
symbol: "FLR",
|
|
1039
1039
|
decimals: 18,
|
|
1040
1040
|
logoUrl: "https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48"
|
|
@@ -1079,7 +1079,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
1079
1079
|
name: "Katana",
|
|
1080
1080
|
shortname: "katana",
|
|
1081
1081
|
native: {
|
|
1082
|
-
address:
|
|
1082
|
+
address: U,
|
|
1083
1083
|
symbol: "ETH",
|
|
1084
1084
|
decimals: 18,
|
|
1085
1085
|
logoUrl: "https://katana.network/assets/katana-logo.svg"
|
|
@@ -1102,7 +1102,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
1102
1102
|
name: "Bera",
|
|
1103
1103
|
shortname: "bera",
|
|
1104
1104
|
native: {
|
|
1105
|
-
address:
|
|
1105
|
+
address: U,
|
|
1106
1106
|
symbol: "BERA",
|
|
1107
1107
|
decimals: 18,
|
|
1108
1108
|
logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/24647.png"
|
|
@@ -1125,7 +1125,7 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
1125
1125
|
name: "Monad",
|
|
1126
1126
|
shortname: "monad",
|
|
1127
1127
|
native: {
|
|
1128
|
-
address:
|
|
1128
|
+
address: U,
|
|
1129
1129
|
symbol: "MONAD",
|
|
1130
1130
|
decimals: 18,
|
|
1131
1131
|
logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png"
|
|
@@ -1142,9 +1142,9 @@ const L = "0x0000000000000000000000000000000000000000", K = {
|
|
|
1142
1142
|
eip1559: !0
|
|
1143
1143
|
}
|
|
1144
1144
|
};
|
|
1145
|
-
var
|
|
1145
|
+
var Kt = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, _e = Math.ceil, J = Math.floor, j = "[BigNumber Error] ", Ke = j + "Number primitive has more than 15 significant digits: ", ne = 1e14, B = 14, Oe = 9007199254740991, Re = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], ue = 1e7, W = 1e9;
|
|
1146
1146
|
function Ye(e) {
|
|
1147
|
-
var n, r, y, d = b.prototype = { constructor: b, toString: null, valueOf: null }, h = new b(1), g = 20, x = 4, w = -7, D = 21, k = -1e7, T = 1e7,
|
|
1147
|
+
var n, r, y, d = b.prototype = { constructor: b, toString: null, valueOf: null }, h = new b(1), g = 20, x = 4, w = -7, D = 21, k = -1e7, T = 1e7, C = !1, P = 1, I = 0, pe = {
|
|
1148
1148
|
prefix: "",
|
|
1149
1149
|
groupSize: 3,
|
|
1150
1150
|
secondaryGroupSize: 0,
|
|
@@ -1154,7 +1154,7 @@ function Ye(e) {
|
|
|
1154
1154
|
fractionGroupSeparator: " ",
|
|
1155
1155
|
// non-breaking space
|
|
1156
1156
|
suffix: ""
|
|
1157
|
-
},
|
|
1157
|
+
}, Q = "0123456789abcdefghijklmnopqrstuvwxyz", fe = !0;
|
|
1158
1158
|
function b(t, a) {
|
|
1159
1159
|
var s, l, o, p, m, i, c, f, u = this;
|
|
1160
1160
|
if (!(u instanceof b)) return new b(t, a);
|
|
@@ -1171,20 +1171,20 @@ function Ye(e) {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
f = String(t);
|
|
1173
1173
|
} else {
|
|
1174
|
-
if (!
|
|
1174
|
+
if (!Kt.test(f = String(t))) return y(u, f, i);
|
|
1175
1175
|
u.s = f.charCodeAt(0) == 45 ? (f = f.slice(1), -1) : 1;
|
|
1176
1176
|
}
|
|
1177
1177
|
(p = f.indexOf(".")) > -1 && (f = f.replace(".", "")), (m = f.search(/e/i)) > 0 ? (p < 0 && (p = m), p += +f.slice(m + 1), f = f.substring(0, m)) : p < 0 && (p = f.length);
|
|
1178
1178
|
} else {
|
|
1179
|
-
if (N(a, 2,
|
|
1180
|
-
return u = new b(t),
|
|
1179
|
+
if (N(a, 2, Q.length, "Base"), a == 10 && fe)
|
|
1180
|
+
return u = new b(t), X(u, g + u.e + 1, x);
|
|
1181
1181
|
if (f = String(t), i = typeof t == "number") {
|
|
1182
1182
|
if (t * 0 != 0) return y(u, f, i, a);
|
|
1183
1183
|
if (u.s = 1 / t < 0 ? (f = f.slice(1), -1) : 1, b.DEBUG && f.replace(/^0\.0*|\./, "").length > 15)
|
|
1184
1184
|
throw Error(Ke + t);
|
|
1185
1185
|
} else
|
|
1186
1186
|
u.s = f.charCodeAt(0) === 45 ? (f = f.slice(1), -1) : 1;
|
|
1187
|
-
for (s =
|
|
1187
|
+
for (s = Q.slice(0, a), p = m = 0, c = f.length; m < c; m++)
|
|
1188
1188
|
if (s.indexOf(l = f.charAt(m)) < 0) {
|
|
1189
1189
|
if (l == ".") {
|
|
1190
1190
|
if (m > p) {
|
|
@@ -1202,7 +1202,7 @@ function Ye(e) {
|
|
|
1202
1202
|
for (m = 0; f.charCodeAt(m) === 48; m++) ;
|
|
1203
1203
|
for (c = f.length; f.charCodeAt(--c) === 48; ) ;
|
|
1204
1204
|
if (f = f.slice(m, ++c)) {
|
|
1205
|
-
if (c -= m, i && b.DEBUG && c > 15 && (t > Oe || t !==
|
|
1205
|
+
if (c -= m, i && b.DEBUG && c > 15 && (t > Oe || t !== J(t)))
|
|
1206
1206
|
throw Error(Ke + u.s * t);
|
|
1207
1207
|
if ((p = p - m - 1) > T)
|
|
1208
1208
|
u.c = u.e = null;
|
|
@@ -1231,71 +1231,71 @@ function Ye(e) {
|
|
|
1231
1231
|
else if (N(s, -W, W, a), s)
|
|
1232
1232
|
k = -(T = s < 0 ? -s : s);
|
|
1233
1233
|
else
|
|
1234
|
-
throw Error(
|
|
1234
|
+
throw Error(j + a + " cannot be zero: " + s);
|
|
1235
1235
|
if (t.hasOwnProperty(a = "CRYPTO"))
|
|
1236
1236
|
if (s = t[a], s === !!s)
|
|
1237
1237
|
if (s)
|
|
1238
1238
|
if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
|
|
1239
|
-
|
|
1239
|
+
C = s;
|
|
1240
1240
|
else
|
|
1241
|
-
throw
|
|
1241
|
+
throw C = !s, Error(j + "crypto unavailable");
|
|
1242
1242
|
else
|
|
1243
|
-
|
|
1243
|
+
C = s;
|
|
1244
1244
|
else
|
|
1245
|
-
throw Error(
|
|
1246
|
-
if (t.hasOwnProperty(a = "MODULO_MODE") && (s = t[a], N(s, 0, 9, a),
|
|
1247
|
-
if (s = t[a], typeof s == "object")
|
|
1248
|
-
else throw Error(
|
|
1245
|
+
throw Error(j + a + " not true or false: " + s);
|
|
1246
|
+
if (t.hasOwnProperty(a = "MODULO_MODE") && (s = t[a], N(s, 0, 9, a), P = s), t.hasOwnProperty(a = "POW_PRECISION") && (s = t[a], N(s, 0, W, a), I = s), t.hasOwnProperty(a = "FORMAT"))
|
|
1247
|
+
if (s = t[a], typeof s == "object") pe = s;
|
|
1248
|
+
else throw Error(j + a + " not an object: " + s);
|
|
1249
1249
|
if (t.hasOwnProperty(a = "ALPHABET"))
|
|
1250
1250
|
if (s = t[a], typeof s == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(s))
|
|
1251
|
-
fe = s.slice(0, 10) == "0123456789",
|
|
1251
|
+
fe = s.slice(0, 10) == "0123456789", Q = s;
|
|
1252
1252
|
else
|
|
1253
|
-
throw Error(
|
|
1253
|
+
throw Error(j + a + " invalid: " + s);
|
|
1254
1254
|
} else
|
|
1255
|
-
throw Error(
|
|
1255
|
+
throw Error(j + "Object expected: " + t);
|
|
1256
1256
|
return {
|
|
1257
1257
|
DECIMAL_PLACES: g,
|
|
1258
1258
|
ROUNDING_MODE: x,
|
|
1259
1259
|
EXPONENTIAL_AT: [w, D],
|
|
1260
1260
|
RANGE: [k, T],
|
|
1261
|
-
CRYPTO:
|
|
1262
|
-
MODULO_MODE:
|
|
1261
|
+
CRYPTO: C,
|
|
1262
|
+
MODULO_MODE: P,
|
|
1263
1263
|
POW_PRECISION: I,
|
|
1264
|
-
FORMAT:
|
|
1265
|
-
ALPHABET:
|
|
1264
|
+
FORMAT: pe,
|
|
1265
|
+
ALPHABET: Q
|
|
1266
1266
|
};
|
|
1267
1267
|
}, b.isBigNumber = function(t) {
|
|
1268
1268
|
if (!t || t._isBigNumber !== !0) return !1;
|
|
1269
1269
|
if (!b.DEBUG) return !0;
|
|
1270
1270
|
var a, s, l = t.c, o = t.e, p = t.s;
|
|
1271
1271
|
e: if ({}.toString.call(l) == "[object Array]") {
|
|
1272
|
-
if ((p === 1 || p === -1) && o >= -W && o <= W && o ===
|
|
1272
|
+
if ((p === 1 || p === -1) && o >= -W && o <= W && o === J(o)) {
|
|
1273
1273
|
if (l[0] === 0) {
|
|
1274
1274
|
if (o === 0 && l.length === 1) return !0;
|
|
1275
1275
|
break e;
|
|
1276
1276
|
}
|
|
1277
1277
|
if (a = (o + 1) % B, a < 1 && (a += B), String(l[0]).length == a) {
|
|
1278
1278
|
for (a = 0; a < l.length; a++)
|
|
1279
|
-
if (s = l[a], s < 0 || s >=
|
|
1279
|
+
if (s = l[a], s < 0 || s >= ne || s !== J(s)) break e;
|
|
1280
1280
|
if (s !== 0) return !0;
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
1283
|
} else if (l === null && o === null && (p === null || p === 1 || p === -1))
|
|
1284
1284
|
return !0;
|
|
1285
|
-
throw Error(
|
|
1285
|
+
throw Error(j + "Invalid BigNumber: " + t);
|
|
1286
1286
|
}, b.maximum = b.max = function() {
|
|
1287
1287
|
return Ae(arguments, -1);
|
|
1288
1288
|
}, b.minimum = b.min = function() {
|
|
1289
1289
|
return Ae(arguments, 1);
|
|
1290
1290
|
}, b.random = (function() {
|
|
1291
1291
|
var t = 9007199254740992, a = Math.random() * t & 2097151 ? function() {
|
|
1292
|
-
return
|
|
1292
|
+
return J(Math.random() * t);
|
|
1293
1293
|
} : function() {
|
|
1294
1294
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
1295
1295
|
};
|
|
1296
1296
|
return function(s) {
|
|
1297
1297
|
var l, o, p, m, i, c = 0, f = [], u = new b(h);
|
|
1298
|
-
if (s == null ? s = g : N(s, 0, W), m = _e(s / B),
|
|
1298
|
+
if (s == null ? s = g : N(s, 0, W), m = _e(s / B), C)
|
|
1299
1299
|
if (crypto.getRandomValues) {
|
|
1300
1300
|
for (l = crypto.getRandomValues(new Uint32Array(m *= 2)); c < m; )
|
|
1301
1301
|
i = l[c] * 131072 + (l[c + 1] >>> 11), i >= 9e15 ? (o = crypto.getRandomValues(new Uint32Array(2)), l[c] = o[0], l[c + 1] = o[1]) : (f.push(i % 1e14), c += 2);
|
|
@@ -1305,11 +1305,11 @@ function Ye(e) {
|
|
|
1305
1305
|
i = (l[c] & 31) * 281474976710656 + l[c + 1] * 1099511627776 + l[c + 2] * 4294967296 + l[c + 3] * 16777216 + (l[c + 4] << 16) + (l[c + 5] << 8) + l[c + 6], i >= 9e15 ? crypto.randomBytes(7).copy(l, c) : (f.push(i % 1e14), c += 7);
|
|
1306
1306
|
c = m / 7;
|
|
1307
1307
|
} else
|
|
1308
|
-
throw
|
|
1309
|
-
if (!
|
|
1308
|
+
throw C = !1, Error(j + "crypto unavailable");
|
|
1309
|
+
if (!C)
|
|
1310
1310
|
for (; c < m; )
|
|
1311
1311
|
i = a(), i < 9e15 && (f[c++] = i % 1e14);
|
|
1312
|
-
for (m = f[--c], s %= B, m && s && (i =
|
|
1312
|
+
for (m = f[--c], s %= B, m && s && (i = Re[B - s], f[c] = J(m / i) * i); f[c] === 0; f.pop(), c--) ;
|
|
1313
1313
|
if (c < 0)
|
|
1314
1314
|
f = [p = 0];
|
|
1315
1315
|
else {
|
|
@@ -1333,31 +1333,31 @@ function Ye(e) {
|
|
|
1333
1333
|
return i.reverse();
|
|
1334
1334
|
}
|
|
1335
1335
|
return function(s, l, o, p, m) {
|
|
1336
|
-
var i, c, f, u, A,
|
|
1337
|
-
for (M >= 0 && (u = I, I = 0, s = s.replace(".", ""),
|
|
1338
|
-
|
|
1336
|
+
var i, c, f, u, A, F, S, R, M = s.indexOf("."), V = g, O = x;
|
|
1337
|
+
for (M >= 0 && (u = I, I = 0, s = s.replace(".", ""), R = new b(l), F = R.pow(s.length - M), I = u, R.c = a(
|
|
1338
|
+
oe(Z(F.c), F.e, "0"),
|
|
1339
1339
|
10,
|
|
1340
1340
|
o,
|
|
1341
1341
|
t
|
|
1342
|
-
),
|
|
1342
|
+
), R.e = R.c.length), S = a(s, l, o, m ? (i = Q, t) : (i = t, Q)), f = u = S.length; S[--u] == 0; S.pop()) ;
|
|
1343
1343
|
if (!S[0]) return i.charAt(0);
|
|
1344
|
-
if (M < 0 ? --f : (
|
|
1345
|
-
s = A ?
|
|
1344
|
+
if (M < 0 ? --f : (F.c = S, F.e = f, F.s = p, F = n(F, R, V, O, o), S = F.c, A = F.r, f = F.e), c = f + V + 1, M = S[c], u = o / 2, A = A || c < 0 || S[c + 1] != null, A = O < 4 ? (M != null || A) && (O == 0 || O == (F.s < 0 ? 3 : 2)) : M > u || M == u && (O == 4 || A || O == 6 && S[c - 1] & 1 || O == (F.s < 0 ? 8 : 7)), c < 1 || !S[0])
|
|
1345
|
+
s = A ? oe(i.charAt(1), -V, i.charAt(0)) : i.charAt(0);
|
|
1346
1346
|
else {
|
|
1347
1347
|
if (S.length = c, A)
|
|
1348
1348
|
for (--o; ++S[--c] > o; )
|
|
1349
1349
|
S[c] = 0, c || (++f, S = [1].concat(S));
|
|
1350
1350
|
for (u = S.length; !S[--u]; ) ;
|
|
1351
1351
|
for (M = 0, s = ""; M <= u; s += i.charAt(S[M++])) ;
|
|
1352
|
-
s =
|
|
1352
|
+
s = oe(s, f, i.charAt(0));
|
|
1353
1353
|
}
|
|
1354
1354
|
return s;
|
|
1355
1355
|
};
|
|
1356
1356
|
})(), n = /* @__PURE__ */ (function() {
|
|
1357
1357
|
function t(l, o, p) {
|
|
1358
|
-
var m, i, c, f, u = 0, A = l.length,
|
|
1358
|
+
var m, i, c, f, u = 0, A = l.length, F = o % ue, S = o / ue | 0;
|
|
1359
1359
|
for (l = l.slice(); A--; )
|
|
1360
|
-
c = l[A] % ue, f = l[A] / ue | 0, m = S * c + f *
|
|
1360
|
+
c = l[A] % ue, f = l[A] / ue | 0, m = S * c + f * F, i = F * c + m % ue * ue + u, u = (i / p | 0) + (m / ue | 0) + S * f, l[A] = i % p;
|
|
1361
1361
|
return u && (l = [u].concat(l)), l;
|
|
1362
1362
|
}
|
|
1363
1363
|
function a(l, o, p, m) {
|
|
@@ -1378,39 +1378,39 @@ function Ye(e) {
|
|
|
1378
1378
|
for (; !l[0] && l.length > 1; l.splice(0, 1)) ;
|
|
1379
1379
|
}
|
|
1380
1380
|
return function(l, o, p, m, i) {
|
|
1381
|
-
var c, f, u, A,
|
|
1382
|
-
if (!H || !H[0] || !
|
|
1381
|
+
var c, f, u, A, F, S, R, M, V, O, v, $, we, ke, Be, re, ge, Y = l.s == o.s ? 1 : -1, H = l.c, L = o.c;
|
|
1382
|
+
if (!H || !H[0] || !L || !L[0])
|
|
1383
1383
|
return new b(
|
|
1384
1384
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
1385
|
-
!l.s || !o.s || (H ?
|
|
1385
|
+
!l.s || !o.s || (H ? L && H[0] == L[0] : !L) ? NaN : (
|
|
1386
1386
|
// Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
|
|
1387
|
-
H && H[0] == 0 || !
|
|
1387
|
+
H && H[0] == 0 || !L ? Y * 0 : Y / 0
|
|
1388
1388
|
)
|
|
1389
1389
|
);
|
|
1390
|
-
for (M = new b(
|
|
1391
|
-
if (
|
|
1390
|
+
for (M = new b(Y), V = M.c = [], f = l.e - o.e, Y = p + f + 1, i || (i = ne, f = ee(l.e / B) - ee(o.e / B), Y = Y / B | 0), u = 0; L[u] == (H[u] || 0); u++) ;
|
|
1391
|
+
if (L[u] > (H[u] || 0) && f--, Y < 0)
|
|
1392
1392
|
V.push(1), A = !0;
|
|
1393
1393
|
else {
|
|
1394
|
-
for (ke = H.length,
|
|
1395
|
-
ge =
|
|
1394
|
+
for (ke = H.length, re = L.length, u = 0, Y += 2, F = J(i / (L[0] + 1)), F > 1 && (L = t(L, F, i), H = t(H, F, i), re = L.length, ke = H.length), we = re, O = H.slice(0, re), v = O.length; v < re; O[v++] = 0) ;
|
|
1395
|
+
ge = L.slice(), ge = [0].concat(ge), Be = L[0], L[1] >= i / 2 && Be++;
|
|
1396
1396
|
do {
|
|
1397
|
-
if (
|
|
1398
|
-
if ($ = O[0],
|
|
1399
|
-
for (
|
|
1400
|
-
|
|
1397
|
+
if (F = 0, c = a(L, O, re, v), c < 0) {
|
|
1398
|
+
if ($ = O[0], re != v && ($ = $ * i + (O[1] || 0)), F = J($ / Be), F > 1)
|
|
1399
|
+
for (F >= i && (F = i - 1), S = t(L, F, i), R = S.length, v = O.length; a(S, O, R, v) == 1; )
|
|
1400
|
+
F--, s(S, re < R ? ge : L, R, i), R = S.length, c = 1;
|
|
1401
1401
|
else
|
|
1402
|
-
|
|
1403
|
-
if (
|
|
1404
|
-
for (; a(
|
|
1405
|
-
|
|
1406
|
-
} else c === 0 && (
|
|
1407
|
-
V[u++] =
|
|
1408
|
-
} while ((we++ < ke || O[0] != null) &&
|
|
1402
|
+
F == 0 && (c = F = 1), S = L.slice(), R = S.length;
|
|
1403
|
+
if (R < v && (S = [0].concat(S)), s(O, S, v, i), v = O.length, c == -1)
|
|
1404
|
+
for (; a(L, O, re, v) < 1; )
|
|
1405
|
+
F++, s(O, re < v ? ge : L, v, i), v = O.length;
|
|
1406
|
+
} else c === 0 && (F++, O = [0]);
|
|
1407
|
+
V[u++] = F, O[0] ? O[v++] = H[we] || 0 : (O = [H[we]], v = 1);
|
|
1408
|
+
} while ((we++ < ke || O[0] != null) && Y--);
|
|
1409
1409
|
A = O[0] != null, V[0] || V.splice(0, 1);
|
|
1410
1410
|
}
|
|
1411
|
-
if (i ==
|
|
1412
|
-
for (u = 1,
|
|
1413
|
-
|
|
1411
|
+
if (i == ne) {
|
|
1412
|
+
for (u = 1, Y = V[0]; Y >= 10; Y /= 10, u++) ;
|
|
1413
|
+
X(M, p + (M.e = u + f * B - 1) + 1, m, A);
|
|
1414
1414
|
} else
|
|
1415
1415
|
M.e = f, M.r = +A;
|
|
1416
1416
|
return M;
|
|
@@ -1420,11 +1420,11 @@ function Ye(e) {
|
|
|
1420
1420
|
var o, p, m, i, c;
|
|
1421
1421
|
if (s == null ? s = x : N(s, 0, 8), !t.c) return t.toString();
|
|
1422
1422
|
if (o = t.c[0], m = t.e, a == null)
|
|
1423
|
-
c =
|
|
1424
|
-
else if (t =
|
|
1423
|
+
c = Z(t.c), c = l == 1 || l == 2 && (m <= w || m >= D) ? De(c, m) : oe(c, m, "0");
|
|
1424
|
+
else if (t = X(new b(t), a, s), p = t.e, c = Z(t.c), i = c.length, l == 1 || l == 2 && (a <= p || p <= w)) {
|
|
1425
1425
|
for (; i < a; c += "0", i++) ;
|
|
1426
1426
|
c = De(c, p);
|
|
1427
|
-
} else if (a -= m + (l === 2 && p > m), c =
|
|
1427
|
+
} else if (a -= m + (l === 2 && p > m), c = oe(c, p, "0"), p + 1 > i) {
|
|
1428
1428
|
if (--a > 0) for (c += "."; a--; c += "0") ;
|
|
1429
1429
|
} else if (a += p - i, a > 0)
|
|
1430
1430
|
for (p + 1 == i && (c += "."); a--; c += "0") ;
|
|
@@ -1447,24 +1447,24 @@ function Ye(e) {
|
|
|
1447
1447
|
if (l.test(u))
|
|
1448
1448
|
p.s = isNaN(u) ? null : u < 0 ? -1 : 1;
|
|
1449
1449
|
else {
|
|
1450
|
-
if (!i && (u = u.replace(t, function(A,
|
|
1451
|
-
return f = (S = S.toLowerCase()) == "x" ? 16 : S == "b" ? 2 : 8, !c || c == f ?
|
|
1450
|
+
if (!i && (u = u.replace(t, function(A, F, S) {
|
|
1451
|
+
return f = (S = S.toLowerCase()) == "x" ? 16 : S == "b" ? 2 : 8, !c || c == f ? F : A;
|
|
1452
1452
|
}), c && (f = c, u = u.replace(a, "$1").replace(s, "0.$1")), m != u))
|
|
1453
1453
|
return new b(u, f);
|
|
1454
1454
|
if (b.DEBUG)
|
|
1455
|
-
throw Error(
|
|
1455
|
+
throw Error(j + "Not a" + (c ? " base " + c : "") + " number: " + m);
|
|
1456
1456
|
p.s = null;
|
|
1457
1457
|
}
|
|
1458
1458
|
p.c = p.e = null;
|
|
1459
1459
|
};
|
|
1460
1460
|
})();
|
|
1461
|
-
function
|
|
1462
|
-
var o, p, m, i, c, f, u, A = t.c,
|
|
1461
|
+
function X(t, a, s, l) {
|
|
1462
|
+
var o, p, m, i, c, f, u, A = t.c, F = Re;
|
|
1463
1463
|
if (A) {
|
|
1464
1464
|
e: {
|
|
1465
1465
|
for (o = 1, i = A[0]; i >= 10; i /= 10, o++) ;
|
|
1466
1466
|
if (p = a - o, p < 0)
|
|
1467
|
-
p += B, m = a, c = A[f = 0], u =
|
|
1467
|
+
p += B, m = a, c = A[f = 0], u = J(c / F[o - m - 1] % 10);
|
|
1468
1468
|
else if (f = _e((p + 1) / B), f >= A.length)
|
|
1469
1469
|
if (l) {
|
|
1470
1470
|
for (; A.length <= f; A.push(0)) ;
|
|
@@ -1473,23 +1473,23 @@ function Ye(e) {
|
|
|
1473
1473
|
break e;
|
|
1474
1474
|
else {
|
|
1475
1475
|
for (c = i = A[f], o = 1; i >= 10; i /= 10, o++) ;
|
|
1476
|
-
p %= B, m = p - B + o, u = m < 0 ? 0 :
|
|
1476
|
+
p %= B, m = p - B + o, u = m < 0 ? 0 : J(c / F[o - m - 1] % 10);
|
|
1477
1477
|
}
|
|
1478
1478
|
if (l = l || a < 0 || // Are there any non-zero digits after the rounding digit?
|
|
1479
1479
|
// The expression n % pows10[d - j - 1] returns all digits of n to the right
|
|
1480
1480
|
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
|
|
1481
|
-
A[f + 1] != null || (m < 0 ? c : c %
|
|
1482
|
-
(p > 0 ? m > 0 ? c /
|
|
1483
|
-
return A.length = 0, l ? (a -= t.e + 1, A[0] =
|
|
1484
|
-
if (p == 0 ? (A.length = f, i = 1, f--) : (A.length = f + 1, i =
|
|
1481
|
+
A[f + 1] != null || (m < 0 ? c : c % F[o - m - 1]), l = s < 4 ? (u || l) && (s == 0 || s == (t.s < 0 ? 3 : 2)) : u > 5 || u == 5 && (s == 4 || l || s == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
1482
|
+
(p > 0 ? m > 0 ? c / F[o - m] : 0 : A[f - 1]) % 10 & 1 || s == (t.s < 0 ? 8 : 7)), a < 1 || !A[0])
|
|
1483
|
+
return A.length = 0, l ? (a -= t.e + 1, A[0] = F[(B - a % B) % B], t.e = -a || 0) : A[0] = t.e = 0, t;
|
|
1484
|
+
if (p == 0 ? (A.length = f, i = 1, f--) : (A.length = f + 1, i = F[B - p], A[f] = m > 0 ? J(c / F[o - m] % F[m]) * i : 0), l)
|
|
1485
1485
|
for (; ; )
|
|
1486
1486
|
if (f == 0) {
|
|
1487
1487
|
for (p = 1, m = A[0]; m >= 10; m /= 10, p++) ;
|
|
1488
1488
|
for (m = A[0] += i, i = 1; m >= 10; m /= 10, i++) ;
|
|
1489
|
-
p != i && (t.e++, A[0] ==
|
|
1489
|
+
p != i && (t.e++, A[0] == ne && (A[0] = 1));
|
|
1490
1490
|
break;
|
|
1491
1491
|
} else {
|
|
1492
|
-
if (A[f] += i, A[f] !=
|
|
1492
|
+
if (A[f] += i, A[f] != ne) break;
|
|
1493
1493
|
A[f--] = 0, i = 1;
|
|
1494
1494
|
}
|
|
1495
1495
|
for (p = A.length; A[--p] === 0; A.pop()) ;
|
|
@@ -1498,9 +1498,9 @@ function Ye(e) {
|
|
|
1498
1498
|
}
|
|
1499
1499
|
return t;
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function te(t) {
|
|
1502
1502
|
var a, s = t.e;
|
|
1503
|
-
return s === null ? t.toString() : (a =
|
|
1503
|
+
return s === null ? t.toString() : (a = Z(t.c), a = s <= w || s >= D ? De(a, s) : oe(a, s, "0"), t.s < 0 ? "-" + a : a);
|
|
1504
1504
|
}
|
|
1505
1505
|
return d.absoluteValue = d.abs = function() {
|
|
1506
1506
|
var t = new b(this);
|
|
@@ -1510,9 +1510,9 @@ function Ye(e) {
|
|
|
1510
1510
|
}, d.decimalPlaces = d.dp = function(t, a) {
|
|
1511
1511
|
var s, l, o, p = this;
|
|
1512
1512
|
if (t != null)
|
|
1513
|
-
return N(t, 0, W), a == null ? a = x : N(a, 0, 8),
|
|
1513
|
+
return N(t, 0, W), a == null ? a = x : N(a, 0, 8), X(new b(p), t + p.e + 1, a);
|
|
1514
1514
|
if (!(s = p.c)) return null;
|
|
1515
|
-
if (l = ((o = s.length - 1) -
|
|
1515
|
+
if (l = ((o = s.length - 1) - ee(this.e / B)) * B, o = s[o]) for (; o % 10 == 0; o /= 10, l--) ;
|
|
1516
1516
|
return l < 0 && (l = 0), l;
|
|
1517
1517
|
}, d.dividedBy = d.div = function(t, a) {
|
|
1518
1518
|
return n(this, new b(t, a), g, x);
|
|
@@ -1521,37 +1521,37 @@ function Ye(e) {
|
|
|
1521
1521
|
}, d.exponentiatedBy = d.pow = function(t, a) {
|
|
1522
1522
|
var s, l, o, p, m, i, c, f, u, A = this;
|
|
1523
1523
|
if (t = new b(t), t.c && !t.isInteger())
|
|
1524
|
-
throw Error(
|
|
1524
|
+
throw Error(j + "Exponent not an integer: " + te(t));
|
|
1525
1525
|
if (a != null && (a = new b(a)), i = t.e > 14, !A.c || !A.c[0] || A.c[0] == 1 && !A.e && A.c.length == 1 || !t.c || !t.c[0])
|
|
1526
|
-
return u = new b(Math.pow(+
|
|
1526
|
+
return u = new b(Math.pow(+te(A), i ? t.s * (2 - Fe(t)) : +te(t))), a ? u.mod(a) : u;
|
|
1527
1527
|
if (c = t.s < 0, a) {
|
|
1528
1528
|
if (a.c ? !a.c[0] : !a.s) return new b(NaN);
|
|
1529
1529
|
l = !c && A.isInteger() && a.isInteger(), l && (A = A.mod(a));
|
|
1530
1530
|
} else {
|
|
1531
1531
|
if (t.e > 9 && (A.e > 0 || A.e < -1 || (A.e == 0 ? A.c[0] > 1 || i && A.c[1] >= 24e7 : A.c[0] < 8e13 || i && A.c[0] <= 9999975e7)))
|
|
1532
|
-
return p = A.s < 0 &&
|
|
1532
|
+
return p = A.s < 0 && Fe(t) ? -0 : 0, A.e > -1 && (p = 1 / p), new b(c ? 1 / p : p);
|
|
1533
1533
|
I && (p = _e(I / B + 2));
|
|
1534
1534
|
}
|
|
1535
|
-
for (i ? (s = new b(0.5), c && (t.s = 1), f =
|
|
1535
|
+
for (i ? (s = new b(0.5), c && (t.s = 1), f = Fe(t)) : (o = Math.abs(+te(t)), f = o % 2), u = new b(h); ; ) {
|
|
1536
1536
|
if (f) {
|
|
1537
1537
|
if (u = u.times(A), !u.c) break;
|
|
1538
1538
|
p ? u.c.length > p && (u.c.length = p) : l && (u = u.mod(a));
|
|
1539
1539
|
}
|
|
1540
1540
|
if (o) {
|
|
1541
|
-
if (o =
|
|
1541
|
+
if (o = J(o / 2), o === 0) break;
|
|
1542
1542
|
f = o % 2;
|
|
1543
|
-
} else if (t = t.times(s),
|
|
1544
|
-
f =
|
|
1543
|
+
} else if (t = t.times(s), X(t, t.e + 1, 1), t.e > 14)
|
|
1544
|
+
f = Fe(t);
|
|
1545
1545
|
else {
|
|
1546
|
-
if (o = +
|
|
1546
|
+
if (o = +te(t), o === 0) break;
|
|
1547
1547
|
f = o % 2;
|
|
1548
1548
|
}
|
|
1549
1549
|
A = A.times(A), p ? A.c && A.c.length > p && (A.c.length = p) : l && (A = A.mod(a));
|
|
1550
1550
|
}
|
|
1551
|
-
return l ? u : (c && (u = h.div(u)), a ? u.mod(a) : p ?
|
|
1551
|
+
return l ? u : (c && (u = h.div(u)), a ? u.mod(a) : p ? X(u, I, x, m) : u);
|
|
1552
1552
|
}, d.integerValue = function(t) {
|
|
1553
1553
|
var a = new b(this);
|
|
1554
|
-
return t == null ? t = x : N(t, 0, 8),
|
|
1554
|
+
return t == null ? t = x : N(t, 0, 8), X(a, a.e + 1, t);
|
|
1555
1555
|
}, d.isEqualTo = d.eq = function(t, a) {
|
|
1556
1556
|
return ye(this, new b(t, a)) === 0;
|
|
1557
1557
|
}, d.isFinite = function() {
|
|
@@ -1561,7 +1561,7 @@ function Ye(e) {
|
|
|
1561
1561
|
}, d.isGreaterThanOrEqualTo = d.gte = function(t, a) {
|
|
1562
1562
|
return (a = ye(this, new b(t, a))) === 1 || a === 0;
|
|
1563
1563
|
}, d.isInteger = function() {
|
|
1564
|
-
return !!this.c &&
|
|
1564
|
+
return !!this.c && ee(this.e / B) > this.c.length - 2;
|
|
1565
1565
|
}, d.isLessThan = d.lt = function(t, a) {
|
|
1566
1566
|
return ye(this, new b(t, a)) < 0;
|
|
1567
1567
|
}, d.isLessThanOrEqualTo = d.lte = function(t, a) {
|
|
@@ -1588,7 +1588,7 @@ function Ye(e) {
|
|
|
1588
1588
|
x == 3 ? -0 : 0
|
|
1589
1589
|
));
|
|
1590
1590
|
}
|
|
1591
|
-
if (c =
|
|
1591
|
+
if (c = ee(c), f = ee(f), u = u.slice(), i = c - f) {
|
|
1592
1592
|
for ((p = i < 0) ? (i = -i, o = u) : (f = c, o = A), o.reverse(), a = i; a--; o.push(0)) ;
|
|
1593
1593
|
o.reverse();
|
|
1594
1594
|
} else
|
|
@@ -1598,10 +1598,10 @@ function Ye(e) {
|
|
|
1598
1598
|
break;
|
|
1599
1599
|
}
|
|
1600
1600
|
if (p && (o = u, u = A, A = o, t.s = -t.s), a = (l = A.length) - (s = u.length), a > 0) for (; a--; u[s++] = 0) ;
|
|
1601
|
-
for (a =
|
|
1601
|
+
for (a = ne - 1; l > i; ) {
|
|
1602
1602
|
if (u[--l] < A[l]) {
|
|
1603
1603
|
for (s = l; s && !u[--s]; u[s] = a) ;
|
|
1604
|
-
--u[s], u[l] +=
|
|
1604
|
+
--u[s], u[l] += ne;
|
|
1605
1605
|
}
|
|
1606
1606
|
u[l] -= A[l];
|
|
1607
1607
|
}
|
|
@@ -1609,18 +1609,18 @@ function Ye(e) {
|
|
|
1609
1609
|
return u[0] ? be(t, u, f) : (t.s = x == 3 ? -1 : 1, t.c = [t.e = 0], t);
|
|
1610
1610
|
}, d.modulo = d.mod = function(t, a) {
|
|
1611
1611
|
var s, l, o = this;
|
|
1612
|
-
return t = new b(t, a), !o.c || !t.s || t.c && !t.c[0] ? new b(NaN) : !t.c || o.c && !o.c[0] ? new b(o) : (
|
|
1612
|
+
return t = new b(t, a), !o.c || !t.s || t.c && !t.c[0] ? new b(NaN) : !t.c || o.c && !o.c[0] ? new b(o) : (P == 9 ? (l = t.s, t.s = 1, s = n(o, t, 0, 3), t.s = l, s.s *= l) : s = n(o, t, 0, P), t = o.minus(s.times(t)), !t.c[0] && P == 1 && (t.s = o.s), t);
|
|
1613
1613
|
}, d.multipliedBy = d.times = function(t, a) {
|
|
1614
|
-
var s, l, o, p, m, i, c, f, u, A,
|
|
1615
|
-
if (!
|
|
1616
|
-
return !O.s || !t.s ||
|
|
1617
|
-
for (l =
|
|
1618
|
-
for (M =
|
|
1619
|
-
for (s = 0,
|
|
1620
|
-
f =
|
|
1621
|
-
|
|
1614
|
+
var s, l, o, p, m, i, c, f, u, A, F, S, R, M, V, O = this, v = O.c, $ = (t = new b(t, a)).c;
|
|
1615
|
+
if (!v || !$ || !v[0] || !$[0])
|
|
1616
|
+
return !O.s || !t.s || v && !v[0] && !$ || $ && !$[0] && !v ? t.c = t.e = t.s = null : (t.s *= O.s, !v || !$ ? t.c = t.e = null : (t.c = [0], t.e = 0)), t;
|
|
1617
|
+
for (l = ee(O.e / B) + ee(t.e / B), t.s *= O.s, c = v.length, A = $.length, c < A && (R = v, v = $, $ = R, o = c, c = A, A = o), o = c + A, R = []; o--; R.push(0)) ;
|
|
1618
|
+
for (M = ne, V = ue, o = A; --o >= 0; ) {
|
|
1619
|
+
for (s = 0, F = $[o] % V, S = $[o] / V | 0, m = c, p = o + m; p > o; )
|
|
1620
|
+
f = v[--m] % V, u = v[m] / V | 0, i = S * f + u * F, f = F * f + i % V * V + R[p] + s, s = (f / M | 0) + (i / V | 0) + S * u, R[p--] = f % M;
|
|
1621
|
+
R[p] = s;
|
|
1622
1622
|
}
|
|
1623
|
-
return s ? ++l :
|
|
1623
|
+
return s ? ++l : R.splice(0, 1), be(t, R, l);
|
|
1624
1624
|
}, d.negated = function() {
|
|
1625
1625
|
var t = new b(this);
|
|
1626
1626
|
return t.s = -t.s || null, t;
|
|
@@ -1634,17 +1634,17 @@ function Ye(e) {
|
|
|
1634
1634
|
if (!i || !c) return new b(o / 0);
|
|
1635
1635
|
if (!i[0] || !c[0]) return c[0] ? t : new b(i[0] ? l : o * 0);
|
|
1636
1636
|
}
|
|
1637
|
-
if (p =
|
|
1637
|
+
if (p = ee(p), m = ee(m), i = i.slice(), o = p - m) {
|
|
1638
1638
|
for (o > 0 ? (m = p, s = c) : (o = -o, s = i), s.reverse(); o--; s.push(0)) ;
|
|
1639
1639
|
s.reverse();
|
|
1640
1640
|
}
|
|
1641
1641
|
for (o = i.length, a = c.length, o - a < 0 && (s = c, c = i, i = s, a = o), o = 0; a; )
|
|
1642
|
-
o = (i[--a] = i[a] + c[a] + o) /
|
|
1642
|
+
o = (i[--a] = i[a] + c[a] + o) / ne | 0, i[a] = ne === i[a] ? 0 : i[a] % ne;
|
|
1643
1643
|
return o && (i = [o].concat(i), ++m), be(t, i, m);
|
|
1644
1644
|
}, d.precision = d.sd = function(t, a) {
|
|
1645
1645
|
var s, l, o, p = this;
|
|
1646
1646
|
if (t != null && t !== !!t)
|
|
1647
|
-
return N(t, 1, W), a == null ? a = x : N(a, 0, 8),
|
|
1647
|
+
return N(t, 1, W), a == null ? a = x : N(a, 0, 8), X(new b(p), t, a);
|
|
1648
1648
|
if (!(s = p.c)) return null;
|
|
1649
1649
|
if (o = s.length - 1, l = o * B + 1, o = s[o]) {
|
|
1650
1650
|
for (; o % 10 == 0; o /= 10, l--) ;
|
|
@@ -1657,21 +1657,21 @@ function Ye(e) {
|
|
|
1657
1657
|
var t, a, s, l, o, p = this, m = p.c, i = p.s, c = p.e, f = g + 4, u = new b("0.5");
|
|
1658
1658
|
if (i !== 1 || !m || !m[0])
|
|
1659
1659
|
return new b(!i || i < 0 && (!m || m[0]) ? NaN : m ? p : 1 / 0);
|
|
1660
|
-
if (i = Math.sqrt(+
|
|
1660
|
+
if (i = Math.sqrt(+te(p)), i == 0 || i == 1 / 0 ? (a = Z(m), (a.length + c) % 2 == 0 && (a += "0"), i = Math.sqrt(+a), c = ee((c + 1) / 2) - (c < 0 || c % 2), i == 1 / 0 ? a = "5e" + c : (a = i.toExponential(), a = a.slice(0, a.indexOf("e") + 1) + c), s = new b(a)) : s = new b(i + ""), s.c[0]) {
|
|
1661
1661
|
for (c = s.e, i = c + f, i < 3 && (i = 0); ; )
|
|
1662
|
-
if (o = s, s = u.times(o.plus(n(p, o, f, 1))),
|
|
1662
|
+
if (o = s, s = u.times(o.plus(n(p, o, f, 1))), Z(o.c).slice(0, i) === (a = Z(s.c)).slice(0, i))
|
|
1663
1663
|
if (s.e < c && --i, a = a.slice(i - 3, i + 1), a == "9999" || !l && a == "4999") {
|
|
1664
|
-
if (!l && (
|
|
1664
|
+
if (!l && (X(o, o.e + g + 2, 0), o.times(o).eq(p))) {
|
|
1665
1665
|
s = o;
|
|
1666
1666
|
break;
|
|
1667
1667
|
}
|
|
1668
1668
|
f += 4, i += 4, l = 1;
|
|
1669
1669
|
} else {
|
|
1670
|
-
(!+a || !+a.slice(1) && a.charAt(0) == "5") && (
|
|
1670
|
+
(!+a || !+a.slice(1) && a.charAt(0) == "5") && (X(s, s.e + g + 2, 1), t = !s.times(s).eq(p));
|
|
1671
1671
|
break;
|
|
1672
1672
|
}
|
|
1673
1673
|
}
|
|
1674
|
-
return
|
|
1674
|
+
return X(s, s.e + g + 1, x, t);
|
|
1675
1675
|
}, d.toExponential = function(t, a) {
|
|
1676
1676
|
return t != null && (N(t, 0, W), t++), me(this, t, a, 1);
|
|
1677
1677
|
}, d.toFixed = function(t, a) {
|
|
@@ -1679,14 +1679,14 @@ function Ye(e) {
|
|
|
1679
1679
|
}, d.toFormat = function(t, a, s) {
|
|
1680
1680
|
var l, o = this;
|
|
1681
1681
|
if (s == null)
|
|
1682
|
-
t != null && a && typeof a == "object" ? (s = a, a = null) : t && typeof t == "object" ? (s = t, t = a = null) : s =
|
|
1682
|
+
t != null && a && typeof a == "object" ? (s = a, a = null) : t && typeof t == "object" ? (s = t, t = a = null) : s = pe;
|
|
1683
1683
|
else if (typeof s != "object")
|
|
1684
|
-
throw Error(
|
|
1684
|
+
throw Error(j + "Argument not an object: " + s);
|
|
1685
1685
|
if (l = o.toFixed(t, a), o.c) {
|
|
1686
|
-
var p, m = l.split("."), i = +s.groupSize, c = +s.secondaryGroupSize, f = s.groupSeparator || "", u = m[0], A = m[1],
|
|
1687
|
-
if (c && (p = i, i = c, c = p,
|
|
1688
|
-
for (p =
|
|
1689
|
-
c > 0 && (u += f + S.slice(p)),
|
|
1686
|
+
var p, m = l.split("."), i = +s.groupSize, c = +s.secondaryGroupSize, f = s.groupSeparator || "", u = m[0], A = m[1], F = o.s < 0, S = F ? u.slice(1) : u, R = S.length;
|
|
1687
|
+
if (c && (p = i, i = c, c = p, R -= p), i > 0 && R > 0) {
|
|
1688
|
+
for (p = R % i || i, u = S.substr(0, p); p < R; p += i) u += f + S.substr(p, i);
|
|
1689
|
+
c > 0 && (u += f + S.slice(p)), F && (u = "-" + u);
|
|
1690
1690
|
}
|
|
1691
1691
|
l = A ? u + (s.decimalSeparator || "") + ((c = +s.fractionGroupSize) ? A.replace(
|
|
1692
1692
|
new RegExp("\\d{" + c + "}\\B", "g"),
|
|
@@ -1695,31 +1695,31 @@ function Ye(e) {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
return (s.prefix || "") + l + (s.suffix || "");
|
|
1697
1697
|
}, d.toFraction = function(t) {
|
|
1698
|
-
var a, s, l, o, p, m, i, c, f, u, A,
|
|
1698
|
+
var a, s, l, o, p, m, i, c, f, u, A, F, S = this, R = S.c;
|
|
1699
1699
|
if (t != null && (i = new b(t), !i.isInteger() && (i.c || i.s !== 1) || i.lt(h)))
|
|
1700
|
-
throw Error(
|
|
1701
|
-
if (!
|
|
1702
|
-
for (a = new b(h), f = s = new b(h), l = c = new b(h),
|
|
1700
|
+
throw Error(j + "Argument " + (i.isInteger() ? "out of range: " : "not an integer: ") + te(i));
|
|
1701
|
+
if (!R) return new b(S);
|
|
1702
|
+
for (a = new b(h), f = s = new b(h), l = c = new b(h), F = Z(R), p = a.e = F.length - S.e - 1, a.c[0] = Re[(m = p % B) < 0 ? B + m : m], t = !t || i.comparedTo(a) > 0 ? p > 0 ? a : f : i, m = T, T = 1 / 0, i = new b(F), c.c[0] = 0; u = n(i, a, 0, 1), o = s.plus(u.times(l)), o.comparedTo(t) != 1; )
|
|
1703
1703
|
s = l, l = o, f = c.plus(u.times(o = f)), c = o, a = i.minus(u.times(o = a)), i = o;
|
|
1704
1704
|
return o = n(t.minus(s), l, 0, 1), c = c.plus(o.times(f)), s = s.plus(o.times(l)), c.s = f.s = S.s, p = p * 2, A = n(f, l, p, x).minus(S).abs().comparedTo(
|
|
1705
1705
|
n(c, s, p, x).minus(S).abs()
|
|
1706
1706
|
) < 1 ? [f, l] : [c, s], T = m, A;
|
|
1707
1707
|
}, d.toNumber = function() {
|
|
1708
|
-
return +
|
|
1708
|
+
return +te(this);
|
|
1709
1709
|
}, d.toPrecision = function(t, a) {
|
|
1710
1710
|
return t != null && N(t, 1, W), me(this, t, a, 2);
|
|
1711
1711
|
}, d.toString = function(t) {
|
|
1712
1712
|
var a, s = this, l = s.s, o = s.e;
|
|
1713
|
-
return o === null ? l ? (a = "Infinity", l < 0 && (a = "-" + a)) : a = "NaN" : (t == null ? a = o <= w || o >= D ? De(
|
|
1713
|
+
return o === null ? l ? (a = "Infinity", l < 0 && (a = "-" + a)) : a = "NaN" : (t == null ? a = o <= w || o >= D ? De(Z(s.c), o) : oe(Z(s.c), o, "0") : t === 10 && fe ? (s = X(new b(s), g + o + 1, x), a = oe(Z(s.c), s.e, "0")) : (N(t, 2, Q.length, "Base"), a = r(oe(Z(s.c), o, "0"), 10, t, l, !0)), l < 0 && s.c[0] && (a = "-" + a)), a;
|
|
1714
1714
|
}, d.valueOf = d.toJSON = function() {
|
|
1715
|
-
return
|
|
1715
|
+
return te(this);
|
|
1716
1716
|
}, d._isBigNumber = !0, d[Symbol.toStringTag] = "BigNumber", d[Symbol.for("nodejs.util.inspect.custom")] = d.valueOf, e != null && b.set(e), b;
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1718
|
+
function ee(e) {
|
|
1719
1719
|
var n = e | 0;
|
|
1720
1720
|
return e > 0 || e === n ? n : n - 1;
|
|
1721
1721
|
}
|
|
1722
|
-
function
|
|
1722
|
+
function Z(e) {
|
|
1723
1723
|
for (var n, r, y = 1, d = e.length, h = e[0] + ""; y < d; ) {
|
|
1724
1724
|
for (n = e[y++] + "", r = B - n.length; r--; n = "0" + n) ;
|
|
1725
1725
|
h += n;
|
|
@@ -1738,17 +1738,17 @@ function ye(e, n) {
|
|
|
1738
1738
|
return w == D ? 0 : w > D ^ r ? 1 : -1;
|
|
1739
1739
|
}
|
|
1740
1740
|
function N(e, n, r, y) {
|
|
1741
|
-
if (e < n || e > r || e !==
|
|
1742
|
-
throw Error(
|
|
1741
|
+
if (e < n || e > r || e !== J(e))
|
|
1742
|
+
throw Error(j + (y || "Argument") + (typeof e == "number" ? e < n || e > r ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function Fe(e) {
|
|
1745
1745
|
var n = e.c.length - 1;
|
|
1746
|
-
return
|
|
1746
|
+
return ee(e.e / B) == n && e.c[n] % 2 != 0;
|
|
1747
1747
|
}
|
|
1748
1748
|
function De(e, n) {
|
|
1749
1749
|
return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (n < 0 ? "e" : "e+") + n;
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function oe(e, n, r) {
|
|
1752
1752
|
var y, d;
|
|
1753
1753
|
if (n < 0) {
|
|
1754
1754
|
for (d = r + "."; ++n; d += r) ;
|
|
@@ -1772,39 +1772,39 @@ E(1e18);
|
|
|
1772
1772
|
function Se(e, n) {
|
|
1773
1773
|
return e == n || e.toLowerCase() == n.toLowerCase();
|
|
1774
1774
|
}
|
|
1775
|
-
const
|
|
1776
|
-
function
|
|
1775
|
+
const Kn = (e) => !!en.find((n) => Se(n, e || ""));
|
|
1776
|
+
function Gt(e) {
|
|
1777
1777
|
return [
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
].find((r) => r <= e) ||
|
|
1778
|
+
se.Years,
|
|
1779
|
+
se.Months,
|
|
1780
|
+
se.Weeks,
|
|
1781
|
+
se.Days,
|
|
1782
|
+
se.Hours,
|
|
1783
|
+
se.Minutes
|
|
1784
|
+
].find((r) => r <= e) || se.Minutes;
|
|
1785
1785
|
}
|
|
1786
|
-
const le = (e) => e ? e.value * e.unit : 0,
|
|
1786
|
+
const le = (e) => e ? e.value * e.unit : 0, qt = (e) => !e || e === "NaN" ? "0" : E(e).decimalPlaces(0).toFixed(), Gn = (e) => Object.values(K).find((n) => n.id === e), Xt = (e) => {
|
|
1787
1787
|
if (!e) return;
|
|
1788
|
-
const n = e.map((h) => G(h)), r = Object.entries(
|
|
1788
|
+
const n = e.map((h) => G(h)), r = Object.entries(tn).filter(([h]) => n.includes(h)).flatMap(([, h]) => h), y = e.map((h) => h.exchangeAddress), d = new Set(
|
|
1789
1789
|
[...y, ...r].map((h) => h.toLowerCase())
|
|
1790
1790
|
);
|
|
1791
1791
|
return Array.from(d);
|
|
1792
|
-
},
|
|
1793
|
-
if (!E(e
|
|
1792
|
+
}, qn = (e, n) => e.version === 1 ? (e.fillDelay || 0) * 1e3 + dn(n) : (e.fillDelay || 0) * 1e3, xe = (e) => typeof window > "u" ? null : new URLSearchParams(window.location.search).get(e), Xn = (e) => un().filter((n) => n.name === e).map((n) => n.chainId), jn = (e = "", n = "", r = 18, y = 18) => {
|
|
1793
|
+
if (!E(e || 0).gt(0) || !E(n || 0).gt(0))
|
|
1794
1794
|
return "";
|
|
1795
|
-
const
|
|
1796
|
-
return E(
|
|
1797
|
-
},
|
|
1795
|
+
const d = he(r, e), h = he(y, n);
|
|
1796
|
+
return E(h).div(d).toFixed();
|
|
1797
|
+
}, Qn = (e, n, r) => {
|
|
1798
1798
|
if (e.type === q.TWAP_MARKET) return "";
|
|
1799
1799
|
const y = he(n, e.srcAmountPerTrade), d = he(r, e.dstMinAmountPerTrade);
|
|
1800
1800
|
return E(d).div(y).toFixed();
|
|
1801
|
-
},
|
|
1801
|
+
}, Yn = (e, n, r) => {
|
|
1802
1802
|
if (e.type === q.TWAP_MARKET) return "";
|
|
1803
1803
|
const y = he(n, e.srcAmountPerTrade), d = he(r, e.triggerPricePerTrade);
|
|
1804
1804
|
return E(d).div(y).toFixed();
|
|
1805
|
-
},
|
|
1805
|
+
}, jt = "https://order-sink-dev.orbs.network", Qt = "https://order-sink.orbs.network";
|
|
1806
1806
|
let Me;
|
|
1807
|
-
const
|
|
1807
|
+
const Zn = (e) => {
|
|
1808
1808
|
Me = e;
|
|
1809
1809
|
}, We = () => {
|
|
1810
1810
|
const e = xe(
|
|
@@ -1812,31 +1812,31 @@ const Yn = (e) => {
|
|
|
1812
1812
|
/* ENV */
|
|
1813
1813
|
);
|
|
1814
1814
|
return e === "prod" ? !1 : e === "dev" ? !0 : Me === "prod" ? !1 : Me === "dev";
|
|
1815
|
-
}, Ze = () => We() ?
|
|
1816
|
-
|
|
1817
|
-
).getMinutes(),
|
|
1818
|
-
[K.eth.id]: `${
|
|
1819
|
-
[K.bsc.id]: `${
|
|
1820
|
-
[K.poly.id]: `${
|
|
1821
|
-
[K.arb.id]: `${
|
|
1822
|
-
[K.base.id]: `${
|
|
1823
|
-
[K.sei.id]: `${
|
|
1824
|
-
[K.linea.id]: `${
|
|
1825
|
-
[K.sonic.id]: `${
|
|
1826
|
-
[K.ftm.id]: `${
|
|
1827
|
-
[K.katana.id]: `${
|
|
1828
|
-
[K.avax.id]: `${
|
|
1829
|
-
[K.bera.id]:
|
|
1830
|
-
[K.flare.id]:
|
|
1831
|
-
[K.cronosZkEvm.id]:
|
|
1832
|
-
},
|
|
1833
|
-
|
|
1815
|
+
}, Ze = () => We() ? jt : Qt, Jn = 100, ea = 1, Le = 300 * 1e3, Ee = 365 * 24 * 60 * 60 * 1e3, Ge = 300 * 1e3, Yt = new Date(
|
|
1816
|
+
Le
|
|
1817
|
+
).getMinutes(), ve = (e) => `https://hub.orbs.network/api/private/project_cm7nb67z86nyr01z12gs0fxpf/subgraphs/orbs-twap-${e}/prod/gn`, ae = "https://hub.orbs.network/api/apikey/subgraphs/id", Zt = {
|
|
1818
|
+
[K.eth.id]: `${ae}/Bf7bvMYcJbDAvYWJmhMpHZ4cpFjqzkhK6GXXEpnPRq6`,
|
|
1819
|
+
[K.bsc.id]: `${ae}/4NfXEi8rreQsnAr4aJ45RLCKgnjcWX46Lbt9SadiCcz6`,
|
|
1820
|
+
[K.poly.id]: `${ae}/3PyRPWSvDnMowGbeBy7aNsvUkD5ZuxdXQw2RdJq4NdXi`,
|
|
1821
|
+
[K.arb.id]: `${ae}/83bpQexEaqBjHaQbKoFTbtvCXuo5RudRkfLgtRUYqo2c`,
|
|
1822
|
+
[K.base.id]: `${ae}/DFhaPQb3HATXkpsWNZw3gydYHehLBVEDiSk4iBdZJyps`,
|
|
1823
|
+
[K.sei.id]: `${ae}/5zjzRnURzoddyFSZBw5E5NAM3oBgPq3NasTYbtMk6EL6`,
|
|
1824
|
+
[K.linea.id]: `${ae}/6VsNPEYfFLPZCqdMMDadoXQjLHWJdjEwiD768GAtb7j6`,
|
|
1825
|
+
[K.sonic.id]: `${ae}/DtBr6a5vsoDd2oAXdPszcn4gLgrr1XC68Q3AJQKXnNLV`,
|
|
1826
|
+
[K.ftm.id]: `${ae}/DdRo1pmJkrJC9fjsjEBWnNE1uqrbh7Diz4tVKd7rfupp`,
|
|
1827
|
+
[K.katana.id]: `${ae}/CGi9sDFMQcnBwF3C3NoCFqnaE34sssbgwPLTwiskSXmW`,
|
|
1828
|
+
[K.avax.id]: `${ae}/FxZ1vMwE5Xy1qvKvZENUMz4vhW8Sh4vXJf9Vp7o17pTx`,
|
|
1829
|
+
[K.bera.id]: ve("berachain"),
|
|
1830
|
+
[K.flare.id]: ve("flare"),
|
|
1831
|
+
[K.cronosZkEvm.id]: ve("cronos-zkevm")
|
|
1832
|
+
}, Jt = "0x0000000000000000000000000000000000000000", en = [
|
|
1833
|
+
Jt,
|
|
1834
1834
|
"0x0000000000000000000000000000000000001010",
|
|
1835
1835
|
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
|
|
1836
1836
|
"0x000000000000000000000000000000000000dEaD",
|
|
1837
1837
|
"0x000000000000000000000000000000000000800A",
|
|
1838
1838
|
"0x000000000000000000000000000000000000800a"
|
|
1839
|
-
], ze = "115792089237316195423570985008687907853269984665640564039457584007913129639935", G = (e) => `${e.name}_${e.chainId}`,
|
|
1839
|
+
], ze = "115792089237316195423570985008687907853269984665640564039457584007913129639935", G = (e) => `${e.name}_${e.chainId}`, tn = {
|
|
1840
1840
|
[G(_.SushiArb)]: [
|
|
1841
1841
|
"0x846F2B29ef314bF3D667981b4ffdADc5B858312a",
|
|
1842
1842
|
"0x08c41f5D1C844061f6D952E25827eeAA576c6536"
|
|
@@ -1886,9 +1886,9 @@ const Yn = (e) => {
|
|
|
1886
1886
|
"0xE5012eBDe5e26EE3Ea41992154731a03023CF274"
|
|
1887
1887
|
]
|
|
1888
1888
|
}, qe = {
|
|
1889
|
-
unit:
|
|
1890
|
-
value:
|
|
1891
|
-
},
|
|
1889
|
+
unit: se.Minutes,
|
|
1890
|
+
value: Yt
|
|
1891
|
+
}, ta = 0.25, na = "100", Je = "RePermitWitnessTransferFrom", nn = {
|
|
1892
1892
|
RePermitWitnessTransferFrom: [
|
|
1893
1893
|
{
|
|
1894
1894
|
name: "permitted",
|
|
@@ -2013,7 +2013,7 @@ const Yn = (e) => {
|
|
|
2013
2013
|
type: "uint256"
|
|
2014
2014
|
}
|
|
2015
2015
|
]
|
|
2016
|
-
},
|
|
2016
|
+
}, an = {
|
|
2017
2017
|
RePermitWitnessTransferFrom: [
|
|
2018
2018
|
{
|
|
2019
2019
|
name: "permitted",
|
|
@@ -2143,13 +2143,13 @@ const Yn = (e) => {
|
|
|
2143
2143
|
type: "uint256"
|
|
2144
2144
|
}
|
|
2145
2145
|
]
|
|
2146
|
-
},
|
|
2146
|
+
}, aa = "https://www.orbs.com/dtwap-and-dlimit-faq/", sa = "https://www.orbs.com/dtwap-and-dlimit-faq/#dSLTP", ra = "https://raw.githubusercontent.com/orbs-network/twap-ui/master/logo/orbslogo.svg", ia = "https://www.orbs.com/assets/img/common/logo.svg", oa = "https://www.orbs.com/", da = "https://www.orbs.com/dtwap-dlimit-disclaimer";
|
|
2147
2147
|
var Te = /* @__PURE__ */ ((e) => (e.FRESHNESS = "freshness", e.MIN_CHUNK_SIZE_USD = "minChunkSizeUsd", e.ENV = "env", e.DURATION = "duration", e.IGNORE_ERRORS = "ignore-errors", e))(Te || {});
|
|
2148
|
-
const
|
|
2149
|
-
function
|
|
2148
|
+
const ca = "-5", pa = "10", ua = "-10", la = "5", fa = "Something went wrong";
|
|
2149
|
+
function sn(e) {
|
|
2150
2150
|
throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
2151
2151
|
}
|
|
2152
|
-
const
|
|
2152
|
+
const rn = {
|
|
2153
2153
|
1: { dex: { sushiswap: { type: "default:sushi", router: "0xAC4c6e212A361c968F1725b4d055b47E63F80b75", adapter: "0x3Ee50D79e6D0205f325928AAFb041b63E1767Bc5", fee: "0x28F6C9dBE21fFc146Af8d5D15c49Cf48F61140Dc" } } },
|
|
2154
2154
|
14: { dex: { spark: { type: "default:spark", adapter: "0xB18c633B6584A33E45a8840a759f56dF17117b1D", fee: "0xaeA8C3e1a129A77686E115b1a46D9aD8405F7D2b" } } },
|
|
2155
2155
|
56: { dex: { thena: { type: "default:odos-v2", adapter: "0xB75218ba5A99bF57Fd02556B70F05A4A0f1Dbe67", fee: "0x15eBc8b5b3877512FFF23650188694A9a8891FAc" }, pancake: { type: "p2:pancakeswap-v2", adapter: "0x654272F7e6e6E912D38650f783eFd44452fD6ee5", fee: "0x37A957f10F458e0d7fDECBE2917971b57F15c927" }, newera: { type: "default:odos-v2", adapter: "0x845f459271D800f6Ab32D78400b8Aa18414E80b0", fee: "0x4E7454909eB6D539111D56b50d68897E933D2d11" } } },
|
|
@@ -2166,10 +2166,10 @@ const sn = {
|
|
|
2166
2166
|
"*": { wm: "0x0005d5cE0dB57e5BE3b2b8b6FeB75f0ccd015000", repermit: "0x00002a9C4D9497df5Bd31768eC5d30eEf5405000", cosigner: "0x0007ec53404c423C935e830ec21903e184690000", reactor: "0x0006a959430e8fBB858D81B2D1140B0ae5c26001", executor: "0x000eBA869d76C618ddc4A6D685A0820A620Ce002", refinery: "0x000E474c0D7084EAA35A501035E73269f4b009A5", salt: { wm: "0xc9b46eae42dfeba3222a0315bf682f33cd5cc9d60c9625642e88406f8415f152", repermit: "0x4871dc9008e605821ea9677b65ea2a60ffb774afb31e0dcaea2e192880096be7", cosigner: "0x37576f2ac1d2a602f00777611edf6f0cbc27611b0980b29bc7856fa79b2b8073", reactor: "0x034169222370f2fd587ef8998082d762cceef58a272330215f5110ec0d76d400", executor: "0xea139bc421fa5e272bed3db74233b2e02077e0aacf8b855f87961e98f2fb467f", refinery: "0x9746de29f1dd31b2c8460d71e92a7aefa34911130e61f274f37776e598c48bec" } }
|
|
2167
2167
|
};
|
|
2168
2168
|
var Pe, Xe;
|
|
2169
|
-
function
|
|
2169
|
+
function on() {
|
|
2170
2170
|
if (Xe) return Pe;
|
|
2171
2171
|
Xe = 1;
|
|
2172
|
-
const e =
|
|
2172
|
+
const e = rn, n = (d) => sn(`./out/${d}.sol/${d}.json`).abi, r = () => ({
|
|
2173
2173
|
wm: n("WM"),
|
|
2174
2174
|
repermit: n("RePermit"),
|
|
2175
2175
|
reactor: n("OrderReactor"),
|
|
@@ -2187,41 +2187,41 @@ function rn() {
|
|
|
2187
2187
|
}
|
|
2188
2188
|
return Pe = { config: y, abis: r, raw: e }, Pe;
|
|
2189
2189
|
}
|
|
2190
|
-
var et =
|
|
2191
|
-
const
|
|
2190
|
+
var et = on();
|
|
2191
|
+
const ma = (e, n, r) => {
|
|
2192
2192
|
if (!e || !n || !r) return;
|
|
2193
2193
|
const y = E(e).times(n), d = E(10).pow(r);
|
|
2194
2194
|
return y.div(d).toFixed(0);
|
|
2195
|
-
},
|
|
2195
|
+
}, ya = (e, n, r, y) => {
|
|
2196
2196
|
if (r || !y || !e || !n)
|
|
2197
2197
|
return E(0).toString();
|
|
2198
2198
|
const d = E(e).times(E(n)), h = E(10).pow(y), g = d.div(h);
|
|
2199
2199
|
return E.max(1, g).integerValue(E.ROUND_FLOOR).toFixed(0);
|
|
2200
|
-
},
|
|
2200
|
+
}, ha = (e, n, r, y) => {
|
|
2201
2201
|
if (e === z.TWAP || e === z.LIMIT)
|
|
2202
2202
|
return "0";
|
|
2203
2203
|
if (!y || !n || !r) return;
|
|
2204
2204
|
const d = E(n).times(E(r)), h = E(10).pow(y), g = d.div(h);
|
|
2205
2205
|
return E.max(1, g).integerValue(E.ROUND_FLOOR).toFixed(0) || "0";
|
|
2206
|
-
},
|
|
2207
|
-
const d = le(r) * 2 * n, h = xe(Te.DURATION), g =
|
|
2208
|
-
return h ? { unit: g, value: Number(E(Number(h) / g).toFixed(2)) } : y || (e === z.LIMIT ? { unit:
|
|
2209
|
-
},
|
|
2206
|
+
}, Aa = (e, n, r, y) => {
|
|
2207
|
+
const d = le(r) * 2 * n, h = xe(Te.DURATION), g = Gt(h ? Number(h) : d);
|
|
2208
|
+
return h ? { unit: g, value: Number(E(Number(h) / g).toFixed(2)) } : y || (e === z.LIMIT ? { unit: se.Days, value: 7 } : e === z.STOP_LOSS || e === z.TAKE_PROFIT ? { unit: se.Days, value: 1 } : { unit: g, value: Number(E(d / g).toFixed(2)) });
|
|
2209
|
+
}, ba = (e, n, r) => n !== z.TWAP ? 1 : r !== void 0 ? r : e, ga = (e, n, r, y) => {
|
|
2210
2210
|
if (!n || !r || !y) return 1;
|
|
2211
2211
|
const h = E(r).times(n).div(y).integerValue(E.ROUND_FLOOR).toNumber(), g = Math.floor(
|
|
2212
2212
|
Ee / 2 / le(e)
|
|
2213
2213
|
);
|
|
2214
2214
|
return Math.max(1, Math.min(h, g));
|
|
2215
|
-
},
|
|
2215
|
+
}, Ea = (e, n) => e + le(n) + 6e4, dn = (e) => e.bidDelaySeconds * 1e3 * 2, xa = (e = "", n = 0) => !e || !n ? "0" : E(e).div(n).integerValue(E.ROUND_FLOOR).toFixed(0), Ta = (e, n) => ({
|
|
2216
2216
|
isError: !(e.unit === qe.unit && e.value === qe.value) && le(e) * n > Ee,
|
|
2217
2217
|
value: Math.floor(Ee / n)
|
|
2218
|
-
}),
|
|
2218
|
+
}), wa = (e = "", n = "", r) => {
|
|
2219
2219
|
if (r === z.STOP_LOSS)
|
|
2220
2220
|
return {
|
|
2221
2221
|
isError: E(n || 0).gte(E(e || 0)),
|
|
2222
2222
|
value: e
|
|
2223
2223
|
};
|
|
2224
|
-
},
|
|
2224
|
+
}, Ca = (e = "", n = "", r) => {
|
|
2225
2225
|
if (r === z.TAKE_PROFIT)
|
|
2226
2226
|
return {
|
|
2227
2227
|
isError: E(n || 0).lte(E(e || 0)),
|
|
@@ -2233,33 +2233,33 @@ const fa = (e, n, r) => {
|
|
|
2233
2233
|
isError: E(n || 0).gte(E(e || 0)),
|
|
2234
2234
|
value: e
|
|
2235
2235
|
};
|
|
2236
|
-
},
|
|
2236
|
+
}, Da = (e = "", n = "", r = !1, y) => {
|
|
2237
2237
|
if (!r && y === z.TAKE_PROFIT)
|
|
2238
2238
|
return {
|
|
2239
2239
|
isError: E(n || 0).gte(E(e || 0)),
|
|
2240
2240
|
value: e
|
|
2241
2241
|
};
|
|
2242
|
-
},
|
|
2242
|
+
}, Sa = (e, n) => e === z.STOP_LOSS || e === z.TAKE_PROFIT ? {
|
|
2243
2243
|
isError: le(n) > 5184e6,
|
|
2244
2244
|
value: 5184e6
|
|
2245
2245
|
} : {
|
|
2246
2246
|
isError: le(n) > Ee,
|
|
2247
2247
|
// 365 days
|
|
2248
2248
|
value: Ee
|
|
2249
|
-
},
|
|
2249
|
+
}, ka = (e) => ({
|
|
2250
2250
|
isError: le(e) < Ge,
|
|
2251
2251
|
value: Ge
|
|
2252
|
-
}),
|
|
2253
|
-
isError: le(e) <
|
|
2254
|
-
value:
|
|
2255
|
-
}),
|
|
2252
|
+
}), Ba = (e) => ({
|
|
2253
|
+
isError: le(e) < Le,
|
|
2254
|
+
value: Le
|
|
2255
|
+
}), _a = (e, n, r) => ({
|
|
2256
2256
|
isError: E(n || 0).multipliedBy(e || 0).isLessThan(r),
|
|
2257
2257
|
value: r
|
|
2258
|
-
}),
|
|
2258
|
+
}), Oa = (e, n, r) => ({
|
|
2259
2259
|
isError: r === z.TWAP && E(e).isGreaterThan(n),
|
|
2260
2260
|
value: n
|
|
2261
|
-
}),
|
|
2262
|
-
if (e ===
|
|
2261
|
+
}), cn = (e, n) => {
|
|
2262
|
+
if (e === ce.Pancake)
|
|
2263
2263
|
switch (n) {
|
|
2264
2264
|
case 56:
|
|
2265
2265
|
return _.PancakeSwap;
|
|
@@ -2272,7 +2272,7 @@ const fa = (e, n, r) => {
|
|
|
2272
2272
|
default:
|
|
2273
2273
|
return _.PancakeSwap;
|
|
2274
2274
|
}
|
|
2275
|
-
if (e ===
|
|
2275
|
+
if (e === ce.Sushiswap)
|
|
2276
2276
|
switch (n) {
|
|
2277
2277
|
case 1:
|
|
2278
2278
|
return _.SushiEth;
|
|
@@ -2285,7 +2285,7 @@ const fa = (e, n, r) => {
|
|
|
2285
2285
|
default:
|
|
2286
2286
|
return _.SushiEth;
|
|
2287
2287
|
}
|
|
2288
|
-
if (e ===
|
|
2288
|
+
if (e === ce.Quick)
|
|
2289
2289
|
switch (n) {
|
|
2290
2290
|
case 137:
|
|
2291
2291
|
return _.QuickSwap;
|
|
@@ -2294,14 +2294,14 @@ const fa = (e, n, r) => {
|
|
|
2294
2294
|
default:
|
|
2295
2295
|
return _.QuickSwap;
|
|
2296
2296
|
}
|
|
2297
|
-
if (e ===
|
|
2297
|
+
if (e === ce.Thena)
|
|
2298
2298
|
switch (n) {
|
|
2299
2299
|
case 56:
|
|
2300
2300
|
return _.Thena;
|
|
2301
2301
|
default:
|
|
2302
2302
|
return _.Thena;
|
|
2303
2303
|
}
|
|
2304
|
-
if (e ===
|
|
2304
|
+
if (e === ce.Spooky)
|
|
2305
2305
|
switch (n) {
|
|
2306
2306
|
case 250:
|
|
2307
2307
|
return _.SpookySwap;
|
|
@@ -2310,45 +2310,45 @@ const fa = (e, n, r) => {
|
|
|
2310
2310
|
default:
|
|
2311
2311
|
return _.SpookySwap;
|
|
2312
2312
|
}
|
|
2313
|
-
if (e ===
|
|
2313
|
+
if (e === ce.Lynex)
|
|
2314
2314
|
switch (n) {
|
|
2315
2315
|
case 59144:
|
|
2316
2316
|
return _.Lynex;
|
|
2317
2317
|
default:
|
|
2318
2318
|
return _.Lynex;
|
|
2319
2319
|
}
|
|
2320
|
-
if (e ===
|
|
2320
|
+
if (e === ce.Swapx)
|
|
2321
2321
|
switch (n) {
|
|
2322
2322
|
case 146:
|
|
2323
2323
|
return _.SwapX;
|
|
2324
2324
|
default:
|
|
2325
2325
|
return _.SwapX;
|
|
2326
2326
|
}
|
|
2327
|
-
if (e ===
|
|
2327
|
+
if (e === ce.Blackhole)
|
|
2328
2328
|
switch (n) {
|
|
2329
2329
|
case 43114:
|
|
2330
2330
|
return _.BlackholeAvax;
|
|
2331
2331
|
default:
|
|
2332
2332
|
return _.BlackholeAvax;
|
|
2333
2333
|
}
|
|
2334
|
-
},
|
|
2334
|
+
}, pn = (e, n = 0) => {
|
|
2335
2335
|
const { abi: r, ...y } = et.config(n, e);
|
|
2336
2336
|
return {
|
|
2337
2337
|
...y,
|
|
2338
2338
|
partner: e,
|
|
2339
|
-
twapConfig:
|
|
2339
|
+
twapConfig: cn(e, n)
|
|
2340
2340
|
};
|
|
2341
|
-
},
|
|
2341
|
+
}, un = () => {
|
|
2342
2342
|
const e = et.raw;
|
|
2343
2343
|
return Object.entries(e).filter(([n]) => n !== "*").flatMap(([n, r]) => {
|
|
2344
2344
|
const y = r == null ? void 0 : r.dex;
|
|
2345
2345
|
return !y || typeof y != "object" ? [] : Object.entries(y).map(([d]) => ({
|
|
2346
2346
|
chainId: Number(n),
|
|
2347
2347
|
name: d,
|
|
2348
|
-
config:
|
|
2348
|
+
config: pn(d, Number(n))
|
|
2349
2349
|
}));
|
|
2350
2350
|
}).sort((n, r) => n.name.localeCompare(r.name));
|
|
2351
|
-
},
|
|
2351
|
+
}, Ra = (e) => {
|
|
2352
2352
|
const n = xe(
|
|
2353
2353
|
Te.MIN_CHUNK_SIZE_USD
|
|
2354
2354
|
);
|
|
@@ -2369,14 +2369,14 @@ const fa = (e, n, r) => {
|
|
|
2369
2369
|
if (!xe(Te.IGNORE_ERRORS) && !(E(e || 0).isZero() || E(n || 0).isZero() || E(r || "0").isZero() || y))
|
|
2370
2370
|
return k || d || h || g || x || w || D;
|
|
2371
2371
|
}, tt = (e, n) => {
|
|
2372
|
-
const r = Date.now().toString(), y = parseInt((e / 1e3).toFixed(0)), d =
|
|
2372
|
+
const r = Date.now().toString(), y = parseInt((e / 1e3).toFixed(0)), d = qt(n / 1e3), h = xe(Te.FRESHNESS), g = h ? parseInt(h) : 60;
|
|
2373
2373
|
return {
|
|
2374
2374
|
nonce: r,
|
|
2375
2375
|
epoch: y,
|
|
2376
2376
|
deadline: d,
|
|
2377
2377
|
freshness: g
|
|
2378
2378
|
};
|
|
2379
|
-
},
|
|
2379
|
+
}, ln = ({
|
|
2380
2380
|
chainId: e,
|
|
2381
2381
|
srcToken: n,
|
|
2382
2382
|
dstToken: r,
|
|
@@ -2389,19 +2389,19 @@ const fa = (e, n, r) => {
|
|
|
2389
2389
|
dstMinAmountPerTrade: D = "0",
|
|
2390
2390
|
triggerAmountPerTrade: k = "0",
|
|
2391
2391
|
config: T,
|
|
2392
|
-
module:
|
|
2392
|
+
module: C
|
|
2393
2393
|
}) => {
|
|
2394
|
-
const { nonce:
|
|
2394
|
+
const { nonce: P, epoch: I, deadline: pe, freshness: Q } = tt(
|
|
2395
2395
|
h,
|
|
2396
2396
|
d
|
|
2397
|
-
), fe =
|
|
2397
|
+
), fe = C === z.TAKE_PROFIT ? ze : k, b = C === z.TAKE_PROFIT ? k : D, me = {
|
|
2398
2398
|
permitted: {
|
|
2399
2399
|
token: n,
|
|
2400
2400
|
amount: y
|
|
2401
2401
|
},
|
|
2402
2402
|
spender: T.reactor,
|
|
2403
|
-
nonce:
|
|
2404
|
-
deadline:
|
|
2403
|
+
nonce: P,
|
|
2404
|
+
deadline: pe,
|
|
2405
2405
|
witness: {
|
|
2406
2406
|
reactor: T.reactor,
|
|
2407
2407
|
executor: T.executor,
|
|
@@ -2412,13 +2412,13 @@ const fa = (e, n, r) => {
|
|
|
2412
2412
|
data: "0x"
|
|
2413
2413
|
},
|
|
2414
2414
|
swapper: x,
|
|
2415
|
-
nonce:
|
|
2416
|
-
deadline:
|
|
2415
|
+
nonce: P,
|
|
2416
|
+
deadline: pe,
|
|
2417
2417
|
chainid: e,
|
|
2418
2418
|
exclusivity: 0,
|
|
2419
2419
|
epoch: I,
|
|
2420
2420
|
slippage: g,
|
|
2421
|
-
freshness:
|
|
2421
|
+
freshness: Q,
|
|
2422
2422
|
input: {
|
|
2423
2423
|
token: n,
|
|
2424
2424
|
amount: w,
|
|
@@ -2440,10 +2440,10 @@ const fa = (e, n, r) => {
|
|
|
2440
2440
|
verifyingContract: T.repermit
|
|
2441
2441
|
},
|
|
2442
2442
|
order: me,
|
|
2443
|
-
types:
|
|
2443
|
+
types: nn,
|
|
2444
2444
|
primaryType: Je
|
|
2445
2445
|
};
|
|
2446
|
-
},
|
|
2446
|
+
}, fn = ({
|
|
2447
2447
|
chainId: e,
|
|
2448
2448
|
srcToken: n,
|
|
2449
2449
|
dstToken: r,
|
|
@@ -2456,37 +2456,38 @@ const fa = (e, n, r) => {
|
|
|
2456
2456
|
dstMinAmountPerTrade: D = "0",
|
|
2457
2457
|
triggerAmountPerTrade: k = "0",
|
|
2458
2458
|
config: T,
|
|
2459
|
-
module:
|
|
2459
|
+
module: C,
|
|
2460
|
+
feePercentage: P
|
|
2460
2461
|
}) => {
|
|
2461
|
-
const { nonce:
|
|
2462
|
+
const { nonce: I, epoch: pe, deadline: Q, freshness: fe } = tt(
|
|
2462
2463
|
h,
|
|
2463
2464
|
d
|
|
2464
|
-
),
|
|
2465
|
+
), b = Math.floor(Date.now() / 1e3).toString(), me = D, Ae = P * 100, be = C === z.STOP_LOSS ? k : "0", X = C === z.TAKE_PROFIT ? k : "0", te = {
|
|
2465
2466
|
permitted: {
|
|
2466
2467
|
token: n,
|
|
2467
2468
|
amount: y
|
|
2468
2469
|
},
|
|
2469
2470
|
spender: T.reactor,
|
|
2470
|
-
nonce:
|
|
2471
|
-
deadline:
|
|
2471
|
+
nonce: I,
|
|
2472
|
+
deadline: Q,
|
|
2472
2473
|
witness: {
|
|
2473
2474
|
reactor: T.reactor,
|
|
2474
2475
|
executor: T.executor,
|
|
2475
2476
|
exchange: {
|
|
2476
2477
|
adapter: T.adapter,
|
|
2477
2478
|
ref: T.fee,
|
|
2478
|
-
share:
|
|
2479
|
+
share: Ae,
|
|
2479
2480
|
data: "0x"
|
|
2480
2481
|
},
|
|
2481
2482
|
swapper: x,
|
|
2482
|
-
nonce:
|
|
2483
|
-
start:
|
|
2484
|
-
deadline:
|
|
2483
|
+
nonce: I,
|
|
2484
|
+
start: b,
|
|
2485
|
+
deadline: Q,
|
|
2485
2486
|
chainid: e,
|
|
2486
2487
|
exclusivity: 0,
|
|
2487
|
-
epoch:
|
|
2488
|
+
epoch: pe,
|
|
2488
2489
|
slippage: g,
|
|
2489
|
-
freshness:
|
|
2490
|
+
freshness: fe,
|
|
2490
2491
|
input: {
|
|
2491
2492
|
token: n,
|
|
2492
2493
|
amount: w,
|
|
@@ -2494,9 +2495,9 @@ const fa = (e, n, r) => {
|
|
|
2494
2495
|
},
|
|
2495
2496
|
output: {
|
|
2496
2497
|
token: r,
|
|
2497
|
-
limit: E(
|
|
2498
|
-
triggerLower: E(
|
|
2499
|
-
triggerUpper: E(
|
|
2498
|
+
limit: E(me || 0).toFixed(),
|
|
2499
|
+
triggerLower: E(be || 0).toFixed(),
|
|
2500
|
+
triggerUpper: E(X || 0).toFixed(),
|
|
2500
2501
|
recipient: x
|
|
2501
2502
|
}
|
|
2502
2503
|
}
|
|
@@ -2508,22 +2509,22 @@ const fa = (e, n, r) => {
|
|
|
2508
2509
|
chainId: e,
|
|
2509
2510
|
verifyingContract: T.repermit
|
|
2510
2511
|
},
|
|
2511
|
-
order:
|
|
2512
|
-
types:
|
|
2512
|
+
order: te,
|
|
2513
|
+
types: an,
|
|
2513
2514
|
primaryType: Je
|
|
2514
2515
|
};
|
|
2515
|
-
},
|
|
2516
|
-
version:
|
|
2517
|
-
},
|
|
2518
|
-
let
|
|
2519
|
-
function
|
|
2520
|
-
|
|
2516
|
+
}, Pa = (e) => We() ? fn(e) : ln(e), mn = "1.10.0", yn = {
|
|
2517
|
+
version: mn
|
|
2518
|
+
}, hn = 0.7, An = `https://bi.orbs.network/putes/twap-ui-${hn}`, nt = yn.version;
|
|
2519
|
+
let Ue = "unknown";
|
|
2520
|
+
function Ia(e) {
|
|
2521
|
+
Ue = e;
|
|
2521
2522
|
}
|
|
2522
2523
|
function Ie() {
|
|
2523
2524
|
const e = Math.random().toString(36).substring(2, 16), n = Math.random().toString(36).substring(2, 16), r = Date.now().toString(36);
|
|
2524
2525
|
return `id_${e + n + r}`;
|
|
2525
2526
|
}
|
|
2526
|
-
const
|
|
2527
|
+
const bn = (e, n, r) => {
|
|
2527
2528
|
var y, d, h, g, x, w, D, k, T;
|
|
2528
2529
|
return {
|
|
2529
2530
|
spotVersion: nt,
|
|
@@ -2552,7 +2553,7 @@ const An = (e, n, r) => {
|
|
|
2552
2553
|
};
|
|
2553
2554
|
}, je = async (e) => {
|
|
2554
2555
|
try {
|
|
2555
|
-
await fetch(
|
|
2556
|
+
await fetch(An, {
|
|
2556
2557
|
method: "POST",
|
|
2557
2558
|
headers: {
|
|
2558
2559
|
Accept: "application/json",
|
|
@@ -2564,11 +2565,11 @@ const An = (e, n, r) => {
|
|
|
2564
2565
|
console.error("Failed to send BI", n);
|
|
2565
2566
|
}
|
|
2566
2567
|
};
|
|
2567
|
-
class
|
|
2568
|
+
class gn {
|
|
2568
2569
|
constructor() {
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2570
|
+
Ce(this, "timeout");
|
|
2571
|
+
Ce(this, "config");
|
|
2572
|
+
Ce(this, "data", {
|
|
2572
2573
|
_id: Ie()
|
|
2573
2574
|
});
|
|
2574
2575
|
}
|
|
@@ -2650,8 +2651,8 @@ class bn {
|
|
|
2650
2651
|
triggerPricePerTrade: D = "",
|
|
2651
2652
|
deadline: k,
|
|
2652
2653
|
fillDelay: T,
|
|
2653
|
-
slippage:
|
|
2654
|
-
isMarketOrder:
|
|
2654
|
+
slippage: C,
|
|
2655
|
+
isMarketOrder: P,
|
|
2655
2656
|
chunksAmount: I
|
|
2656
2657
|
}) {
|
|
2657
2658
|
this.updateAndSend({
|
|
@@ -2666,11 +2667,11 @@ class bn {
|
|
|
2666
2667
|
triggerPricePerTrade: D,
|
|
2667
2668
|
deadline: k,
|
|
2668
2669
|
fillDelay: T,
|
|
2669
|
-
slippage:
|
|
2670
|
+
slippage: C,
|
|
2670
2671
|
chainId: r,
|
|
2671
2672
|
walletAddress: n,
|
|
2672
2673
|
module: y,
|
|
2673
|
-
orderType:
|
|
2674
|
+
orderType: P ? "market" : "limit",
|
|
2674
2675
|
actionError: void 0
|
|
2675
2676
|
});
|
|
2676
2677
|
}
|
|
@@ -2694,8 +2695,8 @@ class bn {
|
|
|
2694
2695
|
this.config = n, y !== ((d = this.data) == null ? void 0 : d.chainId) && (this.data = {
|
|
2695
2696
|
_id: Ie(),
|
|
2696
2697
|
action: "module-import",
|
|
2697
|
-
uiVersion:
|
|
2698
|
-
...
|
|
2698
|
+
uiVersion: Ue,
|
|
2699
|
+
...bn(n, r, y),
|
|
2699
2700
|
origin: window.location.origin
|
|
2700
2701
|
}, this.updateAndSend(this.data));
|
|
2701
2702
|
}
|
|
@@ -2718,7 +2719,7 @@ class bn {
|
|
|
2718
2719
|
this.data = {
|
|
2719
2720
|
_id: Ie(),
|
|
2720
2721
|
action: "reset",
|
|
2721
|
-
uiVersion:
|
|
2722
|
+
uiVersion: Ue,
|
|
2722
2723
|
origin: this.data.origin,
|
|
2723
2724
|
spotVersion: nt,
|
|
2724
2725
|
partner: this.data.partner,
|
|
@@ -2754,15 +2755,15 @@ class bn {
|
|
|
2754
2755
|
});
|
|
2755
2756
|
}
|
|
2756
2757
|
}
|
|
2757
|
-
const Ne = new
|
|
2758
|
+
const Ne = new gn(), En = (e) => {
|
|
2758
2759
|
var x;
|
|
2759
2760
|
const n = E(e.order.witness.output.limit || 0).gt(1), r = e.order.witness.output.stop, y = e.order.witness.output.triggerUpper, d = E(r || 0).eq(ze) || E(y || 0).gt(0), h = E(r || 0).gt(0), g = ((x = e.metadata.chunks) == null ? void 0 : x.length) || E(e.order.witness.input.maxAmount).div(E(e.order.witness.input.amount)).toNumber();
|
|
2760
2761
|
return d ? q.TAKE_PROFIT : h ? n ? q.STOP_LOSS_LIMIT : q.STOP_LOSS_MARKET : n ? g > 1 && n ? q.TWAP_LIMIT : n ? q.LIMIT : q.TWAP_MARKET : q.TWAP_MARKET;
|
|
2761
|
-
},
|
|
2762
|
+
}, xn = (e) => {
|
|
2762
2763
|
var d;
|
|
2763
2764
|
const n = ((d = e.metadata.chunks) == null ? void 0 : d.filter((h) => h.status === "success").length) || 0, r = e.metadata.expectedChunks || 0, y = E(n).dividedBy(r).toNumber();
|
|
2764
2765
|
return y >= 0.99 ? 100 : y <= 0 ? 0 : Number((y * 100).toFixed(2));
|
|
2765
|
-
},
|
|
2766
|
+
}, Tn = (e, n) => e.metadata.status === "completed" || n >= 99 ? ie.Completed : ["pending", "eligible"].includes(e.metadata.status) ? ie.Open : e.metadata.description.toLowerCase() === "cancelled by contract" ? ie.Canceled : ie.Expired, wn = (e) => {
|
|
2766
2767
|
var r;
|
|
2767
2768
|
return (((r = e.metadata.chunks) == null ? void 0 : r.filter((y) => y.status === "success")) || []).map((y) => ({
|
|
2768
2769
|
inAmount: y.inAmount,
|
|
@@ -2770,11 +2771,11 @@ const Ne = new bn(), gn = (e) => {
|
|
|
2770
2771
|
timestamp: new Date(y.timestamp).getTime(),
|
|
2771
2772
|
txHash: y.txHash
|
|
2772
2773
|
}));
|
|
2773
|
-
},
|
|
2774
|
+
}, Cn = (e, n) => {
|
|
2774
2775
|
var y;
|
|
2775
2776
|
const r = e.length;
|
|
2776
2777
|
return r >= n && ((y = e[r - 1]) == null ? void 0 : y.timestamp) || 0;
|
|
2777
|
-
}, Fn = (e) => E(e.metadata.displayOnlyInputTokenPriceUSD).dividedBy(1e18).toFixed(), $e = (e) => Number(e.order.witness.output.limit) === 1 ? "" : e.order.witness.output.limit,
|
|
2778
|
+
}, Fn = (e) => E(e.metadata.displayOnlyInputTokenPriceUSD).dividedBy(1e18).toFixed(), $e = (e) => Number(e.order.witness.output.limit) === 1 ? "" : e.order.witness.output.limit, Dn = (e) => {
|
|
2778
2779
|
const {
|
|
2779
2780
|
triggerLower: n = "0",
|
|
2780
2781
|
triggerUpper: r = "0"
|
|
@@ -2784,20 +2785,20 @@ const Ne = new bn(), gn = (e) => {
|
|
|
2784
2785
|
triggerPricePerTrade: h ? r : n,
|
|
2785
2786
|
dstMinAmountTotal: E(y).multipliedBy(d).toFixed()
|
|
2786
2787
|
};
|
|
2787
|
-
},
|
|
2788
|
+
}, Sn = (e) => {
|
|
2788
2789
|
const n = $e(e), r = E(e.order.witness.output.stop || 0).eq(ze), y = e.metadata.expectedChunks || 1;
|
|
2789
2790
|
return {
|
|
2790
2791
|
dstMinAmountPerTrade: r ? "" : n,
|
|
2791
2792
|
triggerPricePerTrade: r ? n : E(e.order.witness.output.stop || "").toFixed(),
|
|
2792
2793
|
dstMinAmountTotal: r ? "" : E(n).multipliedBy(y).toFixed()
|
|
2793
2794
|
};
|
|
2794
|
-
},
|
|
2795
|
-
const n =
|
|
2795
|
+
}, kn = (e) => We() ? Dn(e) : Sn(e), at = (e) => {
|
|
2796
|
+
const n = xn(e), r = $e(e), y = e.metadata.expectedChunks || 1, d = wn(e);
|
|
2796
2797
|
return {
|
|
2797
2798
|
id: e.hash,
|
|
2798
2799
|
hash: e.hash,
|
|
2799
2800
|
version: 2,
|
|
2800
|
-
type:
|
|
2801
|
+
type: En(e),
|
|
2801
2802
|
maker: e.order.witness.swapper,
|
|
2802
2803
|
progress: n,
|
|
2803
2804
|
srcAmountFilled: d.reduce((h, g) => h.plus(g.inAmount), new E(0)).toFixed() || "",
|
|
@@ -2814,12 +2815,12 @@ const Ne = new bn(), gn = (e) => {
|
|
|
2814
2815
|
totalTradesAmount: y,
|
|
2815
2816
|
isMarketPrice: E(r || 0).lte(1),
|
|
2816
2817
|
chainId: e.order.witness.chainid,
|
|
2817
|
-
filledOrderTimestamp:
|
|
2818
|
-
status:
|
|
2818
|
+
filledOrderTimestamp: Cn(d, y),
|
|
2819
|
+
status: Tn(e, n),
|
|
2819
2820
|
rawOrder: e,
|
|
2820
|
-
...
|
|
2821
|
+
...kn(e)
|
|
2821
2822
|
};
|
|
2822
|
-
},
|
|
2823
|
+
}, Bn = async ({
|
|
2823
2824
|
chainId: e,
|
|
2824
2825
|
signal: n,
|
|
2825
2826
|
account: r,
|
|
@@ -2837,28 +2838,30 @@ const Ne = new bn(), gn = (e) => {
|
|
|
2837
2838
|
} catch {
|
|
2838
2839
|
return [];
|
|
2839
2840
|
}
|
|
2840
|
-
},
|
|
2841
|
+
}, Na = async (e, n) => {
|
|
2841
2842
|
try {
|
|
2842
2843
|
const r = {
|
|
2843
2844
|
signature: n,
|
|
2844
2845
|
order: e,
|
|
2845
2846
|
status: "pending"
|
|
2846
2847
|
};
|
|
2847
|
-
|
|
2848
|
-
const
|
|
2848
|
+
Ne.onCreateOrderRequest();
|
|
2849
|
+
const y = await fetch(`${Ze()}/orders/new`, {
|
|
2849
2850
|
method: "POST",
|
|
2850
2851
|
body: JSON.stringify(r)
|
|
2851
|
-
})
|
|
2852
|
-
if (!d.success)
|
|
2853
|
-
|
|
2852
|
+
}), d = await y.json().catch(() => ({}));
|
|
2853
|
+
if (!y.ok || !(d != null && d.success)) {
|
|
2854
|
+
const g = (d == null ? void 0 : d.message) ?? y.statusText ?? "Request failed", x = (d == null ? void 0 : d.code) ?? y.status;
|
|
2855
|
+
throw new Error(`error:${g}, code:${x}`);
|
|
2856
|
+
}
|
|
2854
2857
|
const h = at(d.signedOrder);
|
|
2855
2858
|
return Ne.onCreateOrderSuccess(h.id), h;
|
|
2856
2859
|
} catch (r) {
|
|
2857
2860
|
throw Ne.onCreateOrderError(r), console.error(r), r;
|
|
2858
2861
|
}
|
|
2859
|
-
},
|
|
2862
|
+
}, de = (e, n) => e && e.length ? e.map(n || ((r) => `${r}`)) : void 0, _n = (e) => {
|
|
2860
2863
|
if (e)
|
|
2861
|
-
return
|
|
2864
|
+
return Zt[e];
|
|
2862
2865
|
}, He = async ({
|
|
2863
2866
|
chainId: e,
|
|
2864
2867
|
buildQuery: n,
|
|
@@ -2868,26 +2871,26 @@ const Ne = new bn(), gn = (e) => {
|
|
|
2868
2871
|
limit: h = 1e3,
|
|
2869
2872
|
page: g
|
|
2870
2873
|
}) => {
|
|
2871
|
-
const x =
|
|
2872
|
-
if (!x) throw new
|
|
2874
|
+
const x = _n(e);
|
|
2875
|
+
if (!x) throw new Nn();
|
|
2873
2876
|
const w = async (T) => {
|
|
2874
|
-
let
|
|
2875
|
-
for (;
|
|
2877
|
+
let C = 0;
|
|
2878
|
+
for (; C <= d; )
|
|
2876
2879
|
try {
|
|
2877
|
-
const
|
|
2880
|
+
const P = await fetch(x, {
|
|
2878
2881
|
method: "POST",
|
|
2879
2882
|
body: JSON.stringify({ query: T }),
|
|
2880
2883
|
signal: y,
|
|
2881
2884
|
headers: { "Content-Type": "application/json" }
|
|
2882
2885
|
});
|
|
2883
|
-
if (!
|
|
2884
|
-
const I = await
|
|
2886
|
+
if (!P.ok) throw new Error(`HTTP error: ${P.status}`);
|
|
2887
|
+
const I = await P.json();
|
|
2885
2888
|
if (I.errors)
|
|
2886
2889
|
throw new Error(I.errors[0].message);
|
|
2887
2890
|
return r(I);
|
|
2888
|
-
} catch (
|
|
2889
|
-
if (
|
|
2890
|
-
await new Promise((I) => setTimeout(I, 500 * 2 **
|
|
2891
|
+
} catch (P) {
|
|
2892
|
+
if (C === d) throw P;
|
|
2893
|
+
await new Promise((I) => setTimeout(I, 500 * 2 ** C)), C++;
|
|
2891
2894
|
}
|
|
2892
2895
|
return [];
|
|
2893
2896
|
};
|
|
@@ -2908,18 +2911,18 @@ const Ne = new bn(), gn = (e) => {
|
|
|
2908
2911
|
}
|
|
2909
2912
|
for (; ; ) {
|
|
2910
2913
|
const T = n(D, h);
|
|
2911
|
-
let
|
|
2914
|
+
let C;
|
|
2912
2915
|
try {
|
|
2913
|
-
|
|
2916
|
+
C = await w(T);
|
|
2914
2917
|
} catch {
|
|
2915
2918
|
console.warn(`Page ${D} failed, retrying one final time...`);
|
|
2916
2919
|
try {
|
|
2917
|
-
|
|
2920
|
+
C = await w(T);
|
|
2918
2921
|
} catch {
|
|
2919
2922
|
return k;
|
|
2920
2923
|
}
|
|
2921
2924
|
}
|
|
2922
|
-
if (k.push(...
|
|
2925
|
+
if (k.push(...C), C.length < h) break;
|
|
2923
2926
|
D++;
|
|
2924
2927
|
}
|
|
2925
2928
|
return k;
|
|
@@ -2931,9 +2934,9 @@ const Ne = new bn(), gn = (e) => {
|
|
|
2931
2934
|
})), Qe = (e, n) => {
|
|
2932
2935
|
const r = E(e || 0).gt(1);
|
|
2933
2936
|
return !r && n === 1 ? q.TWAP_MARKET : n > 1 && r ? q.TWAP_LIMIT : r ? q.LIMIT : q.TWAP_MARKET;
|
|
2934
|
-
},
|
|
2935
|
-
var
|
|
2936
|
-
const d = st(r || []), h = new E(e.ask_srcAmount || 0).div(e.ask_srcBidAmount).integerValue(E.ROUND_FLOOR).toNumber(), x = (r == null ? void 0 : r.length) === h ? (
|
|
2937
|
+
}, On = (e, n, r, y) => {
|
|
2938
|
+
var C;
|
|
2939
|
+
const d = st(r || []), h = new E(e.ask_srcAmount || 0).div(e.ask_srcBidAmount).integerValue(E.ROUND_FLOOR).toNumber(), x = (r == null ? void 0 : r.length) === h ? (C = r == null ? void 0 : r[(r == null ? void 0 : r.length) - 1]) == null ? void 0 : C.timestamp : void 0, w = d.reduce((P, I) => P.plus(I.inAmount), new E(0)).toFixed(), D = d.reduce((P, I) => P.plus(I.outAmount), new E(0)).toFixed(), k = rt(e.ask_srcAmount, w), T = Qe(e.ask_dstMinAmount, h);
|
|
2937
2940
|
return {
|
|
2938
2941
|
version: 1,
|
|
2939
2942
|
id: e.Contract_id.toString(),
|
|
@@ -2965,33 +2968,33 @@ const Ne = new bn(), gn = (e) => {
|
|
|
2965
2968
|
status: y,
|
|
2966
2969
|
rawOrder: e
|
|
2967
2970
|
};
|
|
2968
|
-
},
|
|
2971
|
+
}, Rn = (e) => {
|
|
2969
2972
|
var T;
|
|
2970
2973
|
if (!e) return "";
|
|
2971
|
-
const n =
|
|
2974
|
+
const n = de(
|
|
2972
2975
|
e.accounts,
|
|
2973
|
-
(
|
|
2974
|
-
), r =
|
|
2975
|
-
|
|
2976
|
-
(
|
|
2977
|
-
), y =
|
|
2976
|
+
(C) => `"${C.toLowerCase()}"`
|
|
2977
|
+
), r = de(
|
|
2978
|
+
Xt(e.configs),
|
|
2979
|
+
(C) => `"${C.toLowerCase()}"`
|
|
2980
|
+
), y = de(
|
|
2978
2981
|
e.inTokenSymbols,
|
|
2979
|
-
(
|
|
2980
|
-
), d =
|
|
2982
|
+
(C) => `"${C.toUpperCase()}"`
|
|
2983
|
+
), d = de(
|
|
2981
2984
|
e.outTokenSymbols,
|
|
2982
|
-
(
|
|
2983
|
-
), h =
|
|
2985
|
+
(C) => `"${C.toUpperCase()}"`
|
|
2986
|
+
), h = de(
|
|
2984
2987
|
e.inTokenAddresses,
|
|
2985
|
-
(
|
|
2986
|
-
), g =
|
|
2988
|
+
(C) => `"${C.toLowerCase()}"`
|
|
2989
|
+
), g = de(
|
|
2987
2990
|
e.outTokenAddresses,
|
|
2988
|
-
(
|
|
2989
|
-
), x =
|
|
2991
|
+
(C) => `"${C.toLowerCase()}"`
|
|
2992
|
+
), x = de(
|
|
2990
2993
|
e.transactionHashes,
|
|
2991
|
-
(
|
|
2992
|
-
), w =
|
|
2993
|
-
(T = e.configs) == null ? void 0 : T.map((
|
|
2994
|
-
(
|
|
2994
|
+
(C) => `"${C.toLowerCase()}"`
|
|
2995
|
+
), w = de(e.orderIds, (C) => `"${C}"`), D = r != null && r.length ? "" : de(
|
|
2996
|
+
(T = e.configs) == null ? void 0 : T.map((C) => C.twapAddress),
|
|
2997
|
+
(C) => `"${C.toLowerCase()}"`
|
|
2995
2998
|
), k = e.minDollarValueIn;
|
|
2996
2999
|
return [
|
|
2997
3000
|
r ? `exchange_in: [${r.join(", ")}]` : "",
|
|
@@ -3017,7 +3020,7 @@ async function vn({
|
|
|
3017
3020
|
limit: y,
|
|
3018
3021
|
filters: d
|
|
3019
3022
|
}) {
|
|
3020
|
-
const h = y || 1e3, g =
|
|
3023
|
+
const h = y || 1e3, g = Rn(d);
|
|
3021
3024
|
return await He({
|
|
3022
3025
|
chainId: e,
|
|
3023
3026
|
signal: n,
|
|
@@ -3064,7 +3067,7 @@ async function vn({
|
|
|
3064
3067
|
}
|
|
3065
3068
|
});
|
|
3066
3069
|
}
|
|
3067
|
-
const
|
|
3070
|
+
const Pn = async ({
|
|
3068
3071
|
chainId: e,
|
|
3069
3072
|
orders: n,
|
|
3070
3073
|
signal: r
|
|
@@ -3099,7 +3102,7 @@ const Rn = async ({
|
|
|
3099
3102
|
function Ve(e) {
|
|
3100
3103
|
return Array.from(new Set(e));
|
|
3101
3104
|
}
|
|
3102
|
-
const
|
|
3105
|
+
const In = async ({
|
|
3103
3106
|
chainId: e,
|
|
3104
3107
|
orders: n,
|
|
3105
3108
|
signal: r
|
|
@@ -3114,9 +3117,9 @@ const Pn = async ({
|
|
|
3114
3117
|
chainId: e,
|
|
3115
3118
|
signal: r,
|
|
3116
3119
|
limit: 1e3,
|
|
3117
|
-
buildQuery: (T,
|
|
3120
|
+
buildQuery: (T, C) => `
|
|
3118
3121
|
{
|
|
3119
|
-
orderFilleds(first: ${
|
|
3122
|
+
orderFilleds(first: ${C}, orderBy: timestamp, skip: ${T * C}, ${D}) {
|
|
3120
3123
|
id
|
|
3121
3124
|
dstAmountOut
|
|
3122
3125
|
dstFee
|
|
@@ -3133,20 +3136,20 @@ const Pn = async ({
|
|
|
3133
3136
|
}
|
|
3134
3137
|
`,
|
|
3135
3138
|
extractResults: (T) => {
|
|
3136
|
-
var
|
|
3137
|
-
return (((
|
|
3138
|
-
...
|
|
3139
|
-
timestamp: new Date(
|
|
3139
|
+
var C;
|
|
3140
|
+
return (((C = T.data) == null ? void 0 : C.orderFilleds) || []).map((P) => ({
|
|
3141
|
+
...P,
|
|
3142
|
+
timestamp: new Date(P.timestamp).getTime()
|
|
3140
3143
|
}));
|
|
3141
3144
|
}
|
|
3142
3145
|
});
|
|
3143
3146
|
};
|
|
3144
|
-
class
|
|
3147
|
+
class Nn extends Error {
|
|
3145
3148
|
constructor() {
|
|
3146
3149
|
super("No graph endpoint found"), this.name = "NoGraphEndpointError";
|
|
3147
3150
|
}
|
|
3148
3151
|
}
|
|
3149
|
-
const
|
|
3152
|
+
const Mn = async ({
|
|
3150
3153
|
chainId: e,
|
|
3151
3154
|
signal: n,
|
|
3152
3155
|
page: r,
|
|
@@ -3161,24 +3164,24 @@ const Nn = async ({
|
|
|
3161
3164
|
limit: y,
|
|
3162
3165
|
filters: d
|
|
3163
3166
|
}), [g, x] = await Promise.all([
|
|
3164
|
-
|
|
3165
|
-
|
|
3167
|
+
In({ chainId: e, orders: h, signal: n }),
|
|
3168
|
+
Pn({ chainId: e, orders: h, signal: n })
|
|
3166
3169
|
]), w = h.map((k) => {
|
|
3167
3170
|
const T = g == null ? void 0 : g.filter(
|
|
3168
|
-
(
|
|
3171
|
+
(C) => C.TWAP_id === Number(k.Contract_id) && Se(C.exchange, k.exchange) && Se(C.twapAddress, k.twapAddress)
|
|
3169
3172
|
);
|
|
3170
|
-
return
|
|
3173
|
+
return On(
|
|
3171
3174
|
k,
|
|
3172
3175
|
e,
|
|
3173
3176
|
T,
|
|
3174
|
-
|
|
3177
|
+
Ln(k, T || [], x)
|
|
3175
3178
|
);
|
|
3176
3179
|
}).sort((k, T) => T.createdAt - k.createdAt), D = /* @__PURE__ */ new Set();
|
|
3177
3180
|
return w.filter((k) => D.has(k.id) ? !1 : (D.add(k.id), !0));
|
|
3178
3181
|
} catch {
|
|
3179
3182
|
return [];
|
|
3180
3183
|
}
|
|
3181
|
-
},
|
|
3184
|
+
}, Ln = (e, n, r) => {
|
|
3182
3185
|
var x;
|
|
3183
3186
|
const y = (x = r == null ? void 0 : r.find(
|
|
3184
3187
|
(w) => w.twapId === e.Contract_id.toString() && Se(w.twapAddress, e.twapAddress)
|
|
@@ -3188,7 +3191,7 @@ const Nn = async ({
|
|
|
3188
3191
|
if (!n || !e) return 0;
|
|
3189
3192
|
const r = E(n).dividedBy(e).toNumber();
|
|
3190
3193
|
return r >= 0.99 ? 100 : r <= 0 ? 0 : Number((r * 100).toFixed(2));
|
|
3191
|
-
}, Un = (e, n, r) => e === 100 ?
|
|
3194
|
+
}, Un = (e, n, r) => e === 100 ? ie.Completed : r === "CANCELED" ? ie.Canceled : r === "COMPLETED" ? ie.Completed : n > Date.now() ? ie.Open : ie.Expired, Ma = async ({
|
|
3192
3195
|
signal: e,
|
|
3193
3196
|
page: n,
|
|
3194
3197
|
chainId: r,
|
|
@@ -3196,90 +3199,91 @@ const Nn = async ({
|
|
|
3196
3199
|
config: d,
|
|
3197
3200
|
account: h
|
|
3198
3201
|
}) => (await Promise.all([
|
|
3199
|
-
d ?
|
|
3200
|
-
|
|
3202
|
+
d ? Mn({ chainId: r, signal: e, page: n, limit: y, filters: { accounts: [h], configs: d.twapConfig ? [d.twapConfig] : [] } }) : Promise.resolve([]),
|
|
3203
|
+
Bn({ chainId: r, signal: e, account: h, exchange: d == null ? void 0 : d.adapter })
|
|
3201
3204
|
]).then(([w, D]) => [...w, ...D])).sort((w, D) => D.createdAt - w.createdAt);
|
|
3202
3205
|
export {
|
|
3203
|
-
|
|
3206
|
+
fa as CRASH_ERROR_MESSAGE,
|
|
3204
3207
|
_ as Configs,
|
|
3205
3208
|
qe as DEFAULT_FILL_DELAY,
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3209
|
+
ua as DEFAULT_STOP_LOSS_LIMIT_PERCENTAGE,
|
|
3210
|
+
ca as DEFAULT_STOP_LOSS_PERCENTAGE,
|
|
3211
|
+
la as DEFAULT_TAKE_PROFIT_LIMIT_PERCENTAGE,
|
|
3212
|
+
pa as DEFAULT_TAKE_PROFIT_PERCENTAGE,
|
|
3213
|
+
da as DISCLAIMER_URL,
|
|
3214
|
+
nn as EIP712_TYPES,
|
|
3215
|
+
an as EIP712_TYPES_DEV,
|
|
3216
|
+
zn as ERC20_ABI,
|
|
3217
|
+
na as EXCLUSIVITY_OVERRIDE_BPS,
|
|
3218
|
+
ta as FEES,
|
|
3219
|
+
Wn as IWETH_ABI,
|
|
3220
|
+
Ht as InputErrors,
|
|
3221
|
+
tn as LEGACY_EXCHANGES_MAP,
|
|
3219
3222
|
Ee as MAX_ORDER_DURATION_MILLIS,
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
+
ea as MIN_CHUNKS,
|
|
3224
|
+
Le as MIN_FILL_DELAY_MILLIS,
|
|
3225
|
+
Yt as MIN_FILL_DELAY_MINUTES,
|
|
3223
3226
|
Ge as MIN_ORDER_DURATION_MILLIS,
|
|
3224
3227
|
z as Module,
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3228
|
+
ra as ORBS_LOGO,
|
|
3229
|
+
ia as ORBS_LOGO_FALLBACK,
|
|
3230
|
+
sa as ORBS_SLTP_FAQ_URL,
|
|
3231
|
+
aa as ORBS_TWAP_FAQ_URL,
|
|
3232
|
+
oa as ORBS_WEBSITE_URL,
|
|
3233
|
+
$t as OrderFilter,
|
|
3234
|
+
ie as OrderStatus,
|
|
3231
3235
|
q as OrderType,
|
|
3232
|
-
|
|
3236
|
+
ce as Partners,
|
|
3233
3237
|
Te as QUERY_PARAMS,
|
|
3234
|
-
|
|
3238
|
+
$n as REPERMIT_ABI,
|
|
3235
3239
|
Je as REPERMIT_PRIMARY_TYPE,
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
+
Jn as SUGGEST_CHUNK_VALUE,
|
|
3241
|
+
Zt as THE_GRAPH_ORDERS_API,
|
|
3242
|
+
Hn as TWAP_ABI,
|
|
3243
|
+
se as TimeUnit,
|
|
3240
3244
|
Ne as analytics,
|
|
3241
|
-
|
|
3245
|
+
Pa as buildRePermitOrderData,
|
|
3242
3246
|
at as buildV2Order,
|
|
3243
3247
|
Se as eqIgnoreCase,
|
|
3244
|
-
|
|
3248
|
+
Ma as getAccountOrders,
|
|
3245
3249
|
Ze as getApiEndpoint,
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3250
|
+
ba as getChunks,
|
|
3251
|
+
pn as getConfig,
|
|
3252
|
+
Ea as getDeadline,
|
|
3253
|
+
ma as getDestTokenAmount,
|
|
3254
|
+
ya as getDestTokenMinAmountPerChunk,
|
|
3255
|
+
Aa as getDuration,
|
|
3252
3256
|
va as getErrors,
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3257
|
+
dn as getEstimatedDelayBetweenChunksMillis,
|
|
3258
|
+
Oa as getMaxChunksError,
|
|
3259
|
+
Ta as getMaxFillDelayError,
|
|
3260
|
+
Sa as getMaxOrderDurationError,
|
|
3261
|
+
ga as getMaxPossibleChunks,
|
|
3262
|
+
Ra as getMinChunkSizeUsd,
|
|
3263
|
+
Ba as getMinFillDelayError,
|
|
3264
|
+
ka as getMinOrderDurationError,
|
|
3265
|
+
_a as getMinTradeSizeError,
|
|
3266
|
+
Gn as getNetwork,
|
|
3267
|
+
jn as getOrderExecutionRate,
|
|
3268
|
+
qn as getOrderFillDelayMillis,
|
|
3269
|
+
Qn as getOrderLimitPriceRate,
|
|
3270
|
+
Xn as getPartnerChains,
|
|
3267
3271
|
G as getPartnerIdentifier,
|
|
3268
|
-
|
|
3269
|
-
|
|
3272
|
+
un as getPartners,
|
|
3273
|
+
xa as getSrcTokenChunkAmount,
|
|
3270
3274
|
Fa as getStopLossLimitPriceError,
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3275
|
+
wa as getStopLossPriceError,
|
|
3276
|
+
Da as getTakeProfitLimitPriceError,
|
|
3277
|
+
Ca as getTakeProfitPriceError,
|
|
3278
|
+
ha as getTriggerPricePerChunk,
|
|
3279
|
+
Yn as getTriggerPricePerTrade,
|
|
3276
3280
|
We as isDev,
|
|
3277
|
-
|
|
3281
|
+
Kn as isNativeAddress,
|
|
3278
3282
|
ze as maxUint256,
|
|
3279
|
-
|
|
3283
|
+
en as nativeTokenAddresses,
|
|
3280
3284
|
K as networks,
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
+
Zn as setApiMode,
|
|
3286
|
+
Ia as setUIVersion,
|
|
3287
|
+
Na as submitOrder,
|
|
3288
|
+
Jt as zeroAddress
|
|
3285
3289
|
};
|