@orbs-network/spot-sdk 0.0.5 → 0.0.6

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.
Files changed (37) hide show
  1. package/dist/index.d.ts +2 -20
  2. package/dist/package.json.d.ts +40 -0
  3. package/dist/spot-sdk.js +2848 -24
  4. package/dist/spot-sdk.umd.cjs +64 -1
  5. package/dist/src/index.d.ts +14 -0
  6. package/dist/src/index.d.ts.map +1 -0
  7. package/dist/src/lib/abi/erc20.json.d.ts +291 -0
  8. package/dist/src/lib/abi/executor.json.d.ts +757 -0
  9. package/dist/src/lib/abi/index.d.ts +501 -0
  10. package/dist/src/lib/abi/index.d.ts.map +1 -0
  11. package/dist/src/lib/abi/iweth.json.d.ts +41 -0
  12. package/dist/src/lib/abi/reactor.json.d.ts +647 -0
  13. package/dist/src/lib/abi/repermit.json.d.ts +316 -0
  14. package/dist/src/lib/analytics.d.ts +106 -0
  15. package/dist/src/lib/analytics.d.ts.map +1 -0
  16. package/dist/src/lib/build-repermit-order-data.d.ts +51 -0
  17. package/dist/src/lib/build-repermit-order-data.d.ts.map +1 -0
  18. package/dist/src/lib/consts.d.ts +84 -0
  19. package/dist/src/lib/consts.d.ts.map +1 -0
  20. package/dist/src/lib/lib.d.ts +53 -0
  21. package/dist/src/lib/lib.d.ts.map +1 -0
  22. package/dist/src/lib/networks.d.ts +445 -0
  23. package/dist/src/lib/networks.d.ts.map +1 -0
  24. package/dist/src/lib/orders/index.d.ts +10 -0
  25. package/dist/src/lib/orders/index.d.ts.map +1 -0
  26. package/dist/src/lib/orders/v1-orders.d.ts +48 -0
  27. package/dist/src/lib/orders/v1-orders.d.ts.map +1 -0
  28. package/dist/src/lib/orders/v2-orders.d.ts +8 -0
  29. package/dist/src/lib/orders/v2-orders.d.ts.map +1 -0
  30. package/dist/src/lib/submit-order.d.ts +3 -0
  31. package/dist/src/lib/submit-order.d.ts.map +1 -0
  32. package/dist/src/lib/types.d.ts +260 -0
  33. package/dist/src/lib/types.d.ts.map +1 -0
  34. package/dist/src/lib/utils.d.ts +458 -0
  35. package/dist/src/lib/utils.d.ts.map +1 -0
  36. package/package.json +4 -1
  37. package/dist/index.d.ts.map +0 -1
package/dist/spot-sdk.js CHANGED
@@ -1,34 +1,2858 @@
1
- var s = Object.defineProperty;
2
- var c = (e, t, n) => t in e ? s(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var i = (e, t, n) => c(e, typeof t != "symbol" ? t + "" : t, n);
4
- class r {
5
- constructor(t = {}) {
6
- i(this, "config");
7
- i(this, "events", []);
8
- this.config = t, this.config.debug && console.log("[Spot] Initialized with config:", t);
1
+ var nt = Object.defineProperty;
2
+ var at = (e, a, d) => a in e ? nt(e, a, { enumerable: !0, configurable: !0, writable: !0, value: d }) : e[a] = d;
3
+ var Te = (e, a, d) => at(e, typeof a != "symbol" ? a + "" : a, d);
4
+ const st = { 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: "" }, rt = { 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: "" }, it = { 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" }, dt = { 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: "" }, pt = { 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" }, ot = { 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" }, ut = { 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" }, ct = { 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" }, lt = { 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: "" }, yt = { 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: "" }, mt = { 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: "" }, ft = { 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: "" }, ht = { 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" }, bt = { 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" }, At = { 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: "" }, gt = { 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: "" }, xt = { 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: "" }, Et = { 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: "" }, wt = { 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: "" }, Ct = { 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" }, Ft = { 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" }, kt = { 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: "" }, Dt = { 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: "" }, St = { 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" }, Bt = { 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" }, Ot = { 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" }, vt = { 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" }, It = { 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" }, _t = { 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" }, Pt = { 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" }, z = {
5
+ SpookySwap: st,
6
+ SpookySwapSonic: rt,
7
+ QuickSwap: it,
8
+ QuickSwapBase: dt,
9
+ Chronos: pt,
10
+ BaseSwap: ot,
11
+ Arbidex: ut,
12
+ Thena: ct,
13
+ PancakeSwap: lt,
14
+ PancakeSwapArbitrum: yt,
15
+ PancakeSwapBase: mt,
16
+ PancakeSwapLinea: ft,
17
+ Lynex: ht,
18
+ SyncSwap: bt,
19
+ Retro: Tt,
20
+ SushiArb: At,
21
+ SushiBase: gt,
22
+ SushiEth: xt,
23
+ SushiKatana: Et,
24
+ DragonSwap: wt,
25
+ TeaFi: Ct,
26
+ SparkDEX: Ft,
27
+ Ramses: kt,
28
+ SwapX: Dt,
29
+ H2Finance: St,
30
+ Shadow: Bt,
31
+ Kodiak: Ot,
32
+ OmniBase: vt,
33
+ OmniArb: It,
34
+ BlackholeAvax: _t,
35
+ NewEraBnb: Pt
36
+ }, Rt = [
37
+ {
38
+ constant: !1,
39
+ inputs: [
40
+ {
41
+ name: "wad",
42
+ type: "uint256"
43
+ }
44
+ ],
45
+ name: "withdraw",
46
+ outputs: [],
47
+ payable: !1,
48
+ stateMutability: "nonpayable",
49
+ type: "function"
50
+ },
51
+ {
52
+ constant: !1,
53
+ inputs: [],
54
+ name: "deposit",
55
+ outputs: [],
56
+ payable: !0,
57
+ stateMutability: "payable",
58
+ type: "function"
59
+ },
60
+ {
61
+ anonymous: !1,
62
+ inputs: [
63
+ {
64
+ indexed: !0,
65
+ name: "dst",
66
+ type: "address"
67
+ },
68
+ {
69
+ indexed: !1,
70
+ name: "wad",
71
+ type: "uint256"
72
+ }
73
+ ],
74
+ name: "Deposit",
75
+ type: "event"
76
+ },
77
+ {
78
+ anonymous: !1,
79
+ inputs: [
80
+ {
81
+ indexed: !0,
82
+ name: "src",
83
+ type: "address"
84
+ },
85
+ {
86
+ indexed: !1,
87
+ name: "wad",
88
+ type: "uint256"
89
+ }
90
+ ],
91
+ name: "Withdrawal",
92
+ type: "event"
9
93
  }
10
- track(t, n = {}) {
11
- const o = {
12
- type: t,
13
- payload: n,
14
- timestamp: Date.now()
94
+ ], Mt = [
95
+ {
96
+ inputs: [
97
+ {
98
+ internalType: "string",
99
+ name: "name_",
100
+ type: "string"
101
+ },
102
+ {
103
+ internalType: "string",
104
+ name: "symbol_",
105
+ type: "string"
106
+ }
107
+ ],
108
+ stateMutability: "nonpayable",
109
+ type: "constructor"
110
+ },
111
+ {
112
+ anonymous: !1,
113
+ inputs: [
114
+ {
115
+ indexed: !0,
116
+ internalType: "address",
117
+ name: "owner",
118
+ type: "address"
119
+ },
120
+ {
121
+ indexed: !0,
122
+ internalType: "address",
123
+ name: "spender",
124
+ type: "address"
125
+ },
126
+ {
127
+ indexed: !1,
128
+ internalType: "uint256",
129
+ name: "value",
130
+ type: "uint256"
131
+ }
132
+ ],
133
+ name: "Approval",
134
+ type: "event"
135
+ },
136
+ {
137
+ anonymous: !1,
138
+ inputs: [
139
+ {
140
+ indexed: !0,
141
+ internalType: "address",
142
+ name: "from",
143
+ type: "address"
144
+ },
145
+ {
146
+ indexed: !0,
147
+ internalType: "address",
148
+ name: "to",
149
+ type: "address"
150
+ },
151
+ {
152
+ indexed: !1,
153
+ internalType: "uint256",
154
+ name: "value",
155
+ type: "uint256"
156
+ }
157
+ ],
158
+ name: "Transfer",
159
+ type: "event"
160
+ },
161
+ {
162
+ inputs: [
163
+ {
164
+ internalType: "address",
165
+ name: "owner",
166
+ type: "address"
167
+ },
168
+ {
169
+ internalType: "address",
170
+ name: "spender",
171
+ type: "address"
172
+ }
173
+ ],
174
+ name: "allowance",
175
+ outputs: [
176
+ {
177
+ internalType: "uint256",
178
+ name: "",
179
+ type: "uint256"
180
+ }
181
+ ],
182
+ stateMutability: "view",
183
+ type: "function"
184
+ },
185
+ {
186
+ inputs: [
187
+ {
188
+ internalType: "address",
189
+ name: "spender",
190
+ type: "address"
191
+ },
192
+ {
193
+ internalType: "uint256",
194
+ name: "amount",
195
+ type: "uint256"
196
+ }
197
+ ],
198
+ name: "approve",
199
+ outputs: [
200
+ {
201
+ internalType: "bool",
202
+ name: "",
203
+ type: "bool"
204
+ }
205
+ ],
206
+ stateMutability: "nonpayable",
207
+ type: "function"
208
+ },
209
+ {
210
+ inputs: [
211
+ {
212
+ internalType: "address",
213
+ name: "account",
214
+ type: "address"
215
+ }
216
+ ],
217
+ name: "balanceOf",
218
+ outputs: [
219
+ {
220
+ internalType: "uint256",
221
+ name: "",
222
+ type: "uint256"
223
+ }
224
+ ],
225
+ stateMutability: "view",
226
+ type: "function"
227
+ },
228
+ {
229
+ inputs: [],
230
+ name: "decimals",
231
+ outputs: [
232
+ {
233
+ internalType: "uint8",
234
+ name: "",
235
+ type: "uint8"
236
+ }
237
+ ],
238
+ stateMutability: "view",
239
+ type: "function"
240
+ },
241
+ {
242
+ inputs: [
243
+ {
244
+ internalType: "address",
245
+ name: "spender",
246
+ type: "address"
247
+ },
248
+ {
249
+ internalType: "uint256",
250
+ name: "subtractedValue",
251
+ type: "uint256"
252
+ }
253
+ ],
254
+ name: "decreaseAllowance",
255
+ outputs: [
256
+ {
257
+ internalType: "bool",
258
+ name: "",
259
+ type: "bool"
260
+ }
261
+ ],
262
+ stateMutability: "nonpayable",
263
+ type: "function"
264
+ },
265
+ {
266
+ inputs: [
267
+ {
268
+ internalType: "address",
269
+ name: "spender",
270
+ type: "address"
271
+ },
272
+ {
273
+ internalType: "uint256",
274
+ name: "addedValue",
275
+ type: "uint256"
276
+ }
277
+ ],
278
+ name: "increaseAllowance",
279
+ outputs: [
280
+ {
281
+ internalType: "bool",
282
+ name: "",
283
+ type: "bool"
284
+ }
285
+ ],
286
+ stateMutability: "nonpayable",
287
+ type: "function"
288
+ },
289
+ {
290
+ inputs: [],
291
+ name: "name",
292
+ outputs: [
293
+ {
294
+ internalType: "string",
295
+ name: "",
296
+ type: "string"
297
+ }
298
+ ],
299
+ stateMutability: "view",
300
+ type: "function"
301
+ },
302
+ {
303
+ inputs: [],
304
+ name: "symbol",
305
+ outputs: [
306
+ {
307
+ internalType: "string",
308
+ name: "",
309
+ type: "string"
310
+ }
311
+ ],
312
+ stateMutability: "view",
313
+ type: "function"
314
+ },
315
+ {
316
+ inputs: [],
317
+ name: "totalSupply",
318
+ outputs: [
319
+ {
320
+ internalType: "uint256",
321
+ name: "",
322
+ type: "uint256"
323
+ }
324
+ ],
325
+ stateMutability: "view",
326
+ type: "function"
327
+ },
328
+ {
329
+ inputs: [
330
+ {
331
+ internalType: "address",
332
+ name: "recipient",
333
+ type: "address"
334
+ },
335
+ {
336
+ internalType: "uint256",
337
+ name: "amount",
338
+ type: "uint256"
339
+ }
340
+ ],
341
+ name: "transfer",
342
+ outputs: [
343
+ {
344
+ internalType: "bool",
345
+ name: "",
346
+ type: "bool"
347
+ }
348
+ ],
349
+ stateMutability: "nonpayable",
350
+ type: "function"
351
+ },
352
+ {
353
+ inputs: [
354
+ {
355
+ internalType: "address",
356
+ name: "sender",
357
+ type: "address"
358
+ },
359
+ {
360
+ internalType: "address",
361
+ name: "recipient",
362
+ type: "address"
363
+ },
364
+ {
365
+ internalType: "uint256",
366
+ name: "amount",
367
+ type: "uint256"
368
+ }
369
+ ],
370
+ name: "transferFrom",
371
+ outputs: [
372
+ {
373
+ internalType: "bool",
374
+ name: "",
375
+ type: "bool"
376
+ }
377
+ ],
378
+ stateMutability: "nonpayable",
379
+ type: "function"
380
+ }
381
+ ], Nt = /* @__PURE__ */ JSON.parse('[{"type":"constructor","inputs":[{"name":"_repermit","type":"address","internalType":"address"},{"name":"_cosigner","type":"address","internalType":"address"},{"name":"_wm","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"receive","stateMutability":"payable"},{"type":"function","name":"cosigner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"epochs","inputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"executeWithCallback","inputs":[{"name":"co","type":"tuple","internalType":"struct CosignedOrder","components":[{"name":"order","type":"tuple","internalType":"struct Order","components":[{"name":"reactor","type":"address","internalType":"address"},{"name":"executor","type":"address","internalType":"address"},{"name":"exchange","type":"tuple","internalType":"struct Exchange","components":[{"name":"adapter","type":"address","internalType":"address"},{"name":"ref","type":"address","internalType":"address"},{"name":"share","type":"uint32","internalType":"uint32"},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"swapper","type":"address","internalType":"address"},{"name":"nonce","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"chainid","type":"uint256","internalType":"uint256"},{"name":"exclusivity","type":"uint32","internalType":"uint32"},{"name":"epoch","type":"uint32","internalType":"uint32"},{"name":"slippage","type":"uint32","internalType":"uint32"},{"name":"freshness","type":"uint32","internalType":"uint32"},{"name":"input","type":"tuple","internalType":"struct Input","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"maxAmount","type":"uint256","internalType":"uint256"}]},{"name":"output","type":"tuple","internalType":"struct Output","components":[{"name":"token","type":"address","internalType":"address"},{"name":"limit","type":"uint256","internalType":"uint256"},{"name":"stop","type":"uint256","internalType":"uint256"},{"name":"recipient","type":"address","internalType":"address"}]}]},{"name":"signature","type":"bytes","internalType":"bytes"},{"name":"cosignatureData","type":"tuple","internalType":"struct Cosignature","components":[{"name":"cosigner","type":"address","internalType":"address"},{"name":"reactor","type":"address","internalType":"address"},{"name":"chainid","type":"uint256","internalType":"uint256"},{"name":"timestamp","type":"uint256","internalType":"uint256"},{"name":"input","type":"tuple","internalType":"struct CosignedValue","components":[{"name":"token","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"decimals","type":"uint8","internalType":"uint8"}]},{"name":"output","type":"tuple","internalType":"struct CosignedValue","components":[{"name":"token","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"decimals","type":"uint8","internalType":"uint8"}]}]},{"name":"cosignature","type":"bytes","internalType":"bytes"}]},{"name":"x","type":"tuple","internalType":"struct Execution","components":[{"name":"minAmountOut","type":"uint256","internalType":"uint256"},{"name":"fee","type":"tuple","internalType":"struct Output","components":[{"name":"token","type":"address","internalType":"address"},{"name":"limit","type":"uint256","internalType":"uint256"},{"name":"stop","type":"uint256","internalType":"uint256"},{"name":"recipient","type":"address","internalType":"address"}]},{"name":"data","type":"bytes","internalType":"bytes"}]}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"pause","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"paused","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"repermit","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"unpause","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"wm","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"event","name":"Fill","inputs":[{"name":"hash","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"executor","type":"address","indexed":true,"internalType":"address"},{"name":"swapper","type":"address","indexed":true,"internalType":"address"},{"name":"epoch","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"name":"account","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"name":"account","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"CosignedExceedsStop","inputs":[]},{"type":"error","name":"EnforcedPause","inputs":[]},{"type":"error","name":"ExpectedPause","inputs":[]},{"type":"error","name":"FailedCall","inputs":[]},{"type":"error","name":"FutureCosignatureTimestamp","inputs":[]},{"type":"error","name":"InsufficientBalance","inputs":[{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidCosignature","inputs":[]},{"type":"error","name":"InvalidCosignatureChainid","inputs":[]},{"type":"error","name":"InvalidCosignatureCosigner","inputs":[]},{"type":"error","name":"InvalidCosignatureInputToken","inputs":[]},{"type":"error","name":"InvalidCosignatureOutputToken","inputs":[]},{"type":"error","name":"InvalidCosignatureReactor","inputs":[]},{"type":"error","name":"InvalidCosignatureZeroInputValue","inputs":[]},{"type":"error","name":"InvalidCosignatureZeroOutputValue","inputs":[]},{"type":"error","name":"InvalidEpoch","inputs":[]},{"type":"error","name":"InvalidFreshness","inputs":[]},{"type":"error","name":"InvalidFreshnessVsEpoch","inputs":[]},{"type":"error","name":"InvalidOrderAdapterZero","inputs":[]},{"type":"error","name":"InvalidOrderChainid","inputs":[]},{"type":"error","name":"InvalidOrderDeadlineExpired","inputs":[]},{"type":"error","name":"InvalidOrderExchangeShareBps","inputs":[]},{"type":"error","name":"InvalidOrderExecutorZero","inputs":[]},{"type":"error","name":"InvalidOrderInputAmountGtMax","inputs":[]},{"type":"error","name":"InvalidOrderInputAmountZero","inputs":[]},{"type":"error","name":"InvalidOrderInputTokenZero","inputs":[]},{"type":"error","name":"InvalidOrderOutputLimitGtStop","inputs":[]},{"type":"error","name":"InvalidOrderOutputRecipientZero","inputs":[]},{"type":"error","name":"InvalidOrderReactorMismatch","inputs":[]},{"type":"error","name":"InvalidOrderReactorZero","inputs":[]},{"type":"error","name":"InvalidOrderSameToken","inputs":[]},{"type":"error","name":"InvalidOrderSlippageTooHigh","inputs":[]},{"type":"error","name":"InvalidOrderSwapperZero","inputs":[]},{"type":"error","name":"InvalidSender","inputs":[]},{"type":"error","name":"NotAllowed","inputs":[]},{"type":"error","name":"ReentrancyGuardReentrantCall","inputs":[]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"StaleCosignature","inputs":[]}]'), Ut = /* @__PURE__ */ JSON.parse('[{"type":"constructor","inputs":[{"name":"_reactor","type":"address","internalType":"address"},{"name":"_allowed","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"receive","stateMutability":"payable"},{"type":"function","name":"execute","inputs":[{"name":"co","type":"tuple","internalType":"struct CosignedOrder","components":[{"name":"order","type":"tuple","internalType":"struct Order","components":[{"name":"reactor","type":"address","internalType":"address"},{"name":"executor","type":"address","internalType":"address"},{"name":"exchange","type":"tuple","internalType":"struct Exchange","components":[{"name":"adapter","type":"address","internalType":"address"},{"name":"ref","type":"address","internalType":"address"},{"name":"share","type":"uint32","internalType":"uint32"},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"swapper","type":"address","internalType":"address"},{"name":"nonce","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"chainid","type":"uint256","internalType":"uint256"},{"name":"exclusivity","type":"uint32","internalType":"uint32"},{"name":"epoch","type":"uint32","internalType":"uint32"},{"name":"slippage","type":"uint32","internalType":"uint32"},{"name":"freshness","type":"uint32","internalType":"uint32"},{"name":"input","type":"tuple","internalType":"struct Input","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"maxAmount","type":"uint256","internalType":"uint256"}]},{"name":"output","type":"tuple","internalType":"struct Output","components":[{"name":"token","type":"address","internalType":"address"},{"name":"limit","type":"uint256","internalType":"uint256"},{"name":"stop","type":"uint256","internalType":"uint256"},{"name":"recipient","type":"address","internalType":"address"}]}]},{"name":"signature","type":"bytes","internalType":"bytes"},{"name":"cosignatureData","type":"tuple","internalType":"struct Cosignature","components":[{"name":"cosigner","type":"address","internalType":"address"},{"name":"reactor","type":"address","internalType":"address"},{"name":"chainid","type":"uint256","internalType":"uint256"},{"name":"timestamp","type":"uint256","internalType":"uint256"},{"name":"input","type":"tuple","internalType":"struct CosignedValue","components":[{"name":"token","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"decimals","type":"uint8","internalType":"uint8"}]},{"name":"output","type":"tuple","internalType":"struct CosignedValue","components":[{"name":"token","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"decimals","type":"uint8","internalType":"uint8"}]}]},{"name":"cosignature","type":"bytes","internalType":"bytes"}]},{"name":"x","type":"tuple","internalType":"struct Execution","components":[{"name":"minAmountOut","type":"uint256","internalType":"uint256"},{"name":"fee","type":"tuple","internalType":"struct Output","components":[{"name":"token","type":"address","internalType":"address"},{"name":"limit","type":"uint256","internalType":"uint256"},{"name":"stop","type":"uint256","internalType":"uint256"},{"name":"recipient","type":"address","internalType":"address"}]},{"name":"data","type":"bytes","internalType":"bytes"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"reactor","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"reactorCallback","inputs":[{"name":"hash","type":"bytes32","internalType":"bytes32"},{"name":"resolvedAmountOut","type":"uint256","internalType":"uint256"},{"name":"co","type":"tuple","internalType":"struct CosignedOrder","components":[{"name":"order","type":"tuple","internalType":"struct Order","components":[{"name":"reactor","type":"address","internalType":"address"},{"name":"executor","type":"address","internalType":"address"},{"name":"exchange","type":"tuple","internalType":"struct Exchange","components":[{"name":"adapter","type":"address","internalType":"address"},{"name":"ref","type":"address","internalType":"address"},{"name":"share","type":"uint32","internalType":"uint32"},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"swapper","type":"address","internalType":"address"},{"name":"nonce","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"chainid","type":"uint256","internalType":"uint256"},{"name":"exclusivity","type":"uint32","internalType":"uint32"},{"name":"epoch","type":"uint32","internalType":"uint32"},{"name":"slippage","type":"uint32","internalType":"uint32"},{"name":"freshness","type":"uint32","internalType":"uint32"},{"name":"input","type":"tuple","internalType":"struct Input","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"maxAmount","type":"uint256","internalType":"uint256"}]},{"name":"output","type":"tuple","internalType":"struct Output","components":[{"name":"token","type":"address","internalType":"address"},{"name":"limit","type":"uint256","internalType":"uint256"},{"name":"stop","type":"uint256","internalType":"uint256"},{"name":"recipient","type":"address","internalType":"address"}]}]},{"name":"signature","type":"bytes","internalType":"bytes"},{"name":"cosignatureData","type":"tuple","internalType":"struct Cosignature","components":[{"name":"cosigner","type":"address","internalType":"address"},{"name":"reactor","type":"address","internalType":"address"},{"name":"chainid","type":"uint256","internalType":"uint256"},{"name":"timestamp","type":"uint256","internalType":"uint256"},{"name":"input","type":"tuple","internalType":"struct CosignedValue","components":[{"name":"token","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"decimals","type":"uint8","internalType":"uint8"}]},{"name":"output","type":"tuple","internalType":"struct CosignedValue","components":[{"name":"token","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"decimals","type":"uint8","internalType":"uint8"}]}]},{"name":"cosignature","type":"bytes","internalType":"bytes"}]},{"name":"x","type":"tuple","internalType":"struct Execution","components":[{"name":"minAmountOut","type":"uint256","internalType":"uint256"},{"name":"fee","type":"tuple","internalType":"struct Output","components":[{"name":"token","type":"address","internalType":"address"},{"name":"limit","type":"uint256","internalType":"uint256"},{"name":"stop","type":"uint256","internalType":"uint256"},{"name":"recipient","type":"address","internalType":"address"}]},{"name":"data","type":"bytes","internalType":"bytes"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"wm","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"event","name":"Settled","inputs":[{"name":"orderHash","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"swapper","type":"address","indexed":true,"internalType":"address"},{"name":"exchange","type":"address","indexed":true,"internalType":"address"},{"name":"inToken","type":"address","indexed":false,"internalType":"address"},{"name":"outToken","type":"address","indexed":false,"internalType":"address"},{"name":"inAmount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"outAmount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"minOut","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Surplus","inputs":[{"name":"ref","type":"address","indexed":true,"internalType":"address"},{"name":"swapper","type":"address","indexed":false,"internalType":"address"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"refshare","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"AddressEmptyCode","inputs":[{"name":"target","type":"address","internalType":"address"}]},{"type":"error","name":"FailedCall","inputs":[]},{"type":"error","name":"InsufficientBalance","inputs":[{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidOrder","inputs":[]},{"type":"error","name":"InvalidSender","inputs":[]},{"type":"error","name":"NotAllowed","inputs":[]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]}]'), Lt = [
382
+ {
383
+ type: "constructor",
384
+ inputs: [],
385
+ stateMutability: "nonpayable"
386
+ },
387
+ {
388
+ type: "function",
389
+ name: "DOMAIN_SEPARATOR",
390
+ inputs: [],
391
+ outputs: [
392
+ {
393
+ name: "",
394
+ type: "bytes32",
395
+ internalType: "bytes32"
396
+ }
397
+ ],
398
+ stateMutability: "view"
399
+ },
400
+ {
401
+ type: "function",
402
+ name: "cancel",
403
+ inputs: [
404
+ {
405
+ name: "digests",
406
+ type: "bytes32[]",
407
+ internalType: "bytes32[]"
408
+ }
409
+ ],
410
+ outputs: [],
411
+ stateMutability: "nonpayable"
412
+ },
413
+ {
414
+ type: "function",
415
+ name: "eip712Domain",
416
+ inputs: [],
417
+ outputs: [
418
+ {
419
+ name: "fields",
420
+ type: "bytes1",
421
+ internalType: "bytes1"
422
+ },
423
+ {
424
+ name: "name",
425
+ type: "string",
426
+ internalType: "string"
427
+ },
428
+ {
429
+ name: "version",
430
+ type: "string",
431
+ internalType: "string"
432
+ },
433
+ {
434
+ name: "chainId",
435
+ type: "uint256",
436
+ internalType: "uint256"
437
+ },
438
+ {
439
+ name: "verifyingContract",
440
+ type: "address",
441
+ internalType: "address"
442
+ },
443
+ {
444
+ name: "salt",
445
+ type: "bytes32",
446
+ internalType: "bytes32"
447
+ },
448
+ {
449
+ name: "extensions",
450
+ type: "uint256[]",
451
+ internalType: "uint256[]"
452
+ }
453
+ ],
454
+ stateMutability: "view"
455
+ },
456
+ {
457
+ type: "function",
458
+ name: "hashTypedData",
459
+ inputs: [
460
+ {
461
+ name: "structHash",
462
+ type: "bytes32",
463
+ internalType: "bytes32"
464
+ }
465
+ ],
466
+ outputs: [
467
+ {
468
+ name: "digest",
469
+ type: "bytes32",
470
+ internalType: "bytes32"
471
+ }
472
+ ],
473
+ stateMutability: "view"
474
+ },
475
+ {
476
+ type: "function",
477
+ name: "repermitWitnessTransferFrom",
478
+ inputs: [
479
+ {
480
+ name: "permit",
481
+ type: "tuple",
482
+ internalType: "struct RePermitLib.RePermitTransferFrom",
483
+ components: [
484
+ {
485
+ name: "permitted",
486
+ type: "tuple",
487
+ internalType: "struct RePermitLib.TokenPermissions",
488
+ components: [
489
+ {
490
+ name: "token",
491
+ type: "address",
492
+ internalType: "address"
493
+ },
494
+ {
495
+ name: "amount",
496
+ type: "uint256",
497
+ internalType: "uint256"
498
+ }
499
+ ]
500
+ },
501
+ {
502
+ name: "nonce",
503
+ type: "uint256",
504
+ internalType: "uint256"
505
+ },
506
+ {
507
+ name: "deadline",
508
+ type: "uint256",
509
+ internalType: "uint256"
510
+ }
511
+ ]
512
+ },
513
+ {
514
+ name: "request",
515
+ type: "tuple",
516
+ internalType: "struct RePermitLib.TransferRequest",
517
+ components: [
518
+ {
519
+ name: "to",
520
+ type: "address",
521
+ internalType: "address"
522
+ },
523
+ {
524
+ name: "amount",
525
+ type: "uint256",
526
+ internalType: "uint256"
527
+ }
528
+ ]
529
+ },
530
+ {
531
+ name: "signer",
532
+ type: "address",
533
+ internalType: "address"
534
+ },
535
+ {
536
+ name: "witness",
537
+ type: "bytes32",
538
+ internalType: "bytes32"
539
+ },
540
+ {
541
+ name: "witnessTypeString",
542
+ type: "string",
543
+ internalType: "string"
544
+ },
545
+ {
546
+ name: "signature",
547
+ type: "bytes",
548
+ internalType: "bytes"
549
+ }
550
+ ],
551
+ outputs: [],
552
+ stateMutability: "nonpayable"
553
+ },
554
+ {
555
+ type: "function",
556
+ name: "spent",
557
+ inputs: [
558
+ {
559
+ name: "",
560
+ type: "address",
561
+ internalType: "address"
562
+ },
563
+ {
564
+ name: "",
565
+ type: "bytes32",
566
+ internalType: "bytes32"
567
+ }
568
+ ],
569
+ outputs: [
570
+ {
571
+ name: "",
572
+ type: "uint256",
573
+ internalType: "uint256"
574
+ }
575
+ ],
576
+ stateMutability: "view"
577
+ },
578
+ {
579
+ type: "event",
580
+ name: "Cancel",
581
+ inputs: [
582
+ {
583
+ name: "signer",
584
+ type: "address",
585
+ indexed: !0,
586
+ internalType: "address"
587
+ },
588
+ {
589
+ name: "digest",
590
+ type: "bytes32",
591
+ indexed: !1,
592
+ internalType: "bytes32"
593
+ }
594
+ ],
595
+ anonymous: !1
596
+ },
597
+ {
598
+ type: "event",
599
+ name: "EIP712DomainChanged",
600
+ inputs: [],
601
+ anonymous: !1
602
+ },
603
+ {
604
+ type: "event",
605
+ name: "Spend",
606
+ inputs: [
607
+ {
608
+ name: "signer",
609
+ type: "address",
610
+ indexed: !0,
611
+ internalType: "address"
612
+ },
613
+ {
614
+ name: "permitHash",
615
+ type: "bytes32",
616
+ indexed: !0,
617
+ internalType: "bytes32"
618
+ },
619
+ {
620
+ name: "token",
621
+ type: "address",
622
+ indexed: !0,
623
+ internalType: "address"
624
+ },
625
+ {
626
+ name: "to",
627
+ type: "address",
628
+ indexed: !1,
629
+ internalType: "address"
630
+ },
631
+ {
632
+ name: "amount",
633
+ type: "uint256",
634
+ indexed: !1,
635
+ internalType: "uint256"
636
+ },
637
+ {
638
+ name: "totalSpent",
639
+ type: "uint256",
640
+ indexed: !1,
641
+ internalType: "uint256"
642
+ }
643
+ ],
644
+ anonymous: !1
645
+ },
646
+ {
647
+ type: "error",
648
+ name: "Canceled",
649
+ inputs: []
650
+ },
651
+ {
652
+ type: "error",
653
+ name: "Expired",
654
+ inputs: []
655
+ },
656
+ {
657
+ type: "error",
658
+ name: "InsufficientAllowance",
659
+ inputs: []
660
+ },
661
+ {
662
+ type: "error",
663
+ name: "InvalidShortString",
664
+ inputs: []
665
+ },
666
+ {
667
+ type: "error",
668
+ name: "InvalidSignature",
669
+ inputs: []
670
+ },
671
+ {
672
+ type: "error",
673
+ name: "SafeERC20FailedOperation",
674
+ inputs: [
675
+ {
676
+ name: "token",
677
+ type: "address",
678
+ internalType: "address"
679
+ }
680
+ ]
681
+ },
682
+ {
683
+ type: "error",
684
+ name: "StringTooLong",
685
+ inputs: [
686
+ {
687
+ name: "str",
688
+ type: "string",
689
+ internalType: "string"
690
+ }
691
+ ]
692
+ }
693
+ ], Vt = /* @__PURE__ */ JSON.parse('[{"inputs":[{"internalType":"address","name":"_iweth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"uint32","name":"slippagePercent","type":"uint32"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"name":"OrderBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"OrderCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"address","name":"taker","type":"address"}],"name":"OrderCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"}],"name":"OrderCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"address","name":"taker","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcAmountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstAmountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"srcFilledAmount","type":"uint256"}],"name":"OrderFilled","type":"event"},{"inputs":[],"name":"MIN_BID_DELAY_SECONDS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_OUTBID_PERCENT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERCENT_BASE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STALE_BID_SECONDS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_CANCELED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_COMPLETED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"_ask","type":"tuple"}],"name":"ask","outputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"uint32","name":"slippagePercent","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"bid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"book","outputs":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"fill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"iweth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"length","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"makerOrders","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"order","outputs":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"internalType":"struct OrderLib.Order","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maker","type":"address"}],"name":"orderIdsByMaker","outputs":[{"internalType":"uint64[]","name":"","type":"uint64[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"prune","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"status","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]'), Wt = /* @__PURE__ */ JSON.parse('[{"inputs":[{"internalType":"contract TWAP","name":"_twap","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"uint256","name":"srcBidAmountNext","type":"uint256"}],"name":"hasAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"uint256","name":"srcBidAmountNext","type":"uint256"}],"name":"hasBalance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"length","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maker","type":"address"}],"name":"makerOrders","outputs":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"internalType":"struct OrderLib.Order[]","name":"result","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint64","name":"lastIndex","type":"uint64"},{"internalType":"uint64","name":"pageSize","type":"uint64"}],"name":"takerBiddableOrders","outputs":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"internalType":"struct OrderLib.Order[]","name":"result","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint64","name":"lastIndex","type":"uint64"},{"internalType":"uint64","name":"pageSize","type":"uint64"}],"name":"takerFillableOrders","outputs":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"internalType":"struct OrderLib.Order[]","name":"result","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"twap","outputs":[{"internalType":"contract TWAP","name":"","type":"address"}],"stateMutability":"view","type":"function"}]'), vn = Nt, In = Ut, _n = Lt, Pn = Rt, Rn = Mt, Mn = Vt, Nn = Wt;
694
+ var q = /* @__PURE__ */ ((e) => (e.TWAP = "TWAP", e.LIMIT = "LIMIT", e.STOP_LOSS = "STOP_LOSS", e.TAKE_PROFIT = "TAKE_PROFIT", e))(q || {}), se = /* @__PURE__ */ ((e) => (e.Open = "OPEN", e.Canceled = "CANCELED", e.Completed = "COMPLETED", e.Expired = "EXPIRED", e))(se || {}), ne = /* @__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))(ne || {}), j = /* @__PURE__ */ ((e) => (e.LIMIT = "limit", e.TWAP_LIMIT = "twap-limit", e.TWAP_MARKET = "twap-market", e.TRIGGER_PRICE_MARKET = "trigger-price-market", e.TRIGGER_PRICE_LIMIT = "trigger-price-limit", e))(j || {}), le = /* @__PURE__ */ ((e) => (e.THENA = "thena", e.PANCAKESWAP = "pancake", e.QUICKSWAP = "quick", e.SWAPX = "swapx", e.DRAGONSWAP = "dragonswap", e.SPOOKYSWAP = "spooky", e.LYNEX = "lynex", e.BLACKHOLE = "blackhole", e.OMNI = "omni", e.SUSHISWAP = "sushiswap", e.NAMI = "nami", e.YOWIE = "yowie", e))(le || {});
695
+ const L = "0x0000000000000000000000000000000000000000", U = {
696
+ eth: {
697
+ id: 1,
698
+ name: "Ethereum",
699
+ shortname: "eth",
700
+ native: {
701
+ address: L,
702
+ symbol: "ETH",
703
+ decimals: 18,
704
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
705
+ },
706
+ wToken: {
707
+ symbol: "WETH",
708
+ address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
709
+ decimals: 18,
710
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
711
+ },
712
+ publicRpcUrl: "https://eth.llamarpc.com",
713
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg",
714
+ explorer: "https://etherscan.io",
715
+ eip1559: !0
716
+ },
717
+ bsc: {
718
+ id: 56,
719
+ name: "BinanceSmartChain",
720
+ shortname: "bsc",
721
+ native: {
722
+ address: L,
723
+ symbol: "BNB",
724
+ decimals: 18,
725
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"
726
+ },
727
+ wToken: {
728
+ symbol: "WBNB",
729
+ address: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
730
+ decimals: 18,
731
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"
732
+ },
733
+ publicRpcUrl: "https://bsc-dataseed.binance.org",
734
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/bsc_2.svg",
735
+ explorer: "https://bscscan.com",
736
+ eip1559: !1
737
+ },
738
+ poly: {
739
+ id: 137,
740
+ name: "Polygon",
741
+ shortname: "poly",
742
+ native: {
743
+ address: L,
744
+ symbol: "POL",
745
+ decimals: 18,
746
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/64x64/28321.png"
747
+ },
748
+ wToken: {
749
+ symbol: "WPOL",
750
+ address: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
751
+ decimals: 18,
752
+ logoUrl: "https://tokens-data.1inch.io/images/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270.png"
753
+ },
754
+ publicRpcUrl: "https://polygon-rpc.com",
755
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/polygon.svg",
756
+ explorer: "https://polygonscan.com",
757
+ eip1559: !0
758
+ },
759
+ arb: {
760
+ id: 42161,
761
+ name: "Arbitrum",
762
+ shortname: "arb",
763
+ native: {
764
+ address: L,
765
+ symbol: "ETH",
766
+ decimals: 18,
767
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
768
+ },
769
+ wToken: {
770
+ symbol: "WETH",
771
+ address: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
772
+ decimals: 18,
773
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
774
+ },
775
+ publicRpcUrl: "https://arb1.arbitrum.io/rpc",
776
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/arbitrum.svg",
777
+ explorer: "https://arbiscan.io",
778
+ eip1559: !0
779
+ },
780
+ sei: {
781
+ id: 1329,
782
+ name: "Sei",
783
+ shortname: "sei",
784
+ native: {
785
+ address: L,
786
+ symbol: "SEI",
787
+ decimals: 18,
788
+ logoUrl: "https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png"
789
+ },
790
+ wToken: {
791
+ symbol: "WSEI",
792
+ address: "0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7",
793
+ decimals: 18,
794
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
795
+ },
796
+ publicRpcUrl: "https://evm-rpc.sei-apis.com",
797
+ logoUrl: "https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png",
798
+ explorer: "https://seitrace.com",
799
+ eip1559: !1
800
+ },
801
+ avax: {
802
+ id: 43114,
803
+ name: "Avalanche",
804
+ shortname: "avax",
805
+ native: {
806
+ address: L,
807
+ symbol: "AVAX",
808
+ decimals: 18,
809
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/avalanche.svg"
810
+ },
811
+ wToken: {
812
+ symbol: "WAVAX",
813
+ address: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",
814
+ decimals: 18,
815
+ logoUrl: "https://tokens-data.1inch.io/images/0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7.png"
816
+ },
817
+ publicRpcUrl: "https://api.avax.network/ext/bc/C/rpc",
818
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/avalanche.svg",
819
+ explorer: "https://snowtrace.io",
820
+ eip1559: !0
821
+ },
822
+ ftm: {
823
+ id: 250,
824
+ name: "Fantom",
825
+ shortname: "ftm",
826
+ native: {
827
+ address: L,
828
+ symbol: "FTM",
829
+ decimals: 18,
830
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/fantom.svg"
831
+ },
832
+ wToken: {
833
+ symbol: "WFTM",
834
+ address: "0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",
835
+ decimals: 18,
836
+ logoUrl: "https://tokens-data.1inch.io/images/0x4e15361fd6b4bb609fa63c81a2be19d873717870.png"
837
+ },
838
+ publicRpcUrl: "https://rpc.ftm.tools",
839
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/fantom.svg",
840
+ explorer: "https://ftmscan.com",
841
+ eip1559: !0
842
+ },
843
+ base: {
844
+ id: 8453,
845
+ name: "Base",
846
+ shortname: "base",
847
+ native: {
848
+ address: L,
849
+ symbol: "ETH",
850
+ decimals: 18,
851
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
852
+ },
853
+ wToken: {
854
+ symbol: "WETH",
855
+ address: "0x4200000000000000000000000000000000000006",
856
+ decimals: 18,
857
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
858
+ },
859
+ publicRpcUrl: "https://mainnet.base.org",
860
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/base.svg",
861
+ explorer: "https://basescan.org",
862
+ eip1559: !1
863
+ },
864
+ linea: {
865
+ id: 59144,
866
+ name: "Linea",
867
+ shortname: "linea",
868
+ native: {
869
+ address: L,
870
+ symbol: "ETH",
871
+ decimals: 18,
872
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
873
+ },
874
+ wToken: {
875
+ symbol: "WETH",
876
+ address: "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",
877
+ decimals: 18,
878
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
879
+ },
880
+ publicRpcUrl: "https://rpc.linea.build",
881
+ logoUrl: "https://lineascan.build/images/logo.svg",
882
+ explorer: "https://lineascan.build",
883
+ eip1559: !1
884
+ },
885
+ zksync: {
886
+ id: 324,
887
+ name: "zksync",
888
+ shortname: "zksync",
889
+ native: {
890
+ address: L,
891
+ symbol: "ETH",
892
+ decimals: 18,
893
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
894
+ },
895
+ wToken: {
896
+ symbol: "WETH",
897
+ address: "0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",
898
+ decimals: 18,
899
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
900
+ },
901
+ publicRpcUrl: "https://mainnet.era.zksync.io",
902
+ logoUrl: "https://raw.githubusercontent.com/matter-labs/zksync/0a4ca2145a0c95b5bafa84c2f095c644907a8825/zkSyncLogo.svg",
903
+ explorer: "https://explorer.zksync.io/",
904
+ eip1559: !0
905
+ },
906
+ zkevm: {
907
+ id: 1101,
908
+ name: "zkevm",
909
+ shortname: "zkevm",
910
+ native: {
911
+ address: L,
912
+ symbol: "ETH",
913
+ decimals: 18,
914
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
915
+ },
916
+ wToken: {
917
+ symbol: "WETH",
918
+ address: "0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",
919
+ decimals: 18,
920
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
921
+ },
922
+ publicRpcUrl: "https://zkevm-rpc.com",
923
+ logoUrl: "https://user-images.githubusercontent.com/18598517/235932702-bc47eae5-d672-4dd9-9da2-8ea8f51a93f3.png",
924
+ explorer: "https://zkevm.polygonscan.com/",
925
+ eip1559: !0
926
+ },
927
+ manta: {
928
+ id: 169,
929
+ name: "manta",
930
+ shortname: "manta",
931
+ native: {
932
+ address: L,
933
+ symbol: "ETH",
934
+ decimals: 18,
935
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_manta.jpg"
936
+ },
937
+ wToken: {
938
+ symbol: "WETH",
939
+ address: "0x0Dc808adcE2099A9F62AA87D9670745AbA741746",
940
+ decimals: 18,
941
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
942
+ },
943
+ publicRpcUrl: "https://pacific-rpc.manta.network/http",
944
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_manta.jpg",
945
+ explorer: "https://manta.socialscan.io/",
946
+ eip1559: !0
947
+ },
948
+ blast: {
949
+ id: 81457,
950
+ name: "blast",
951
+ shortname: "blast",
952
+ native: {
953
+ address: L,
954
+ symbol: "ETH",
955
+ decimals: 18,
956
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_blast"
957
+ },
958
+ wToken: {
959
+ symbol: "WETH",
960
+ address: "0x4300000000000000000000000000000000000004",
961
+ decimals: 18,
962
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
963
+ },
964
+ publicRpcUrl: "https://rpc.ankr.com/blast",
965
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_blast",
966
+ explorer: "https://blastscan.io/",
967
+ eip1559: !0
968
+ },
969
+ sonic: {
970
+ id: 146,
971
+ name: "sonic",
972
+ shortname: "sonic",
973
+ native: {
974
+ address: L,
975
+ symbol: "S",
976
+ decimals: 18,
977
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_sonic"
978
+ },
979
+ wToken: {
980
+ symbol: "WS",
981
+ address: "0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38",
982
+ decimals: 18,
983
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_sonic"
984
+ },
985
+ publicRpcUrl: "https://rpc.soniclabs.com",
986
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_sonic",
987
+ explorer: "https://www.sonicscan.org/",
988
+ eip1559: !0
989
+ },
990
+ scroll: {
991
+ id: 534352,
992
+ name: "scroll",
993
+ shortname: "scroll",
994
+ native: {
995
+ address: L,
996
+ symbol: "ETH",
997
+ decimals: 18,
998
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_scroll"
999
+ },
1000
+ wToken: {
1001
+ symbol: "WETH",
1002
+ address: "0x5300000000000000000000000000000000000004",
1003
+ decimals: 18,
1004
+ logoUrl: "https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
1005
+ },
1006
+ publicRpcUrl: "https://scroll-rpc.publicnode.com",
1007
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_scroll",
1008
+ explorer: "https://scrollscan.com/",
1009
+ eip1559: !0
1010
+ },
1011
+ zircuit: {
1012
+ id: 48900,
1013
+ name: "Zircuit",
1014
+ shortname: "zircuit",
1015
+ native: {
1016
+ address: L,
1017
+ symbol: "ETH",
1018
+ decimals: 18,
1019
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
1020
+ },
1021
+ wToken: {
1022
+ symbol: "WETH",
1023
+ address: "0x4200000000000000000000000000000000000006",
1024
+ decimals: 18,
1025
+ logoUrl: "hhttps://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
1026
+ },
1027
+ publicRpcUrl: "https://zircuit-mainnet.drpc.org",
1028
+ logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg",
1029
+ explorer: "https://explorer.zircuit.com/",
1030
+ eip1559: !0
1031
+ },
1032
+ flare: {
1033
+ id: 14,
1034
+ name: "flare",
1035
+ shortname: "flare",
1036
+ native: {
1037
+ address: L,
1038
+ symbol: "FLR",
1039
+ decimals: 18,
1040
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48"
1041
+ },
1042
+ wToken: {
1043
+ symbol: "WFLR",
1044
+ address: "0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d",
1045
+ decimals: 18,
1046
+ logoUrl: "https://res.cloudinary.com/sparkdex/image/upload/q_100/v1/website-assets/coins/wflr?_a=DATAg1AAZAA0"
1047
+ },
1048
+ publicRpcUrl: "https://flare.network",
1049
+ logoUrl: "https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48",
1050
+ explorer: "https://flarescan.com",
1051
+ eip1559: !0
1052
+ },
1053
+ cronosZkEvm: {
1054
+ id: 388,
1055
+ name: "Cronos zkEVM",
1056
+ shortname: "cronosZkEvm",
1057
+ native: {
1058
+ address: "0x000000000000000000000000000000000000800a",
1059
+ symbol: "zkCRO",
1060
+ decimals: 18,
1061
+ logoUrl: "https://cryptologos.cc/logos/cronos-cro-logo.png"
1062
+ // Replace with the official logo URL if available
1063
+ },
1064
+ wToken: {
1065
+ symbol: "wzkCRO",
1066
+ address: "0xC1bF55EE54E16229d9b369a5502Bfe5fC9F20b6d",
1067
+ decimals: 18,
1068
+ logoUrl: "https://cryptologos.cc/logos/cronos-cro-logo.png"
1069
+ // Replace with the official logo URL if available
1070
+ },
1071
+ publicRpcUrl: "https://rpc.zkevm.cronos.org",
1072
+ logoUrl: "https://cryptologos.cc/logos/cronos-cro-logo.png",
1073
+ // Replace with the official logo URL if available
1074
+ explorer: "https://explorer.zkevm.cronos.org",
1075
+ eip1559: !0
1076
+ },
1077
+ katana: {
1078
+ id: 747474,
1079
+ name: "Katana",
1080
+ shortname: "katana",
1081
+ native: {
1082
+ address: L,
1083
+ symbol: "ETH",
1084
+ decimals: 18,
1085
+ logoUrl: "https://katana.network/assets/katana-logo.svg"
1086
+ },
1087
+ wToken: {
1088
+ symbol: "WETH",
1089
+ address: "0x4200000000000000000000000000000000000006",
1090
+ // standard L2 WETH address (example, verify if custom)
1091
+ decimals: 18,
1092
+ logoUrl: "https://katana.network/assets/weth-logo.svg"
1093
+ },
1094
+ publicRpcUrl: "https://rpc.katana.network",
1095
+ logoUrl: "https://katana.network/assets/katana-logo.svg",
1096
+ explorer: "https://explorer.katana.garden",
1097
+ // placeholder — replace with actual if known
1098
+ eip1559: !0
1099
+ },
1100
+ bera: {
1101
+ id: 80094,
1102
+ name: "Bera",
1103
+ shortname: "bera",
1104
+ native: {
1105
+ address: L,
1106
+ symbol: "BERA",
1107
+ decimals: 18,
1108
+ logoUrl: "https://berascan.com/token/images/bera_ofc_64.png"
1109
+ },
1110
+ wToken: {
1111
+ symbol: "WBERA",
1112
+ address: "0x6969696969696969696969696969696969696969",
1113
+ // standard L2 WETH address (example, verify if custom)
1114
+ decimals: 18,
1115
+ logoUrl: "https://berascan.com/token/images/wrappedbera_ofc_64.png"
1116
+ },
1117
+ publicRpcUrl: "wss://rpc.berachain-apis.com",
1118
+ logoUrl: "https://katana.network/assets/katana-logo.svg",
1119
+ explorer: "https://berascan.com",
1120
+ // placeholder — replace with actual if known
1121
+ eip1559: !0
1122
+ },
1123
+ monad: {
1124
+ id: 143,
1125
+ name: "Monad",
1126
+ shortname: "monad",
1127
+ native: {
1128
+ address: L,
1129
+ symbol: "MONAD",
1130
+ decimals: 18,
1131
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png"
1132
+ },
1133
+ wToken: {
1134
+ symbol: "WMON",
1135
+ address: "0x3bd359c1119da7da1d913d1c4d2b7c461115433a",
1136
+ decimals: 18,
1137
+ logoUrl: "https://assets.coingecko.com/coins/images/70784/standard/wmon.png?1766028904"
1138
+ },
1139
+ publicRpcUrl: "https://monad-mainnet.drpc.org",
1140
+ logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png",
1141
+ explorer: "https://monad.network",
1142
+ eip1559: !0
1143
+ }
1144
+ };
1145
+ var zt = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, ke = Math.ceil, J = Math.floor, G = "[BigNumber Error] ", Ue = G + "Number primitive has more than 15 significant digits: ", te = 1e14, S = 14, De = 9007199254740991, Se = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], oe = 1e7, W = 1e9;
1146
+ function Ge(e) {
1147
+ var a, d, f, u = T.prototype = { constructor: T, toString: null, valueOf: null }, b = new T(1), A = 20, g = 4, C = -7, E = 21, O = -1e7, F = 1e7, D = !1, R = 1, _ = 0, ye = {
1148
+ prefix: "",
1149
+ groupSize: 3,
1150
+ secondaryGroupSize: 0,
1151
+ groupSeparator: ",",
1152
+ decimalSeparator: ".",
1153
+ fractionGroupSize: 0,
1154
+ fractionGroupSeparator: " ",
1155
+ // non-breaking space
1156
+ suffix: ""
1157
+ }, re = "0123456789abcdefghijklmnopqrstuvwxyz", me = !0;
1158
+ function T(t, n) {
1159
+ var s, l, i, o, m, r, p, y, c = this;
1160
+ if (!(c instanceof T)) return new T(t, n);
1161
+ if (n == null) {
1162
+ if (t && t._isBigNumber === !0) {
1163
+ c.s = t.s, !t.c || t.e > F ? c.c = c.e = null : t.e < O ? c.c = [c.e = 0] : (c.e = t.e, c.c = t.c.slice());
1164
+ return;
1165
+ }
1166
+ if ((r = typeof t == "number") && t * 0 == 0) {
1167
+ if (c.s = 1 / t < 0 ? (t = -t, -1) : 1, t === ~~t) {
1168
+ for (o = 0, m = t; m >= 10; m /= 10, o++) ;
1169
+ o > F ? c.c = c.e = null : (c.e = o, c.c = [t]);
1170
+ return;
1171
+ }
1172
+ y = String(t);
1173
+ } else {
1174
+ if (!zt.test(y = String(t))) return f(c, y, r);
1175
+ c.s = y.charCodeAt(0) == 45 ? (y = y.slice(1), -1) : 1;
1176
+ }
1177
+ (o = y.indexOf(".")) > -1 && (y = y.replace(".", "")), (m = y.search(/e/i)) > 0 ? (o < 0 && (o = m), o += +y.slice(m + 1), y = y.substring(0, m)) : o < 0 && (o = y.length);
1178
+ } else {
1179
+ if (P(n, 2, re.length, "Base"), n == 10 && me)
1180
+ return c = new T(t), X(c, A + c.e + 1, g);
1181
+ if (y = String(t), r = typeof t == "number") {
1182
+ if (t * 0 != 0) return f(c, y, r, n);
1183
+ if (c.s = 1 / t < 0 ? (y = y.slice(1), -1) : 1, T.DEBUG && y.replace(/^0\.0*|\./, "").length > 15)
1184
+ throw Error(Ue + t);
1185
+ } else
1186
+ c.s = y.charCodeAt(0) === 45 ? (y = y.slice(1), -1) : 1;
1187
+ for (s = re.slice(0, n), o = m = 0, p = y.length; m < p; m++)
1188
+ if (s.indexOf(l = y.charAt(m)) < 0) {
1189
+ if (l == ".") {
1190
+ if (m > o) {
1191
+ o = p;
1192
+ continue;
1193
+ }
1194
+ } else if (!i && (y == y.toUpperCase() && (y = y.toLowerCase()) || y == y.toLowerCase() && (y = y.toUpperCase()))) {
1195
+ i = !0, m = -1, o = 0;
1196
+ continue;
1197
+ }
1198
+ return f(c, String(t), r, n);
1199
+ }
1200
+ r = !1, y = d(y, n, 10, c.s), (o = y.indexOf(".")) > -1 ? y = y.replace(".", "") : o = y.length;
1201
+ }
1202
+ for (m = 0; y.charCodeAt(m) === 48; m++) ;
1203
+ for (p = y.length; y.charCodeAt(--p) === 48; ) ;
1204
+ if (y = y.slice(m, ++p)) {
1205
+ if (p -= m, r && T.DEBUG && p > 15 && (t > De || t !== J(t)))
1206
+ throw Error(Ue + c.s * t);
1207
+ if ((o = o - m - 1) > F)
1208
+ c.c = c.e = null;
1209
+ else if (o < O)
1210
+ c.c = [c.e = 0];
1211
+ else {
1212
+ if (c.e = o, c.c = [], m = (o + 1) % S, o < 0 && (m += S), m < p) {
1213
+ for (m && c.c.push(+y.slice(0, m)), p -= S; m < p; )
1214
+ c.c.push(+y.slice(m, m += S));
1215
+ m = S - (y = y.slice(m)).length;
1216
+ } else
1217
+ m -= p;
1218
+ for (; m--; y += "0") ;
1219
+ c.c.push(+y);
1220
+ }
1221
+ } else
1222
+ c.c = [c.e = 0];
1223
+ }
1224
+ T.clone = Ge, T.ROUND_UP = 0, T.ROUND_DOWN = 1, T.ROUND_CEIL = 2, T.ROUND_FLOOR = 3, T.ROUND_HALF_UP = 4, T.ROUND_HALF_DOWN = 5, T.ROUND_HALF_EVEN = 6, T.ROUND_HALF_CEIL = 7, T.ROUND_HALF_FLOOR = 8, T.EUCLID = 9, T.config = T.set = function(t) {
1225
+ var n, s;
1226
+ if (t != null)
1227
+ if (typeof t == "object") {
1228
+ if (t.hasOwnProperty(n = "DECIMAL_PLACES") && (s = t[n], P(s, 0, W, n), A = s), t.hasOwnProperty(n = "ROUNDING_MODE") && (s = t[n], P(s, 0, 8, n), g = s), t.hasOwnProperty(n = "EXPONENTIAL_AT") && (s = t[n], s && s.pop ? (P(s[0], -W, 0, n), P(s[1], 0, W, n), C = s[0], E = s[1]) : (P(s, -W, W, n), C = -(E = s < 0 ? -s : s))), t.hasOwnProperty(n = "RANGE"))
1229
+ if (s = t[n], s && s.pop)
1230
+ P(s[0], -W, -1, n), P(s[1], 1, W, n), O = s[0], F = s[1];
1231
+ else if (P(s, -W, W, n), s)
1232
+ O = -(F = s < 0 ? -s : s);
1233
+ else
1234
+ throw Error(G + n + " cannot be zero: " + s);
1235
+ if (t.hasOwnProperty(n = "CRYPTO"))
1236
+ if (s = t[n], s === !!s)
1237
+ if (s)
1238
+ if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
1239
+ D = s;
1240
+ else
1241
+ throw D = !s, Error(G + "crypto unavailable");
1242
+ else
1243
+ D = s;
1244
+ else
1245
+ throw Error(G + n + " not true or false: " + s);
1246
+ if (t.hasOwnProperty(n = "MODULO_MODE") && (s = t[n], P(s, 0, 9, n), R = s), t.hasOwnProperty(n = "POW_PRECISION") && (s = t[n], P(s, 0, W, n), _ = s), t.hasOwnProperty(n = "FORMAT"))
1247
+ if (s = t[n], typeof s == "object") ye = s;
1248
+ else throw Error(G + n + " not an object: " + s);
1249
+ if (t.hasOwnProperty(n = "ALPHABET"))
1250
+ if (s = t[n], typeof s == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(s))
1251
+ me = s.slice(0, 10) == "0123456789", re = s;
1252
+ else
1253
+ throw Error(G + n + " invalid: " + s);
1254
+ } else
1255
+ throw Error(G + "Object expected: " + t);
1256
+ return {
1257
+ DECIMAL_PLACES: A,
1258
+ ROUNDING_MODE: g,
1259
+ EXPONENTIAL_AT: [C, E],
1260
+ RANGE: [O, F],
1261
+ CRYPTO: D,
1262
+ MODULO_MODE: R,
1263
+ POW_PRECISION: _,
1264
+ FORMAT: ye,
1265
+ ALPHABET: re
1266
+ };
1267
+ }, T.isBigNumber = function(t) {
1268
+ if (!t || t._isBigNumber !== !0) return !1;
1269
+ if (!T.DEBUG) return !0;
1270
+ var n, s, l = t.c, i = t.e, o = t.s;
1271
+ e: if ({}.toString.call(l) == "[object Array]") {
1272
+ if ((o === 1 || o === -1) && i >= -W && i <= W && i === J(i)) {
1273
+ if (l[0] === 0) {
1274
+ if (i === 0 && l.length === 1) return !0;
1275
+ break e;
1276
+ }
1277
+ if (n = (i + 1) % S, n < 1 && (n += S), String(l[0]).length == n) {
1278
+ for (n = 0; n < l.length; n++)
1279
+ if (s = l[n], s < 0 || s >= te || s !== J(s)) break e;
1280
+ if (s !== 0) return !0;
1281
+ }
1282
+ }
1283
+ } else if (l === null && i === null && (o === null || o === 1 || o === -1))
1284
+ return !0;
1285
+ throw Error(G + "Invalid BigNumber: " + t);
1286
+ }, T.maximum = T.max = function() {
1287
+ return Ne(arguments, -1);
1288
+ }, T.minimum = T.min = function() {
1289
+ return Ne(arguments, 1);
1290
+ }, T.random = (function() {
1291
+ var t = 9007199254740992, n = Math.random() * t & 2097151 ? function() {
1292
+ return J(Math.random() * t);
1293
+ } : function() {
1294
+ return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
1295
+ };
1296
+ return function(s) {
1297
+ var l, i, o, m, r, p = 0, y = [], c = new T(b);
1298
+ if (s == null ? s = A : P(s, 0, W), m = ke(s / S), D)
1299
+ if (crypto.getRandomValues) {
1300
+ for (l = crypto.getRandomValues(new Uint32Array(m *= 2)); p < m; )
1301
+ r = l[p] * 131072 + (l[p + 1] >>> 11), r >= 9e15 ? (i = crypto.getRandomValues(new Uint32Array(2)), l[p] = i[0], l[p + 1] = i[1]) : (y.push(r % 1e14), p += 2);
1302
+ p = m / 2;
1303
+ } else if (crypto.randomBytes) {
1304
+ for (l = crypto.randomBytes(m *= 7); p < m; )
1305
+ r = (l[p] & 31) * 281474976710656 + l[p + 1] * 1099511627776 + l[p + 2] * 4294967296 + l[p + 3] * 16777216 + (l[p + 4] << 16) + (l[p + 5] << 8) + l[p + 6], r >= 9e15 ? crypto.randomBytes(7).copy(l, p) : (y.push(r % 1e14), p += 7);
1306
+ p = m / 7;
1307
+ } else
1308
+ throw D = !1, Error(G + "crypto unavailable");
1309
+ if (!D)
1310
+ for (; p < m; )
1311
+ r = n(), r < 9e15 && (y[p++] = r % 1e14);
1312
+ for (m = y[--p], s %= S, m && s && (r = Se[S - s], y[p] = J(m / r) * r); y[p] === 0; y.pop(), p--) ;
1313
+ if (p < 0)
1314
+ y = [o = 0];
1315
+ else {
1316
+ for (o = -1; y[0] === 0; y.splice(0, 1), o -= S) ;
1317
+ for (p = 1, r = y[0]; r >= 10; r /= 10, p++) ;
1318
+ p < S && (o -= S - p);
1319
+ }
1320
+ return c.e = o, c.c = y, c;
1321
+ };
1322
+ })(), T.sum = function() {
1323
+ for (var t = 1, n = arguments, s = new T(n[0]); t < n.length; ) s = s.plus(n[t++]);
1324
+ return s;
1325
+ }, d = /* @__PURE__ */ (function() {
1326
+ var t = "0123456789";
1327
+ function n(s, l, i, o) {
1328
+ for (var m, r = [0], p, y = 0, c = s.length; y < c; ) {
1329
+ for (p = r.length; p--; r[p] *= l) ;
1330
+ for (r[0] += o.indexOf(s.charAt(y++)), m = 0; m < r.length; m++)
1331
+ r[m] > i - 1 && (r[m + 1] == null && (r[m + 1] = 0), r[m + 1] += r[m] / i | 0, r[m] %= i);
1332
+ }
1333
+ return r.reverse();
1334
+ }
1335
+ return function(s, l, i, o, m) {
1336
+ var r, p, y, c, h, w, k, v, M = s.indexOf("."), V = A, B = g;
1337
+ for (M >= 0 && (c = _, _ = 0, s = s.replace(".", ""), v = new T(l), w = v.pow(s.length - M), _ = c, v.c = n(
1338
+ de(Y(w.c), w.e, "0"),
1339
+ 10,
1340
+ i,
1341
+ t
1342
+ ), v.e = v.c.length), k = n(s, l, i, m ? (r = re, t) : (r = t, re)), y = c = k.length; k[--c] == 0; k.pop()) ;
1343
+ if (!k[0]) return r.charAt(0);
1344
+ if (M < 0 ? --y : (w.c = k, w.e = y, w.s = o, w = a(w, v, V, B, i), k = w.c, h = w.r, y = w.e), p = y + V + 1, M = k[p], c = i / 2, h = h || p < 0 || k[p + 1] != null, h = B < 4 ? (M != null || h) && (B == 0 || B == (w.s < 0 ? 3 : 2)) : M > c || M == c && (B == 4 || h || B == 6 && k[p - 1] & 1 || B == (w.s < 0 ? 8 : 7)), p < 1 || !k[0])
1345
+ s = h ? de(r.charAt(1), -V, r.charAt(0)) : r.charAt(0);
1346
+ else {
1347
+ if (k.length = p, h)
1348
+ for (--i; ++k[--p] > i; )
1349
+ k[p] = 0, p || (++y, k = [1].concat(k));
1350
+ for (c = k.length; !k[--c]; ) ;
1351
+ for (M = 0, s = ""; M <= c; s += r.charAt(k[M++])) ;
1352
+ s = de(s, y, r.charAt(0));
1353
+ }
1354
+ return s;
1355
+ };
1356
+ })(), a = /* @__PURE__ */ (function() {
1357
+ function t(l, i, o) {
1358
+ var m, r, p, y, c = 0, h = l.length, w = i % oe, k = i / oe | 0;
1359
+ for (l = l.slice(); h--; )
1360
+ p = l[h] % oe, y = l[h] / oe | 0, m = k * p + y * w, r = w * p + m % oe * oe + c, c = (r / o | 0) + (m / oe | 0) + k * y, l[h] = r % o;
1361
+ return c && (l = [c].concat(l)), l;
1362
+ }
1363
+ function n(l, i, o, m) {
1364
+ var r, p;
1365
+ if (o != m)
1366
+ p = o > m ? 1 : -1;
1367
+ else
1368
+ for (r = p = 0; r < o; r++)
1369
+ if (l[r] != i[r]) {
1370
+ p = l[r] > i[r] ? 1 : -1;
1371
+ break;
1372
+ }
1373
+ return p;
1374
+ }
1375
+ function s(l, i, o, m) {
1376
+ for (var r = 0; o--; )
1377
+ l[o] -= r, r = l[o] < i[o] ? 1 : 0, l[o] = r * m + l[o] - i[o];
1378
+ for (; !l[0] && l.length > 1; l.splice(0, 1)) ;
1379
+ }
1380
+ return function(l, i, o, m, r) {
1381
+ var p, y, c, h, w, k, v, M, V, B, I, $, be, Ce, Fe, ae, fe, Q = l.s == i.s ? 1 : -1, H = l.c, N = i.c;
1382
+ if (!H || !H[0] || !N || !N[0])
1383
+ return new T(
1384
+ // Return NaN if either NaN, or both Infinity or 0.
1385
+ !l.s || !i.s || (H ? N && H[0] == N[0] : !N) ? NaN : (
1386
+ // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
1387
+ H && H[0] == 0 || !N ? Q * 0 : Q / 0
1388
+ )
1389
+ );
1390
+ for (M = new T(Q), V = M.c = [], y = l.e - i.e, Q = o + y + 1, r || (r = te, y = ee(l.e / S) - ee(i.e / S), Q = Q / S | 0), c = 0; N[c] == (H[c] || 0); c++) ;
1391
+ if (N[c] > (H[c] || 0) && y--, Q < 0)
1392
+ V.push(1), h = !0;
1393
+ else {
1394
+ for (Ce = H.length, ae = N.length, c = 0, Q += 2, w = J(r / (N[0] + 1)), w > 1 && (N = t(N, w, r), H = t(H, w, r), ae = N.length, Ce = H.length), be = ae, B = H.slice(0, ae), I = B.length; I < ae; B[I++] = 0) ;
1395
+ fe = N.slice(), fe = [0].concat(fe), Fe = N[0], N[1] >= r / 2 && Fe++;
1396
+ do {
1397
+ if (w = 0, p = n(N, B, ae, I), p < 0) {
1398
+ if ($ = B[0], ae != I && ($ = $ * r + (B[1] || 0)), w = J($ / Fe), w > 1)
1399
+ for (w >= r && (w = r - 1), k = t(N, w, r), v = k.length, I = B.length; n(k, B, v, I) == 1; )
1400
+ w--, s(k, ae < v ? fe : N, v, r), v = k.length, p = 1;
1401
+ else
1402
+ w == 0 && (p = w = 1), k = N.slice(), v = k.length;
1403
+ if (v < I && (k = [0].concat(k)), s(B, k, I, r), I = B.length, p == -1)
1404
+ for (; n(N, B, ae, I) < 1; )
1405
+ w++, s(B, ae < I ? fe : N, I, r), I = B.length;
1406
+ } else p === 0 && (w++, B = [0]);
1407
+ V[c++] = w, B[0] ? B[I++] = H[be] || 0 : (B = [H[be]], I = 1);
1408
+ } while ((be++ < Ce || B[0] != null) && Q--);
1409
+ h = B[0] != null, V[0] || V.splice(0, 1);
1410
+ }
1411
+ if (r == te) {
1412
+ for (c = 1, Q = V[0]; Q >= 10; Q /= 10, c++) ;
1413
+ X(M, o + (M.e = c + y * S - 1) + 1, m, h);
1414
+ } else
1415
+ M.e = y, M.r = +h;
1416
+ return M;
15
1417
  };
16
- return this.events.push(o), this.config.debug && console.log("[Spot] Event tracked:", o), o;
1418
+ })();
1419
+ function Ee(t, n, s, l) {
1420
+ var i, o, m, r, p;
1421
+ if (s == null ? s = g : P(s, 0, 8), !t.c) return t.toString();
1422
+ if (i = t.c[0], m = t.e, n == null)
1423
+ p = Y(t.c), p = l == 1 || l == 2 && (m <= C || m >= E) ? ge(p, m) : de(p, m, "0");
1424
+ else if (t = X(new T(t), n, s), o = t.e, p = Y(t.c), r = p.length, l == 1 || l == 2 && (n <= o || o <= C)) {
1425
+ for (; r < n; p += "0", r++) ;
1426
+ p = ge(p, o);
1427
+ } else if (n -= m + (l === 2 && o > m), p = de(p, o, "0"), o + 1 > r) {
1428
+ if (--n > 0) for (p += "."; n--; p += "0") ;
1429
+ } else if (n += o - r, n > 0)
1430
+ for (o + 1 == r && (p += "."); n--; p += "0") ;
1431
+ return t.s < 0 && i ? "-" + p : p;
17
1432
  }
18
- getEvents() {
19
- return [...this.events];
1433
+ function Ne(t, n) {
1434
+ for (var s, l, i = 1, o = new T(t[0]); i < t.length; i++)
1435
+ l = new T(t[i]), (!l.s || (s = ce(o, l)) === n || s === 0 && o.s === n) && (o = l);
1436
+ return o;
1437
+ }
1438
+ function we(t, n, s) {
1439
+ for (var l = 1, i = n.length; !n[--i]; n.pop()) ;
1440
+ for (i = n[0]; i >= 10; i /= 10, l++) ;
1441
+ return (s = l + s * S - 1) > F ? t.c = t.e = null : s < O ? t.c = [t.e = 0] : (t.e = s, t.c = n), t;
1442
+ }
1443
+ f = /* @__PURE__ */ (function() {
1444
+ var t = /^(-?)0([xbo])(?=\w[\w.]*$)/i, n = /^([^.]+)\.$/, s = /^\.([^.]+)$/, l = /^-?(Infinity|NaN)$/, i = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
1445
+ return function(o, m, r, p) {
1446
+ var y, c = r ? m : m.replace(i, "");
1447
+ if (l.test(c))
1448
+ o.s = isNaN(c) ? null : c < 0 ? -1 : 1;
1449
+ else {
1450
+ if (!r && (c = c.replace(t, function(h, w, k) {
1451
+ return y = (k = k.toLowerCase()) == "x" ? 16 : k == "b" ? 2 : 8, !p || p == y ? w : h;
1452
+ }), p && (y = p, c = c.replace(n, "$1").replace(s, "0.$1")), m != c))
1453
+ return new T(c, y);
1454
+ if (T.DEBUG)
1455
+ throw Error(G + "Not a" + (p ? " base " + p : "") + " number: " + m);
1456
+ o.s = null;
1457
+ }
1458
+ o.c = o.e = null;
1459
+ };
1460
+ })();
1461
+ function X(t, n, s, l) {
1462
+ var i, o, m, r, p, y, c, h = t.c, w = Se;
1463
+ if (h) {
1464
+ e: {
1465
+ for (i = 1, r = h[0]; r >= 10; r /= 10, i++) ;
1466
+ if (o = n - i, o < 0)
1467
+ o += S, m = n, p = h[y = 0], c = J(p / w[i - m - 1] % 10);
1468
+ else if (y = ke((o + 1) / S), y >= h.length)
1469
+ if (l) {
1470
+ for (; h.length <= y; h.push(0)) ;
1471
+ p = c = 0, i = 1, o %= S, m = o - S + 1;
1472
+ } else
1473
+ break e;
1474
+ else {
1475
+ for (p = r = h[y], i = 1; r >= 10; r /= 10, i++) ;
1476
+ o %= S, m = o - S + i, c = m < 0 ? 0 : J(p / w[i - m - 1] % 10);
1477
+ }
1478
+ if (l = l || n < 0 || // Are there any non-zero digits after the rounding digit?
1479
+ // The expression n % pows10[d - j - 1] returns all digits of n to the right
1480
+ // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
1481
+ h[y + 1] != null || (m < 0 ? p : p % w[i - m - 1]), l = s < 4 ? (c || l) && (s == 0 || s == (t.s < 0 ? 3 : 2)) : c > 5 || c == 5 && (s == 4 || l || s == 6 && // Check whether the digit to the left of the rounding digit is odd.
1482
+ (o > 0 ? m > 0 ? p / w[i - m] : 0 : h[y - 1]) % 10 & 1 || s == (t.s < 0 ? 8 : 7)), n < 1 || !h[0])
1483
+ return h.length = 0, l ? (n -= t.e + 1, h[0] = w[(S - n % S) % S], t.e = -n || 0) : h[0] = t.e = 0, t;
1484
+ if (o == 0 ? (h.length = y, r = 1, y--) : (h.length = y + 1, r = w[S - o], h[y] = m > 0 ? J(p / w[i - m] % w[m]) * r : 0), l)
1485
+ for (; ; )
1486
+ if (y == 0) {
1487
+ for (o = 1, m = h[0]; m >= 10; m /= 10, o++) ;
1488
+ for (m = h[0] += r, r = 1; m >= 10; m /= 10, r++) ;
1489
+ o != r && (t.e++, h[0] == te && (h[0] = 1));
1490
+ break;
1491
+ } else {
1492
+ if (h[y] += r, h[y] != te) break;
1493
+ h[y--] = 0, r = 1;
1494
+ }
1495
+ for (o = h.length; h[--o] === 0; h.pop()) ;
1496
+ }
1497
+ t.e > F ? t.c = t.e = null : t.e < O && (t.c = [t.e = 0]);
1498
+ }
1499
+ return t;
1500
+ }
1501
+ function ie(t) {
1502
+ var n, s = t.e;
1503
+ return s === null ? t.toString() : (n = Y(t.c), n = s <= C || s >= E ? ge(n, s) : de(n, s, "0"), t.s < 0 ? "-" + n : n);
1504
+ }
1505
+ return u.absoluteValue = u.abs = function() {
1506
+ var t = new T(this);
1507
+ return t.s < 0 && (t.s = 1), t;
1508
+ }, u.comparedTo = function(t, n) {
1509
+ return ce(this, new T(t, n));
1510
+ }, u.decimalPlaces = u.dp = function(t, n) {
1511
+ var s, l, i, o = this;
1512
+ if (t != null)
1513
+ return P(t, 0, W), n == null ? n = g : P(n, 0, 8), X(new T(o), t + o.e + 1, n);
1514
+ if (!(s = o.c)) return null;
1515
+ if (l = ((i = s.length - 1) - ee(this.e / S)) * S, i = s[i]) for (; i % 10 == 0; i /= 10, l--) ;
1516
+ return l < 0 && (l = 0), l;
1517
+ }, u.dividedBy = u.div = function(t, n) {
1518
+ return a(this, new T(t, n), A, g);
1519
+ }, u.dividedToIntegerBy = u.idiv = function(t, n) {
1520
+ return a(this, new T(t, n), 0, 1);
1521
+ }, u.exponentiatedBy = u.pow = function(t, n) {
1522
+ var s, l, i, o, m, r, p, y, c, h = this;
1523
+ if (t = new T(t), t.c && !t.isInteger())
1524
+ throw Error(G + "Exponent not an integer: " + ie(t));
1525
+ if (n != null && (n = new T(n)), r = t.e > 14, !h.c || !h.c[0] || h.c[0] == 1 && !h.e && h.c.length == 1 || !t.c || !t.c[0])
1526
+ return c = new T(Math.pow(+ie(h), r ? t.s * (2 - Ae(t)) : +ie(t))), n ? c.mod(n) : c;
1527
+ if (p = t.s < 0, n) {
1528
+ if (n.c ? !n.c[0] : !n.s) return new T(NaN);
1529
+ l = !p && h.isInteger() && n.isInteger(), l && (h = h.mod(n));
1530
+ } else {
1531
+ if (t.e > 9 && (h.e > 0 || h.e < -1 || (h.e == 0 ? h.c[0] > 1 || r && h.c[1] >= 24e7 : h.c[0] < 8e13 || r && h.c[0] <= 9999975e7)))
1532
+ return o = h.s < 0 && Ae(t) ? -0 : 0, h.e > -1 && (o = 1 / o), new T(p ? 1 / o : o);
1533
+ _ && (o = ke(_ / S + 2));
1534
+ }
1535
+ for (r ? (s = new T(0.5), p && (t.s = 1), y = Ae(t)) : (i = Math.abs(+ie(t)), y = i % 2), c = new T(b); ; ) {
1536
+ if (y) {
1537
+ if (c = c.times(h), !c.c) break;
1538
+ o ? c.c.length > o && (c.c.length = o) : l && (c = c.mod(n));
1539
+ }
1540
+ if (i) {
1541
+ if (i = J(i / 2), i === 0) break;
1542
+ y = i % 2;
1543
+ } else if (t = t.times(s), X(t, t.e + 1, 1), t.e > 14)
1544
+ y = Ae(t);
1545
+ else {
1546
+ if (i = +ie(t), i === 0) break;
1547
+ y = i % 2;
1548
+ }
1549
+ h = h.times(h), o ? h.c && h.c.length > o && (h.c.length = o) : l && (h = h.mod(n));
1550
+ }
1551
+ return l ? c : (p && (c = b.div(c)), n ? c.mod(n) : o ? X(c, _, g, m) : c);
1552
+ }, u.integerValue = function(t) {
1553
+ var n = new T(this);
1554
+ return t == null ? t = g : P(t, 0, 8), X(n, n.e + 1, t);
1555
+ }, u.isEqualTo = u.eq = function(t, n) {
1556
+ return ce(this, new T(t, n)) === 0;
1557
+ }, u.isFinite = function() {
1558
+ return !!this.c;
1559
+ }, u.isGreaterThan = u.gt = function(t, n) {
1560
+ return ce(this, new T(t, n)) > 0;
1561
+ }, u.isGreaterThanOrEqualTo = u.gte = function(t, n) {
1562
+ return (n = ce(this, new T(t, n))) === 1 || n === 0;
1563
+ }, u.isInteger = function() {
1564
+ return !!this.c && ee(this.e / S) > this.c.length - 2;
1565
+ }, u.isLessThan = u.lt = function(t, n) {
1566
+ return ce(this, new T(t, n)) < 0;
1567
+ }, u.isLessThanOrEqualTo = u.lte = function(t, n) {
1568
+ return (n = ce(this, new T(t, n))) === -1 || n === 0;
1569
+ }, u.isNaN = function() {
1570
+ return !this.s;
1571
+ }, u.isNegative = function() {
1572
+ return this.s < 0;
1573
+ }, u.isPositive = function() {
1574
+ return this.s > 0;
1575
+ }, u.isZero = function() {
1576
+ return !!this.c && this.c[0] == 0;
1577
+ }, u.minus = function(t, n) {
1578
+ var s, l, i, o, m = this, r = m.s;
1579
+ if (t = new T(t, n), n = t.s, !r || !n) return new T(NaN);
1580
+ if (r != n)
1581
+ return t.s = -n, m.plus(t);
1582
+ var p = m.e / S, y = t.e / S, c = m.c, h = t.c;
1583
+ if (!p || !y) {
1584
+ if (!c || !h) return c ? (t.s = -n, t) : new T(h ? m : NaN);
1585
+ if (!c[0] || !h[0])
1586
+ return h[0] ? (t.s = -n, t) : new T(c[0] ? m : (
1587
+ // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
1588
+ g == 3 ? -0 : 0
1589
+ ));
1590
+ }
1591
+ if (p = ee(p), y = ee(y), c = c.slice(), r = p - y) {
1592
+ for ((o = r < 0) ? (r = -r, i = c) : (y = p, i = h), i.reverse(), n = r; n--; i.push(0)) ;
1593
+ i.reverse();
1594
+ } else
1595
+ for (l = (o = (r = c.length) < (n = h.length)) ? r : n, r = n = 0; n < l; n++)
1596
+ if (c[n] != h[n]) {
1597
+ o = c[n] < h[n];
1598
+ break;
1599
+ }
1600
+ if (o && (i = c, c = h, h = i, t.s = -t.s), n = (l = h.length) - (s = c.length), n > 0) for (; n--; c[s++] = 0) ;
1601
+ for (n = te - 1; l > r; ) {
1602
+ if (c[--l] < h[l]) {
1603
+ for (s = l; s && !c[--s]; c[s] = n) ;
1604
+ --c[s], c[l] += te;
1605
+ }
1606
+ c[l] -= h[l];
1607
+ }
1608
+ for (; c[0] == 0; c.splice(0, 1), --y) ;
1609
+ return c[0] ? we(t, c, y) : (t.s = g == 3 ? -1 : 1, t.c = [t.e = 0], t);
1610
+ }, u.modulo = u.mod = function(t, n) {
1611
+ var s, l, i = this;
1612
+ return t = new T(t, n), !i.c || !t.s || t.c && !t.c[0] ? new T(NaN) : !t.c || i.c && !i.c[0] ? new T(i) : (R == 9 ? (l = t.s, t.s = 1, s = a(i, t, 0, 3), t.s = l, s.s *= l) : s = a(i, t, 0, R), t = i.minus(s.times(t)), !t.c[0] && R == 1 && (t.s = i.s), t);
1613
+ }, u.multipliedBy = u.times = function(t, n) {
1614
+ var s, l, i, o, m, r, p, y, c, h, w, k, v, M, V, B = this, I = B.c, $ = (t = new T(t, n)).c;
1615
+ if (!I || !$ || !I[0] || !$[0])
1616
+ return !B.s || !t.s || I && !I[0] && !$ || $ && !$[0] && !I ? t.c = t.e = t.s = null : (t.s *= B.s, !I || !$ ? t.c = t.e = null : (t.c = [0], t.e = 0)), t;
1617
+ for (l = ee(B.e / S) + ee(t.e / S), t.s *= B.s, p = I.length, h = $.length, p < h && (v = I, I = $, $ = v, i = p, p = h, h = i), i = p + h, v = []; i--; v.push(0)) ;
1618
+ for (M = te, V = oe, i = h; --i >= 0; ) {
1619
+ for (s = 0, w = $[i] % V, k = $[i] / V | 0, m = p, o = i + m; o > i; )
1620
+ y = I[--m] % V, c = I[m] / V | 0, r = k * y + c * w, y = w * y + r % V * V + v[o] + s, s = (y / M | 0) + (r / V | 0) + k * c, v[o--] = y % M;
1621
+ v[o] = s;
1622
+ }
1623
+ return s ? ++l : v.splice(0, 1), we(t, v, l);
1624
+ }, u.negated = function() {
1625
+ var t = new T(this);
1626
+ return t.s = -t.s || null, t;
1627
+ }, u.plus = function(t, n) {
1628
+ var s, l = this, i = l.s;
1629
+ if (t = new T(t, n), n = t.s, !i || !n) return new T(NaN);
1630
+ if (i != n)
1631
+ return t.s = -n, l.minus(t);
1632
+ var o = l.e / S, m = t.e / S, r = l.c, p = t.c;
1633
+ if (!o || !m) {
1634
+ if (!r || !p) return new T(i / 0);
1635
+ if (!r[0] || !p[0]) return p[0] ? t : new T(r[0] ? l : i * 0);
1636
+ }
1637
+ if (o = ee(o), m = ee(m), r = r.slice(), i = o - m) {
1638
+ for (i > 0 ? (m = o, s = p) : (i = -i, s = r), s.reverse(); i--; s.push(0)) ;
1639
+ s.reverse();
1640
+ }
1641
+ for (i = r.length, n = p.length, i - n < 0 && (s = p, p = r, r = s, n = i), i = 0; n; )
1642
+ i = (r[--n] = r[n] + p[n] + i) / te | 0, r[n] = te === r[n] ? 0 : r[n] % te;
1643
+ return i && (r = [i].concat(r), ++m), we(t, r, m);
1644
+ }, u.precision = u.sd = function(t, n) {
1645
+ var s, l, i, o = this;
1646
+ if (t != null && t !== !!t)
1647
+ return P(t, 1, W), n == null ? n = g : P(n, 0, 8), X(new T(o), t, n);
1648
+ if (!(s = o.c)) return null;
1649
+ if (i = s.length - 1, l = i * S + 1, i = s[i]) {
1650
+ for (; i % 10 == 0; i /= 10, l--) ;
1651
+ for (i = s[0]; i >= 10; i /= 10, l++) ;
1652
+ }
1653
+ return t && o.e + 1 > l && (l = o.e + 1), l;
1654
+ }, u.shiftedBy = function(t) {
1655
+ return P(t, -De, De), this.times("1e" + t);
1656
+ }, u.squareRoot = u.sqrt = function() {
1657
+ var t, n, s, l, i, o = this, m = o.c, r = o.s, p = o.e, y = A + 4, c = new T("0.5");
1658
+ if (r !== 1 || !m || !m[0])
1659
+ return new T(!r || r < 0 && (!m || m[0]) ? NaN : m ? o : 1 / 0);
1660
+ if (r = Math.sqrt(+ie(o)), r == 0 || r == 1 / 0 ? (n = Y(m), (n.length + p) % 2 == 0 && (n += "0"), r = Math.sqrt(+n), p = ee((p + 1) / 2) - (p < 0 || p % 2), r == 1 / 0 ? n = "5e" + p : (n = r.toExponential(), n = n.slice(0, n.indexOf("e") + 1) + p), s = new T(n)) : s = new T(r + ""), s.c[0]) {
1661
+ for (p = s.e, r = p + y, r < 3 && (r = 0); ; )
1662
+ if (i = s, s = c.times(i.plus(a(o, i, y, 1))), Y(i.c).slice(0, r) === (n = Y(s.c)).slice(0, r))
1663
+ if (s.e < p && --r, n = n.slice(r - 3, r + 1), n == "9999" || !l && n == "4999") {
1664
+ if (!l && (X(i, i.e + A + 2, 0), i.times(i).eq(o))) {
1665
+ s = i;
1666
+ break;
1667
+ }
1668
+ y += 4, r += 4, l = 1;
1669
+ } else {
1670
+ (!+n || !+n.slice(1) && n.charAt(0) == "5") && (X(s, s.e + A + 2, 1), t = !s.times(s).eq(o));
1671
+ break;
1672
+ }
1673
+ }
1674
+ return X(s, s.e + A + 1, g, t);
1675
+ }, u.toExponential = function(t, n) {
1676
+ return t != null && (P(t, 0, W), t++), Ee(this, t, n, 1);
1677
+ }, u.toFixed = function(t, n) {
1678
+ return t != null && (P(t, 0, W), t = t + this.e + 1), Ee(this, t, n);
1679
+ }, u.toFormat = function(t, n, s) {
1680
+ var l, i = this;
1681
+ if (s == null)
1682
+ t != null && n && typeof n == "object" ? (s = n, n = null) : t && typeof t == "object" ? (s = t, t = n = null) : s = ye;
1683
+ else if (typeof s != "object")
1684
+ throw Error(G + "Argument not an object: " + s);
1685
+ if (l = i.toFixed(t, n), i.c) {
1686
+ var o, m = l.split("."), r = +s.groupSize, p = +s.secondaryGroupSize, y = s.groupSeparator || "", c = m[0], h = m[1], w = i.s < 0, k = w ? c.slice(1) : c, v = k.length;
1687
+ if (p && (o = r, r = p, p = o, v -= o), r > 0 && v > 0) {
1688
+ for (o = v % r || r, c = k.substr(0, o); o < v; o += r) c += y + k.substr(o, r);
1689
+ p > 0 && (c += y + k.slice(o)), w && (c = "-" + c);
1690
+ }
1691
+ l = h ? c + (s.decimalSeparator || "") + ((p = +s.fractionGroupSize) ? h.replace(
1692
+ new RegExp("\\d{" + p + "}\\B", "g"),
1693
+ "$&" + (s.fractionGroupSeparator || "")
1694
+ ) : h) : c;
1695
+ }
1696
+ return (s.prefix || "") + l + (s.suffix || "");
1697
+ }, u.toFraction = function(t) {
1698
+ var n, s, l, i, o, m, r, p, y, c, h, w, k = this, v = k.c;
1699
+ if (t != null && (r = new T(t), !r.isInteger() && (r.c || r.s !== 1) || r.lt(b)))
1700
+ throw Error(G + "Argument " + (r.isInteger() ? "out of range: " : "not an integer: ") + ie(r));
1701
+ if (!v) return new T(k);
1702
+ for (n = new T(b), y = s = new T(b), l = p = new T(b), w = Y(v), o = n.e = w.length - k.e - 1, n.c[0] = Se[(m = o % S) < 0 ? S + m : m], t = !t || r.comparedTo(n) > 0 ? o > 0 ? n : y : r, m = F, F = 1 / 0, r = new T(w), p.c[0] = 0; c = a(r, n, 0, 1), i = s.plus(c.times(l)), i.comparedTo(t) != 1; )
1703
+ s = l, l = i, y = p.plus(c.times(i = y)), p = i, n = r.minus(c.times(i = n)), r = i;
1704
+ return i = a(t.minus(s), l, 0, 1), p = p.plus(i.times(y)), s = s.plus(i.times(l)), p.s = y.s = k.s, o = o * 2, h = a(y, l, o, g).minus(k).abs().comparedTo(
1705
+ a(p, s, o, g).minus(k).abs()
1706
+ ) < 1 ? [y, l] : [p, s], F = m, h;
1707
+ }, u.toNumber = function() {
1708
+ return +ie(this);
1709
+ }, u.toPrecision = function(t, n) {
1710
+ return t != null && P(t, 1, W), Ee(this, t, n, 2);
1711
+ }, u.toString = function(t) {
1712
+ var n, s = this, l = s.s, i = s.e;
1713
+ return i === null ? l ? (n = "Infinity", l < 0 && (n = "-" + n)) : n = "NaN" : (t == null ? n = i <= C || i >= E ? ge(Y(s.c), i) : de(Y(s.c), i, "0") : t === 10 && me ? (s = X(new T(s), A + i + 1, g), n = de(Y(s.c), s.e, "0")) : (P(t, 2, re.length, "Base"), n = d(de(Y(s.c), i, "0"), 10, t, l, !0)), l < 0 && s.c[0] && (n = "-" + n)), n;
1714
+ }, u.valueOf = u.toJSON = function() {
1715
+ return ie(this);
1716
+ }, u._isBigNumber = !0, u[Symbol.toStringTag] = "BigNumber", u[Symbol.for("nodejs.util.inspect.custom")] = u.valueOf, e != null && T.set(e), T;
1717
+ }
1718
+ function ee(e) {
1719
+ var a = e | 0;
1720
+ return e > 0 || e === a ? a : a - 1;
1721
+ }
1722
+ function Y(e) {
1723
+ for (var a, d, f = 1, u = e.length, b = e[0] + ""; f < u; ) {
1724
+ for (a = e[f++] + "", d = S - a.length; d--; a = "0" + a) ;
1725
+ b += a;
1726
+ }
1727
+ for (u = b.length; b.charCodeAt(--u) === 48; ) ;
1728
+ return b.slice(0, u + 1 || 1);
1729
+ }
1730
+ function ce(e, a) {
1731
+ var d, f, u = e.c, b = a.c, A = e.s, g = a.s, C = e.e, E = a.e;
1732
+ if (!A || !g) return null;
1733
+ if (d = u && !u[0], f = b && !b[0], d || f) return d ? f ? 0 : -g : A;
1734
+ if (A != g) return A;
1735
+ if (d = A < 0, f = C == E, !u || !b) return f ? 0 : !u ^ d ? 1 : -1;
1736
+ if (!f) return C > E ^ d ? 1 : -1;
1737
+ for (g = (C = u.length) < (E = b.length) ? C : E, A = 0; A < g; A++) if (u[A] != b[A]) return u[A] > b[A] ^ d ? 1 : -1;
1738
+ return C == E ? 0 : C > E ^ d ? 1 : -1;
1739
+ }
1740
+ function P(e, a, d, f) {
1741
+ if (e < a || e > d || e !== J(e))
1742
+ throw Error(G + (f || "Argument") + (typeof e == "number" ? e < a || e > d ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
1743
+ }
1744
+ function Ae(e) {
1745
+ var a = e.c.length - 1;
1746
+ return ee(e.e / S) == a && e.c[a] % 2 != 0;
1747
+ }
1748
+ function ge(e, a) {
1749
+ return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (a < 0 ? "e" : "e+") + a;
1750
+ }
1751
+ function de(e, a, d) {
1752
+ var f, u;
1753
+ if (a < 0) {
1754
+ for (u = d + "."; ++a; u += d) ;
1755
+ e = u + e;
1756
+ } else if (f = e.length, ++a > f) {
1757
+ for (u = d, a -= f; --a; u += d) ;
1758
+ e += u;
1759
+ } else a < f && (e = e.slice(0, a) + "." + e.slice(a));
1760
+ return e;
1761
+ }
1762
+ var x = Ge();
1763
+ const Un = (e, a) => {
1764
+ if (!e || !a) return "";
1765
+ const d = x(10).pow(e || 0);
1766
+ return x(a).times(d).idiv(d).div(d).toFixed();
1767
+ }, Ln = (e, a) => !e || !a ? "" : Ht(a).times(x(10).pow(e)).decimalPlaces(0).toFixed(0), $t = x(0);
1768
+ x(1);
1769
+ x(10);
1770
+ x(1e18);
1771
+ function Le(e, a) {
1772
+ return e instanceof x ? e : e ? x(e, a) : $t;
1773
+ }
1774
+ function xe(e, a) {
1775
+ return e == a || e.toLowerCase() == a.toLowerCase();
1776
+ }
1777
+ function Ht(e, a, d) {
1778
+ if (typeof e != "string") return Le(e);
1779
+ const f = ".", u = e.replace(new RegExp(`[^${f}\\d-]+`, "g"), "");
1780
+ return Le(u);
1781
+ }
1782
+ const Vn = (e) => !!Jt.find((a) => xe(a, e || ""));
1783
+ function Kt(e) {
1784
+ return [ne.Years, ne.Months, ne.Weeks, ne.Days, ne.Hours, ne.Minutes].find((d) => d <= e) || ne.Minutes;
1785
+ }
1786
+ const ue = (e) => e ? e.value * e.unit : 0, Gt = (e) => !e || e === "NaN" ? "0" : x(e).decimalPlaces(0).toFixed(), Wn = (e) => Object.values(U).find((a) => a.id === e), qt = (e) => {
1787
+ if (!e) return;
1788
+ const a = e.map((b) => K(b)), d = Object.entries(Xe).filter(([b]) => a.includes(b)).flatMap(([, b]) => b), f = e.map((b) => b.exchangeAddress), u = new Set([...f, ...d].map((b) => b.toLowerCase()));
1789
+ return Array.from(u);
1790
+ }, zn = (e, a) => {
1791
+ const d = e.toLowerCase(), f = Object.values(z).find((u) => u.exchangeAddress.toLowerCase() === d && u.chainId === a);
1792
+ if (f) return f;
1793
+ for (const [u, b] of Object.entries(Xe))
1794
+ if (b.some((A) => A.toLowerCase() === d)) {
1795
+ const A = Object.values(z).find((g) => {
1796
+ const C = u.split("_")[0];
1797
+ return g.name === C && g.chainId === Number(a);
1798
+ });
1799
+ if (A) return A;
1800
+ }
1801
+ }, $n = (e, a) => e.version === 1 ? (e.fillDelay || 0) * 1e3 + Ye(a) : (e.fillDelay || 0) * 1e3, qe = (e) => new URLSearchParams(window.location.search).get(e), Hn = (e) => nn[e], jt = "https://order-sink-dev.orbs.network", Be = "https://order-sink.orbs.network", Xt = ["https://twap-v2.netlify.app"], je = () => {
1802
+ try {
1803
+ return qe(
1804
+ "env"
1805
+ /* ENV */
1806
+ ) === "prod" ? Be : window.location.hostname.includes("localhost") || Xt.includes(window.location.origin) ? jt : Be;
1807
+ } catch {
1808
+ return Be;
20
1809
  }
21
- clearEvents() {
22
- this.events = [];
1810
+ }, Kn = 100, Gn = 1, _e = 300 * 1e3, he = 365 * 24 * 60 * 60 * 1e3, Ve = 300 * 1e3, Qt = new Date(_e).getMinutes(), We = (e) => `https://hub.orbs.network/api/private/project_cm7nb67z86nyr01z12gs0fxpf/subgraphs/orbs-twap-${e}/prod/gn`, Z = "https://hub.orbs.network/api/apikey/subgraphs/id", Yt = {
1811
+ [U.eth.id]: `${Z}/Bf7bvMYcJbDAvYWJmhMpHZ4cpFjqzkhK6GXXEpnPRq6`,
1812
+ [U.bsc.id]: `${Z}/4NfXEi8rreQsnAr4aJ45RLCKgnjcWX46Lbt9SadiCcz6`,
1813
+ [U.poly.id]: `${Z}/3PyRPWSvDnMowGbeBy7aNsvUkD5ZuxdXQw2RdJq4NdXi`,
1814
+ [U.arb.id]: `${Z}/83bpQexEaqBjHaQbKoFTbtvCXuo5RudRkfLgtRUYqo2c`,
1815
+ [U.base.id]: `${Z}/DFhaPQb3HATXkpsWNZw3gydYHehLBVEDiSk4iBdZJyps`,
1816
+ [U.sei.id]: `${Z}/5zjzRnURzoddyFSZBw5E5NAM3oBgPq3NasTYbtMk6EL6`,
1817
+ [U.linea.id]: `${Z}/6VsNPEYfFLPZCqdMMDadoXQjLHWJdjEwiD768GAtb7j6`,
1818
+ [U.sonic.id]: `${Z}/DtBr6a5vsoDd2oAXdPszcn4gLgrr1XC68Q3AJQKXnNLV`,
1819
+ [U.ftm.id]: `${Z}/DdRo1pmJkrJC9fjsjEBWnNE1uqrbh7Diz4tVKd7rfupp`,
1820
+ [U.katana.id]: `${Z}/CGi9sDFMQcnBwF3C3NoCFqnaE34sssbgwPLTwiskSXmW`,
1821
+ [U.avax.id]: `${Z}/FxZ1vMwE5Xy1qvKvZENUMz4vhW8Sh4vXJf9Vp7o17pTx`,
1822
+ [U.bera.id]: `${Z}/H7aY53mY1hgaSURwXj3ZVirwNSifExwjgEL5GNtTqmEj`,
1823
+ [U.flare.id]: We("flare"),
1824
+ [U.cronosZkEvm.id]: We("cronos-zkevm")
1825
+ }, Zt = "0x0000000000000000000000000000000000000000", Jt = [
1826
+ Zt,
1827
+ "0x0000000000000000000000000000000000001010",
1828
+ "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
1829
+ "0x000000000000000000000000000000000000dEaD",
1830
+ "0x000000000000000000000000000000000000800A",
1831
+ "0x000000000000000000000000000000000000800a"
1832
+ ], qn = "115792089237316195423570985008687907853269984665640564039457584007913129639935", K = (e) => `${e.name}_${e.chainId}`, Xe = {
1833
+ [K(z.SushiArb)]: ["0x846F2B29ef314bF3D667981b4ffdADc5B858312a", "0x08c41f5D1C844061f6D952E25827eeAA576c6536"],
1834
+ [K(z.SushiBase)]: ["0x846F2B29ef314bF3D667981b4ffdADc5B858312a", "0x08c41f5D1C844061f6D952E25827eeAA576c6536"],
1835
+ [K(z.SushiEth)]: ["0xc55943Fa6509004B2903ED8F8ab7347BfC47D0bA", "0x08c41f5D1C844061f6D952E25827eeAA576c6536"],
1836
+ [K(z.PancakeSwap)]: ["0xb2BAFe188faD927240038cC4FfF2d771d8A58905", "0xE2a0c3b9aD19A18c4bBa7fffBe5bC1b0E58Db1CE"],
1837
+ [K(z.PancakeSwapArbitrum)]: ["0xE20167871dB616DdfFD0Fd870d9bC068C350DD1F", "0x807488ADAD033e95C438F998277bE654152594dc"],
1838
+ [K(z.PancakeSwapBase)]: ["0x10ed1F36e4eBE76E161c9AADDa20BE841bc0082c", "0x3A9df3eE209b802D0337383f5abCe3204d623588"],
1839
+ [K(z.PancakeSwapLinea)]: ["0x3A9df3eE209b802D0337383f5abCe3204d623588"],
1840
+ [K(z.QuickSwap)]: ["0x26D0ec4Be402BCE03AAa8aAf0CF67e9428ba54eF"],
1841
+ [K(z.Thena)]: ["0xc2aBC02acd77Bb2407efA22348dA9afC8B375290"],
1842
+ [K(z.Lynex)]: ["0x72e3e1fD5D2Ee2F1C2Eb695206D490a1D45C3835"],
1843
+ [K(z.DragonSwap)]: ["0x101e1B65Bb516FB5f4547C80BAe0b51f1b8D7a22"],
1844
+ [K(z.SpookySwapSonic)]: ["0xAd97B770ad64aE47fc7d64B3bD820dCDbF9ff7DA"],
1845
+ [K(z.SpookySwap)]: ["0x3924d62219483015f982b160d48c0fa5Fd436Cba"],
1846
+ [K(z.SwapX)]: ["0xE5012eBDe5e26EE3Ea41992154731a03023CF274"]
1847
+ }, ze = { unit: ne.Minutes, value: Qt }, jn = 0.25, Xn = "100", en = "RePermitWitnessTransferFrom", tn = {
1848
+ RePermitWitnessTransferFrom: [
1849
+ {
1850
+ name: "permitted",
1851
+ type: "TokenPermissions"
1852
+ },
1853
+ {
1854
+ name: "spender",
1855
+ type: "address"
1856
+ },
1857
+ {
1858
+ name: "nonce",
1859
+ type: "uint256"
1860
+ },
1861
+ {
1862
+ name: "deadline",
1863
+ type: "uint256"
1864
+ },
1865
+ {
1866
+ name: "witness",
1867
+ type: "Order"
1868
+ }
1869
+ ],
1870
+ Exchange: [
1871
+ {
1872
+ name: "adapter",
1873
+ type: "address"
1874
+ },
1875
+ {
1876
+ name: "ref",
1877
+ type: "address"
1878
+ },
1879
+ {
1880
+ name: "share",
1881
+ type: "uint32"
1882
+ },
1883
+ {
1884
+ name: "data",
1885
+ type: "bytes"
1886
+ }
1887
+ ],
1888
+ Input: [
1889
+ {
1890
+ name: "token",
1891
+ type: "address"
1892
+ },
1893
+ {
1894
+ name: "amount",
1895
+ type: "uint256"
1896
+ },
1897
+ {
1898
+ name: "maxAmount",
1899
+ type: "uint256"
1900
+ }
1901
+ ],
1902
+ Order: [
1903
+ {
1904
+ name: "reactor",
1905
+ type: "address"
1906
+ },
1907
+ {
1908
+ name: "executor",
1909
+ type: "address"
1910
+ },
1911
+ {
1912
+ name: "exchange",
1913
+ type: "Exchange"
1914
+ },
1915
+ {
1916
+ name: "swapper",
1917
+ type: "address"
1918
+ },
1919
+ {
1920
+ name: "nonce",
1921
+ type: "uint256"
1922
+ },
1923
+ {
1924
+ name: "deadline",
1925
+ type: "uint256"
1926
+ },
1927
+ {
1928
+ name: "chainid",
1929
+ type: "uint256"
1930
+ },
1931
+ {
1932
+ name: "exclusivity",
1933
+ type: "uint32"
1934
+ },
1935
+ {
1936
+ name: "epoch",
1937
+ type: "uint32"
1938
+ },
1939
+ {
1940
+ name: "slippage",
1941
+ type: "uint32"
1942
+ },
1943
+ {
1944
+ name: "freshness",
1945
+ type: "uint32"
1946
+ },
1947
+ {
1948
+ name: "input",
1949
+ type: "Input"
1950
+ },
1951
+ {
1952
+ name: "output",
1953
+ type: "Output"
1954
+ }
1955
+ ],
1956
+ Output: [
1957
+ { name: "token", type: "address" },
1958
+ { name: "limit", type: "uint256" },
1959
+ { name: "stop", type: "uint256" },
1960
+ { name: "recipient", type: "address" }
1961
+ ],
1962
+ TokenPermissions: [
1963
+ {
1964
+ name: "token",
1965
+ type: "address"
1966
+ },
1967
+ {
1968
+ name: "amount",
1969
+ type: "uint256"
1970
+ }
1971
+ ]
1972
+ }, Qn = "https://www.orbs.com/dtwap-and-dlimit-faq/", Yn = "https://www.orbs.com/dtwap-and-dlimit-faq/#dSLTP", Zn = "https://raw.githubusercontent.com/orbs-network/twap-ui/master/logo/orbslogo.svg", Jn = "https://www.orbs.com/assets/img/common/logo.svg", ea = "https://www.orbs.com/", ta = "https://www.orbs.com/dtwap-dlimit-disclaimer";
1973
+ var Qe = /* @__PURE__ */ ((e) => (e.FRESHNESS = "freshness", e.MIN_CHUNK_SIZE_USD = "minChunkSizeUsd", e.ENV = "env", e))(Qe || {});
1974
+ const na = "-5", aa = "10", sa = "-10", ra = "5", nn = {
1975
+ [le.LYNEX]: [U.linea.id],
1976
+ [le.QUICKSWAP]: [U.poly.id, U.base.id],
1977
+ [le.NAMI]: [U.sei.id],
1978
+ [le.THENA]: [U.bsc.id],
1979
+ [le.SPOOKYSWAP]: [U.sonic.id],
1980
+ [le.YOWIE]: [U.monad.id]
1981
+ };
1982
+ function an(e) {
1983
+ 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.');
1984
+ }
1985
+ const sn = {
1986
+ 14: { dex: { spark: { type: "default:spark", adapter: "0xB18c633B6584A33E45a8840a759f56dF17117b1D", fee: "0xaeA8C3e1a129A77686E115b1a46D9aD8405F7D2b" } } },
1987
+ 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" } } },
1988
+ 137: { dex: { quick: { type: "paraswap:paraswap-v5", adapter: "0x023fD6848234f2655818705237F77F02215FEfe5", fee: "0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f" }, teafi: { type: "paraswap:paraswap-v5", adapter: "0xe95db7a60164B112C64cE67bA8587b1d4a0E0D29", fee: "0x04Ff96e2c4D62b5771795d307AD679a25b3D2D50" } } },
1989
+ 143: { dex: { yowie: { type: "default:openocean-v2", adapter: "0x18bc9533c3539073B9A9acF12b0AbF7cB73e0F1f", fee: "0x6AF3eE77A3A3257777F5649aFa611b4C7Fd975Ef" } } },
1990
+ 146: { dex: { spooky: { type: "default:magpie-v3", adapter: "0xdCee7FDdB932104329d528144Cd17A408722B7e2", fee: "0x840Df4684B35BC68BcdA3F6707A3c82A0D662f8b" }, swapx: { type: "default:openocean-v2", adapter: "0xecc733D6F6f2DEa341832D650E30822118884FEb", fee: "0x6E03f7BC0f141894612AA017796096399623895F" }, shadow: { type: "default:magpie-v3", adapter: "0x5f3E5F6ACCfc65243A01Da3E93b5A700285592C3", fee: "0xb9e3751fAF3187E1bC468E56a707a8A91754460e" } } },
1991
+ 1329: { dex: { dragon: { type: "default:dragon", adapter: "0x02d9d5882129241b67ec21Ebc2C86e1BE9BC9890", fee: "0x0dc1E0525202b32e89bA78ed55b1e5cEdB751334" }, nami: { type: "default:openocean-v2", adapter: "0x2D4A1237A98f8cb03C3C85960e859aA44036a306", fee: "0xeB58450e23632003f013568703F54446070E2E80" } } },
1992
+ 8453: { dex: { quick: { type: "default:kyber-v2", adapter: "0xc73F03c929A123Ee2f3A98EC18BB240f03980AE5", fee: "0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f" } } },
1993
+ 42161: { dex: { arbidex: { type: "default:odos-v2", adapter: "0xa734b32151108139e48dCA06eE721538d90A9Ef6", fee: "0xa0c11852f8A44e32F9EC10AD25986A53842f72Ca" }, ramses: { type: "paraswap:paraswap-v5", adapter: "0x023fD6848234f2655818705237F77F02215FEfe5", fee: "0xB5BaCB60ECDa0bEF809B2A26eC9B4B926835D7af" }, omni: { type: "paraswap:paraswap-v5", adapter: "0xa1baE146161223cd9dCa7137F68eb385934130BE", fee: "0xba5291526c30B097E9F1Fd1Be301E2ab6E0782aa" }, chronos: { type: "default:odos-v2", adapter: "0x4Ff90F32aceD08b3e3257B018EA495Fd1Bfe4455", fee: "0x5729af83240EFecAa18eafaAE82961c2DD045Dbe" } } },
1994
+ 43114: { dex: { blackhole: { type: "default:kyber-v2", adapter: "0x426ec4bc0d58B80959CDE77576a1942dd40592Fa", fee: "0x7f8B62520D9B5DA0ED517cc36e8dcb2a356f1928" } } },
1995
+ 59144: { dex: { lynex: { type: "default:openocean", adapter: "0x4FF6A97A67fe395212f168f011D71fE79E4396f2", fee: "0xcb36ed1B1BfAD8F7FC9651f52d21f04A68677423" } } },
1996
+ 80094: { dex: { kodiak: { type: "default:kodiak", adapter: "0xBbaa527Aac00b1Ee9A3909D4D8c4447630E29B1F", fee: "0xBA47Ec15aFbCF6e7e9F52900632049530bB6bAe4" } } },
1997
+ "*": { 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" } }
1998
+ };
1999
+ var Oe, $e;
2000
+ function rn() {
2001
+ if ($e) return Oe;
2002
+ $e = 1;
2003
+ const e = sn, a = (u) => an(`./out/${u}.sol/${u}.json`).abi, d = () => ({
2004
+ wm: a("WM"),
2005
+ repermit: a("RePermit"),
2006
+ reactor: a("OrderReactor"),
2007
+ executor: a("Executor"),
2008
+ refinery: a("Refinery"),
2009
+ adapter: a("DefaultDexAdapter")
2010
+ });
2011
+ function f(u, b) {
2012
+ if (!u || !(b != null && b.trim())) return;
2013
+ const { dex: A, ...g } = e["*"] ?? {}, C = e[u];
2014
+ if (!C) return;
2015
+ const { dex: E, ...O } = C, F = E == null ? void 0 : E[b];
2016
+ if (F)
2017
+ return { ...g, ...O, ...F };
23
2018
  }
24
- getConfig() {
25
- return { ...this.config };
2019
+ return Oe = { config: f, abis: d }, Oe;
2020
+ }
2021
+ var dn = rn();
2022
+ const ia = (e, a, d) => {
2023
+ if (!e || !a || !d) return;
2024
+ const f = x(e).times(a), u = x(10).pow(d);
2025
+ return f.div(u).toFixed(0);
2026
+ }, da = (e, a, d, f) => {
2027
+ if (d || !f || !e || !a) return x(0).toString();
2028
+ const u = x(e).times(x(a)), b = x(10).pow(f), A = u.div(b);
2029
+ return x.max(1, A).integerValue(x.ROUND_FLOOR).toFixed(0);
2030
+ }, pa = (e, a, d, f) => {
2031
+ if (e === q.TWAP || e === q.LIMIT)
2032
+ return "0";
2033
+ if (!f || !a || !d) return;
2034
+ const u = x(a).times(x(d)), b = x(10).pow(f), A = u.div(b);
2035
+ return x.max(1, A).integerValue(x.ROUND_FLOOR).toFixed(0) || "0";
2036
+ }, oa = (e, a, d, f) => {
2037
+ const u = ue(d) * 2 * a, b = Kt(u);
2038
+ return f || (e === q.LIMIT ? { unit: ne.Days, value: 7 } : e === q.STOP_LOSS || e === q.TAKE_PROFIT ? { unit: ne.Days, value: 1 } : { unit: b, value: Number(x(u / b).toFixed(2)) });
2039
+ }, ua = (e, a, d) => a !== q.TWAP ? 1 : d !== void 0 ? d : e, ca = (e, a, d, f) => {
2040
+ if (!a || !d || !f) return 1;
2041
+ const b = x(d).times(a).div(f).integerValue(x.ROUND_FLOOR).toNumber(), A = Math.floor(he / 2 / ue(e));
2042
+ return Math.max(1, Math.min(b, A));
2043
+ }, la = (e) => Ye(e) / 1e3 / 60, ya = (e, a) => e + ue(a) + 6e4, Ye = (e) => e.bidDelaySeconds * 1e3 * 2, ma = (e, a) => !e || !a ? "0" : x(e).div(a).integerValue(x.ROUND_FLOOR).toFixed(0), fa = (e, a) => ({
2044
+ isError: !(e.unit === ze.unit && e.value === ze.value) && ue(e) * a > he,
2045
+ value: Math.floor(he / a)
2046
+ }), ha = (e = "", a = "", d) => {
2047
+ if (d === q.STOP_LOSS)
2048
+ return {
2049
+ isError: x(a || 0).gte(x(e || 0)),
2050
+ value: e
2051
+ };
2052
+ }, ba = (e = "", a = "", d) => {
2053
+ if (d === q.TAKE_PROFIT)
2054
+ return {
2055
+ isError: x(a || 0).lte(x(e || 0)),
2056
+ value: e
2057
+ };
2058
+ }, Ta = (e = "", a = "", d = !1, f) => {
2059
+ if (!d && f === q.STOP_LOSS)
2060
+ return {
2061
+ isError: x(a || 0).gte(x(e || 0)),
2062
+ value: e
2063
+ };
2064
+ }, Aa = (e = "", a = "", d = !1, f) => {
2065
+ if (!d && f === q.TAKE_PROFIT)
2066
+ return {
2067
+ isError: x(a || 0).gte(x(e || 0)),
2068
+ value: e
2069
+ };
2070
+ }, ga = (e, a) => e === q.STOP_LOSS || e === q.TAKE_PROFIT ? {
2071
+ isError: ue(a) > 5184e6,
2072
+ value: 5184e6
2073
+ } : {
2074
+ isError: ue(a) > he,
2075
+ // 365 days
2076
+ value: he
2077
+ }, xa = (e) => ({
2078
+ isError: ue(e) < Ve,
2079
+ value: Ve
2080
+ }), Ea = (e) => ({
2081
+ isError: ue(e) < _e,
2082
+ value: _e
2083
+ }), wa = (e, a, d) => ({
2084
+ isError: x(a || 0).multipliedBy(e || 0).isLessThan(d),
2085
+ value: d
2086
+ }), Ca = (e, a, d) => ({
2087
+ isError: d === q.TWAP && x(e).isGreaterThan(a),
2088
+ value: a
2089
+ }), Fa = (e, a) => {
2090
+ var d;
2091
+ try {
2092
+ if (!e || !a) throw new Error("Invalid chainId or _dex");
2093
+ const f = (d = Object.entries(z).find(([g, C]) => C.chainId === e && g.toLowerCase().indexOf(a.toLowerCase()) >= 0)) == null ? void 0 : d[1], { abi: u, ...b } = dn.config(e, a);
2094
+ return {
2095
+ ...b,
2096
+ partner: a,
2097
+ twapConfig: f
2098
+ };
2099
+ } catch {
2100
+ return;
26
2101
  }
2102
+ }, ka = ({
2103
+ chainId: e,
2104
+ srcToken: a,
2105
+ dstToken: d,
2106
+ srcAmount: f,
2107
+ deadlineMillis: u,
2108
+ fillDelayMillis: b,
2109
+ slippage: A,
2110
+ account: g,
2111
+ srcAmountPerTrade: C,
2112
+ dstMinAmountPerTrade: E,
2113
+ triggerAmountPerTrade: O,
2114
+ config: F
2115
+ }) => {
2116
+ const D = Date.now().toString(), R = parseInt((b / 1e3).toFixed(0)), _ = Gt(u / 1e3), ye = qe(Qe.FRESHNESS), re = ye ? parseInt(ye) : 60, me = {
2117
+ permitted: {
2118
+ token: a,
2119
+ amount: f
2120
+ },
2121
+ spender: F.reactor,
2122
+ nonce: D,
2123
+ deadline: _,
2124
+ witness: {
2125
+ reactor: F.reactor,
2126
+ executor: F.executor,
2127
+ exchange: {
2128
+ adapter: F.adapter,
2129
+ ref: F.fee,
2130
+ share: 0,
2131
+ data: "0x"
2132
+ },
2133
+ swapper: g,
2134
+ nonce: D,
2135
+ deadline: _,
2136
+ chainid: e,
2137
+ exclusivity: 0,
2138
+ epoch: R,
2139
+ slippage: A,
2140
+ freshness: re,
2141
+ input: {
2142
+ token: a,
2143
+ amount: C,
2144
+ maxAmount: f
2145
+ },
2146
+ output: {
2147
+ token: d,
2148
+ limit: E || "0",
2149
+ stop: !O || x(O || 0).isZero() ? "0" : O,
2150
+ recipient: g
2151
+ }
2152
+ }
2153
+ };
2154
+ return {
2155
+ domain: {
2156
+ name: "RePermit",
2157
+ version: "1",
2158
+ chainId: e,
2159
+ verifyingContract: F.repermit
2160
+ },
2161
+ order: me,
2162
+ types: tn,
2163
+ primaryType: en
2164
+ };
2165
+ }, pn = "0.0.6", on = {
2166
+ version: pn
2167
+ }, un = 0.7, cn = `https://bi.orbs.network/putes/twap-ui-${un}`, Ze = on.version;
2168
+ let Pe = "unknown";
2169
+ function Da(e) {
2170
+ Pe = e;
27
2171
  }
28
- function f(e) {
29
- return new r(e);
2172
+ function ve() {
2173
+ const e = Math.random().toString(36).substring(2, 16), a = Math.random().toString(36).substring(2, 16), d = Date.now().toString(36);
2174
+ return `id_${e + a + d}`;
2175
+ }
2176
+ const ln = (e, a, d) => {
2177
+ var f, u, b, A, g, C, E, O, F;
2178
+ return {
2179
+ spotVersion: Ze,
2180
+ partner: e.partner,
2181
+ adapter: e.adapter,
2182
+ cosigner: e.cosigner,
2183
+ executor: e.executor,
2184
+ fee: e.fee,
2185
+ reactor: e.reactor,
2186
+ refinery: e.refinery,
2187
+ repermit: e.repermit,
2188
+ router: e.router,
2189
+ type: e.type,
2190
+ wm: e.wm,
2191
+ chainName: ((f = e.twapConfig) == null ? void 0 : f.chainName) || "",
2192
+ chainId: d || 0,
2193
+ twapVersion: ((u = e.twapConfig) == null ? void 0 : u.twapVersion) || 0,
2194
+ twapAddress: ((b = e.twapConfig) == null ? void 0 : b.twapAddress) || "",
2195
+ lensAddress: ((A = e.twapConfig) == null ? void 0 : A.lensAddress) || "",
2196
+ bidDelaySeconds: ((g = e.twapConfig) == null ? void 0 : g.bidDelaySeconds) || 0,
2197
+ minChunkSizeUsd: a,
2198
+ name: ((C = e.twapConfig) == null ? void 0 : C.name) || "",
2199
+ exchangeAddress: ((E = e.twapConfig) == null ? void 0 : E.exchangeAddress) || "",
2200
+ exchangeType: ((O = e.twapConfig) == null ? void 0 : O.exchangeType) || "",
2201
+ pathfinderKey: ((F = e.twapConfig) == null ? void 0 : F.pathfinderKey) || ""
2202
+ };
2203
+ }, He = async (e) => {
2204
+ try {
2205
+ await fetch(cn, {
2206
+ method: "POST",
2207
+ headers: {
2208
+ Accept: "application/json",
2209
+ "Content-Type": "application/json"
2210
+ },
2211
+ body: JSON.stringify(e)
2212
+ }).then();
2213
+ } catch (a) {
2214
+ console.error("Failed to send BI", a);
2215
+ }
2216
+ };
2217
+ class yn {
2218
+ constructor() {
2219
+ Te(this, "timeout");
2220
+ Te(this, "config");
2221
+ Te(this, "data", {
2222
+ _id: ve()
2223
+ });
2224
+ }
2225
+ async updateAndSend(a = {}, d = !1, f) {
2226
+ try {
2227
+ this.data = {
2228
+ ...this.data,
2229
+ ...a
2230
+ }, d ? (await He(this.data), f == null || f()) : (clearTimeout(this.timeout), this.timeout = setTimeout(() => {
2231
+ He(this.data), f == null || f();
2232
+ }, 1e3));
2233
+ } catch (u) {
2234
+ console.error("Failed to update and send BI", u);
2235
+ }
2236
+ }
2237
+ onCancelOrderRequest(a, d) {
2238
+ this.updateAndSend({
2239
+ cancelOrderIdsV1: d === 1 ? a : void 0,
2240
+ cancelOrderIdsV2: d === 2 ? a : void 0,
2241
+ action: "cancel order",
2242
+ cancelOrderSuccess: !1,
2243
+ cancelOrderTxHash: void 0,
2244
+ actionError: void 0
2245
+ });
2246
+ }
2247
+ onCancelOrderSuccess(a) {
2248
+ this.updateAndSend({
2249
+ cancelOrderTxHash: a,
2250
+ cancelOrderSuccess: !0
2251
+ });
2252
+ }
2253
+ onCancelOrderError(a) {
2254
+ this.onTxError(a);
2255
+ }
2256
+ onWrapSuccess(a) {
2257
+ this.updateAndSend({
2258
+ wrapTxHash: a
2259
+ });
2260
+ }
2261
+ onWrapRequest() {
2262
+ this.updateAndSend({
2263
+ action: "wrap"
2264
+ });
2265
+ }
2266
+ onWrapError(a) {
2267
+ this.onTxError(a);
2268
+ }
2269
+ onApproveRequest() {
2270
+ this.updateAndSend({
2271
+ action: "approve"
2272
+ });
2273
+ }
2274
+ onApproveSuccess(a) {
2275
+ this.updateAndSend({
2276
+ approvalTxHash: a
2277
+ });
2278
+ }
2279
+ onApproveError(a) {
2280
+ this.onTxError(a);
2281
+ }
2282
+ onTxError(a) {
2283
+ var f;
2284
+ const d = ((f = a == null ? void 0 : a.message) == null ? void 0 : f.toLowerCase()) || (a == null ? void 0 : a.toLowerCase());
2285
+ this.updateAndSend({ actionError: d });
2286
+ }
2287
+ onRequestOrder({
2288
+ account: a,
2289
+ chainId: d,
2290
+ module: f,
2291
+ srcToken: u,
2292
+ dstToken: b,
2293
+ fromTokenAmount: A,
2294
+ srcChunkAmount: g,
2295
+ minDstAmountOutPerTrade: C = "",
2296
+ triggerPricePerTrade: E = "",
2297
+ deadline: O,
2298
+ fillDelay: F,
2299
+ slippage: D,
2300
+ isMarketOrder: R
2301
+ }) {
2302
+ const _ = x(A).div(g).integerValue(x.ROUND_FLOOR).toNumber();
2303
+ this.updateAndSend({
2304
+ toTokenAddress: b.address,
2305
+ toTokenSymbol: b.symbol,
2306
+ fromTokenAddress: u.address,
2307
+ fromTokenSymbol: u.symbol,
2308
+ fromTokenAmount: A,
2309
+ chunksAmount: _,
2310
+ srcChunkAmount: g,
2311
+ minDstAmountOutPerTrade: C,
2312
+ triggerPricePerTrade: E,
2313
+ deadline: O,
2314
+ fillDelay: F,
2315
+ slippage: D,
2316
+ chainId: d,
2317
+ walletAddress: a,
2318
+ module: f,
2319
+ orderType: R ? "market" : "limit",
2320
+ actionError: void 0
2321
+ });
2322
+ }
2323
+ onSignOrderRequest(a) {
2324
+ this.updateAndSend({
2325
+ action: "sign order",
2326
+ order: a
2327
+ });
2328
+ }
2329
+ onSignOrderError(a) {
2330
+ this.onTxError(a);
2331
+ }
2332
+ onSignOrderSuccess(a) {
2333
+ this.updateAndSend({
2334
+ action: "sign order",
2335
+ signature: a
2336
+ });
2337
+ }
2338
+ init(a, d, f) {
2339
+ var u;
2340
+ this.config = a, f !== ((u = this.data) == null ? void 0 : u.chainId) && (this.data = {
2341
+ _id: ve(),
2342
+ action: "module-import",
2343
+ uiVersion: Pe,
2344
+ ...ln(a, d, f),
2345
+ origin: window.location.origin
2346
+ }, this.updateAndSend(this.data));
2347
+ }
2348
+ onCreateOrderError(a) {
2349
+ this.onTxError(a);
2350
+ }
2351
+ onCreateOrderRequest() {
2352
+ this.updateAndSend({
2353
+ action: "create order"
2354
+ });
2355
+ }
2356
+ async onCreateOrderSuccess(a) {
2357
+ this.updateAndSend(
2358
+ {
2359
+ orderHash: a,
2360
+ orderSuccess: !0
2361
+ },
2362
+ void 0,
2363
+ () => {
2364
+ this.data = {
2365
+ _id: ve(),
2366
+ action: "reset",
2367
+ uiVersion: Pe,
2368
+ origin: this.data.origin,
2369
+ spotVersion: Ze,
2370
+ partner: this.data.partner,
2371
+ adapter: this.data.adapter,
2372
+ cosigner: this.data.cosigner,
2373
+ executor: this.data.executor,
2374
+ fee: this.data.fee,
2375
+ reactor: this.data.reactor,
2376
+ refinery: this.data.refinery,
2377
+ repermit: this.data.repermit,
2378
+ router: this.data.router,
2379
+ type: this.data.type,
2380
+ wm: this.data.wm,
2381
+ chainName: this.data.chainName || "",
2382
+ chainId: this.data.chainId || 0,
2383
+ twapVersion: this.data.twapVersion || 0,
2384
+ twapAddress: this.data.twapAddress || "",
2385
+ lensAddress: this.data.lensAddress || "",
2386
+ bidDelaySeconds: this.data.bidDelaySeconds || 0,
2387
+ minChunkSizeUsd: this.data.minChunkSizeUsd || 0,
2388
+ name: this.data.name || "",
2389
+ exchangeAddress: this.data.exchangeAddress || "",
2390
+ exchangeType: this.data.exchangeType || "",
2391
+ pathfinderKey: this.data.pathfinderKey || ""
2392
+ };
2393
+ }
2394
+ );
2395
+ }
2396
+ onLoad() {
2397
+ this.updateAndSend({
2398
+ action: "module-import",
2399
+ origin: window.location.origin
2400
+ });
2401
+ }
2402
+ }
2403
+ const Ie = new yn(), mn = (e) => {
2404
+ var u;
2405
+ const a = x(e.order.witness.output.limit || 0).gt(1), d = x(e.order.witness.output.stop || 0).gt(0), f = ((u = e.metadata.chunks) == null ? void 0 : u.length) || x(e.order.witness.input.maxAmount).div(x(e.order.witness.input.amount)).toNumber();
2406
+ return d && a ? j.TRIGGER_PRICE_LIMIT : d ? j.TRIGGER_PRICE_MARKET : !a && f <= 1 ? j.TWAP_MARKET : f >= 1 && a ? j.TWAP_LIMIT : a ? j.LIMIT : j.TWAP_MARKET;
2407
+ }, fn = (e) => {
2408
+ var u;
2409
+ const a = ((u = e.metadata.chunks) == null ? void 0 : u.filter((b) => b.status === "success").length) || 0, d = e.metadata.expectedChunks || 0, f = x(a).dividedBy(d).toNumber();
2410
+ return f >= 0.99 ? 100 : f <= 0 ? 0 : Number((f * 100).toFixed(2));
2411
+ }, hn = ["pending", "eligible"], bn = (e, a) => e.metadata.status === "completed" || a >= 99 ? se.Completed : hn.includes(e.metadata.status) ? se.Open : e.metadata.description.toLowerCase() === "cancelled by contract" ? se.Canceled : se.Expired, Je = (e) => {
2412
+ var u, b;
2413
+ const a = fn(e), d = Number(e.order.witness.output.limit) === 1 ? "" : e.order.witness.output.limit, f = e.metadata.expectedChunks || 1;
2414
+ return {
2415
+ id: e.hash,
2416
+ hash: e.hash,
2417
+ version: 2,
2418
+ type: mn(e),
2419
+ maker: e.order.witness.swapper,
2420
+ progress: a,
2421
+ srcAmountFilled: ((u = e.metadata.chunks) == null ? void 0 : u.reduce((A, g) => A.plus(g.inAmount), new x(0)).toString()) || "",
2422
+ dstAmountFilled: ((b = e.metadata.chunks) == null ? void 0 : b.reduce((A, g) => A.plus(g.outAmount), new x(0)).toString()) || "",
2423
+ dollarValueInFilled: "",
2424
+ dollarValueOutFilled: "",
2425
+ feesFilled: "",
2426
+ fills: [],
2427
+ srcTokenAddress: e.order.witness.input.token,
2428
+ dstTokenAddress: e.order.witness.output.token,
2429
+ orderDollarValueIn: "",
2430
+ fillDelay: e.order.witness.epoch,
2431
+ deadline: Number(e.order.deadline) * 1e3,
2432
+ createdAt: new Date(e.timestamp).getTime(),
2433
+ srcAmount: e.order.witness.input.maxAmount,
2434
+ dstMinAmountPerTrade: d,
2435
+ triggerPricePerTrade: x(e.order.witness.output.stop || 0).isZero() ? "" : e.order.witness.output.stop,
2436
+ dstMinAmountTotal: x(d).multipliedBy(f).toString(),
2437
+ srcAmountPerTrade: e.order.witness.input.amount,
2438
+ txHash: "",
2439
+ totalTradesAmount: f,
2440
+ isMarketPrice: !1,
2441
+ chainId: e.order.witness.chainid,
2442
+ filledOrderTimestamp: 0,
2443
+ status: bn(e, a),
2444
+ rawOrder: e
2445
+ };
2446
+ }, Tn = async ({ chainId: e, signal: a, account: d }) => d ? (await (await fetch(`${je()}/orders?swapper=${d}&chainId=${e}`, {
2447
+ signal: a
2448
+ })).json()).orders.map(Je) : [], Sa = async (e, a) => {
2449
+ try {
2450
+ const d = {
2451
+ signature: a,
2452
+ order: e,
2453
+ status: "pending"
2454
+ };
2455
+ console.log("body", d), Ie.onCreateOrderRequest();
2456
+ const u = await (await fetch(`${je()}/orders/new`, {
2457
+ method: "POST",
2458
+ body: JSON.stringify(d)
2459
+ })).json();
2460
+ if (!u.success)
2461
+ throw new Error(`error:${u.message}, code:${u.code}`);
2462
+ const b = Je(u.signedOrder);
2463
+ return Ie.onCreateOrderSuccess(b.id), b;
2464
+ } catch (d) {
2465
+ throw Ie.onCreateOrderError(d), console.error(d), d;
2466
+ }
2467
+ }, pe = (e, a) => e && e.length ? e.map(a || ((d) => `${d}`)) : void 0, An = (e) => {
2468
+ if (e)
2469
+ return Yt[e];
2470
+ }, Me = async ({
2471
+ chainId: e,
2472
+ buildQuery: a,
2473
+ extractResults: d,
2474
+ signal: f,
2475
+ retries: u = 1,
2476
+ limit: b = 1e3,
2477
+ page: A
2478
+ }) => {
2479
+ const g = An(e);
2480
+ if (!g) throw new kn();
2481
+ const C = async (F) => {
2482
+ let D = 0;
2483
+ for (; D <= u; )
2484
+ try {
2485
+ const R = await fetch(g, {
2486
+ method: "POST",
2487
+ body: JSON.stringify({ query: F }),
2488
+ signal: f,
2489
+ headers: { "Content-Type": "application/json" }
2490
+ });
2491
+ if (!R.ok) throw new Error(`HTTP error: ${R.status}`);
2492
+ const _ = await R.json();
2493
+ if (_.errors)
2494
+ throw new Error(_.errors[0].message);
2495
+ return d(_);
2496
+ } catch (R) {
2497
+ if (D === u) throw R;
2498
+ await new Promise((_) => setTimeout(_, 500 * 2 ** D)), D++;
2499
+ }
2500
+ return [];
2501
+ };
2502
+ let E = 0;
2503
+ const O = [];
2504
+ if (A !== void 0) {
2505
+ const F = a(A, b);
2506
+ try {
2507
+ return await C(F);
2508
+ } catch {
2509
+ console.warn(`Page ${A} failed, retrying one final time...`);
2510
+ try {
2511
+ return await C(F);
2512
+ } catch {
2513
+ return [];
2514
+ }
2515
+ }
2516
+ }
2517
+ for (; ; ) {
2518
+ const F = a(E, b);
2519
+ let D;
2520
+ try {
2521
+ D = await C(F);
2522
+ } catch {
2523
+ console.warn(`Page ${E} failed, retrying one final time...`);
2524
+ try {
2525
+ D = await C(F);
2526
+ } catch {
2527
+ return O;
2528
+ }
2529
+ }
2530
+ if (O.push(...D), D.length < b) break;
2531
+ E++;
2532
+ }
2533
+ return O;
2534
+ }, et = (e) => {
2535
+ const a = {
2536
+ dstAmountOut: x(0),
2537
+ srcAmountIn: x(0),
2538
+ dollarValueIn: x(0),
2539
+ dollarValueOut: x(0),
2540
+ dexFee: x(0)
2541
+ }, d = e.reduce(
2542
+ (f, u) => ({
2543
+ dstAmountOut: f.dstAmountOut.plus(x(u.dstAmountOut || 0)),
2544
+ srcAmountIn: f.srcAmountIn.plus(x(u.srcAmountIn || 0)),
2545
+ dollarValueIn: f.dollarValueIn.plus(x(u.dollarValueIn || 0)),
2546
+ dollarValueOut: f.dollarValueOut.plus(x(u.dollarValueOut || 0)),
2547
+ dexFee: f.dexFee.plus(x(u.dstFee || 0))
2548
+ }),
2549
+ a
2550
+ );
2551
+ return {
2552
+ filledDstAmount: d.dstAmountOut.toFixed(),
2553
+ filledSrcAmount: d.srcAmountIn.toFixed(),
2554
+ filledDollarValueIn: d.dollarValueIn.toFixed(),
2555
+ filledDollarValueOut: d.dollarValueOut.toFixed(),
2556
+ dexFee: d.dexFee.toFixed()
2557
+ };
2558
+ }, Ke = (e, a) => {
2559
+ const d = x(e || 0).gt(1);
2560
+ return !d && a === 1 ? j.TWAP_MARKET : a > 1 && d ? j.TWAP_LIMIT : d ? j.LIMIT : j.TWAP_MARKET;
2561
+ }, gn = (e) => e === j.TWAP_MARKET || e === j.TRIGGER_PRICE_MARKET, xn = (e, a, d, f) => {
2562
+ var _;
2563
+ const { filledDstAmount: u, filledSrcAmount: b, filledDollarValueIn: A, filledDollarValueOut: g, dexFee: C } = et(d || []), E = new x(e.ask_srcAmount || 0).div(e.ask_srcBidAmount).integerValue(x.ROUND_FLOOR).toNumber(), F = (d == null ? void 0 : d.length) === E ? (_ = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1]) == null ? void 0 : _.timestamp : void 0, D = tt(e.ask_srcAmount, b), R = Ke(e.ask_dstMinAmount, E);
2564
+ return {
2565
+ version: 1,
2566
+ id: e.Contract_id.toString(),
2567
+ hash: "",
2568
+ type: Ke(e.ask_dstMinAmount, E),
2569
+ srcTokenAddress: e.ask_srcToken,
2570
+ dstTokenAddress: e.ask_dstToken,
2571
+ exchangeAddress: e.exchange,
2572
+ twapAddress: e.twapAddress,
2573
+ maker: e.maker,
2574
+ progress: D,
2575
+ dstAmountFilled: d ? u : "",
2576
+ srcAmountFilled: d ? b : "",
2577
+ orderDollarValueIn: e.dollarValueIn,
2578
+ srcAmount: e.ask_srcAmount,
2579
+ dollarValueInFilled: d ? A : "",
2580
+ dollarValueOutFilled: d ? g : "",
2581
+ feesFilled: d ? C : "",
2582
+ dstMinAmountTotal: x(e.ask_dstMinAmount).multipliedBy(E).toString(),
2583
+ fills: d || [],
2584
+ fillDelay: e.ask_fillDelay,
2585
+ deadline: e.ask_deadline * 1e3,
2586
+ createdAt: new Date(e.timestamp).getTime(),
2587
+ dstMinAmountPerTrade: x(e.ask_dstMinAmount).eq(1) ? "" : e.ask_dstMinAmount,
2588
+ triggerPricePerTrade: "",
2589
+ srcAmountPerTrade: e.ask_srcBidAmount,
2590
+ txHash: e.transactionHash,
2591
+ totalTradesAmount: E,
2592
+ isMarketPrice: gn(R),
2593
+ chainId: a,
2594
+ filledOrderTimestamp: F || 0,
2595
+ status: f,
2596
+ rawOrder: e
2597
+ };
2598
+ }, En = (e) => {
2599
+ var F;
2600
+ if (!e) return "";
2601
+ const a = pe(e.accounts, (D) => `"${D.toLowerCase()}"`), d = pe(qt(e.configs), (D) => `"${D.toLowerCase()}"`), f = pe(e.inTokenSymbols, (D) => `"${D.toUpperCase()}"`), u = pe(e.outTokenSymbols, (D) => `"${D.toUpperCase()}"`), b = pe(e.inTokenAddresses, (D) => `"${D.toLowerCase()}"`), A = pe(e.outTokenAddresses, (D) => `"${D.toLowerCase()}"`), g = pe(e.transactionHashes, (D) => `"${D.toLowerCase()}"`), C = pe(e.orderIds, (D) => `"${D}"`), E = pe(
2602
+ (F = e.configs) == null ? void 0 : F.map((D) => D.twapAddress),
2603
+ (D) => `"${D.toLowerCase()}"`
2604
+ ), O = e.minDollarValueIn;
2605
+ return [
2606
+ d ? `exchange_in: [${d.join(", ")}]` : "",
2607
+ E ? `twapAddress_in: [${E.join(", ")}]` : "",
2608
+ a ? `maker_in: [${a.join(", ")}]` : "",
2609
+ g ? `transactionHash_in: [${g.join(", ")}]` : "",
2610
+ C ? `Contract_id_in: [${C.join(", ")}]` : "",
2611
+ O ? `dollarValueIn_gte: ${O}` : "",
2612
+ f ? `srcTokenSymbol_in: [${f.join(", ")}]` : "",
2613
+ u ? `dstTokenSymbol_in: [${u.join(", ")}]` : "",
2614
+ b ? `srcTokenAddress_in: [${b.join(", ")}]` : "",
2615
+ A ? `dstTokenAddress_in: [${A.join(", ")}]` : "",
2616
+ e != null && e.startDate ? `blockTimestamp_gte: ${e.startDate}` : "",
2617
+ e != null && e.endDate ? `blockTimestamp_lte: ${e.endDate}` : "",
2618
+ (e == null ? void 0 : e.orderType) === "limit" ? "ask_dstMinAmount_gt: 1" : "",
2619
+ (e == null ? void 0 : e.orderType) === "market" ? "ask_dstMinAmount_lte: 1" : ""
2620
+ ].filter(Boolean).join(", ");
2621
+ };
2622
+ async function wn({
2623
+ chainId: e,
2624
+ signal: a,
2625
+ page: d,
2626
+ limit: f,
2627
+ filters: u
2628
+ }) {
2629
+ const b = f || 1e3, A = En(u);
2630
+ return await Me({
2631
+ chainId: e,
2632
+ signal: a,
2633
+ limit: b,
2634
+ page: d,
2635
+ buildQuery: (C, E) => `
2636
+ {
2637
+ orderCreateds(
2638
+ ${A ? `where: { ${A} }` : ""},
2639
+ first: ${E},
2640
+ skip: ${C * E},
2641
+ orderBy: timestamp,
2642
+ orderDirection: desc,
2643
+ ) {
2644
+ id
2645
+ twapAddress
2646
+ Contract_id
2647
+ ask_bidDelay
2648
+ ask_data
2649
+ ask_deadline
2650
+ ask_dstMinAmount
2651
+ ask_dstToken
2652
+ ask_fillDelay
2653
+ ask_exchange
2654
+ ask_srcToken
2655
+ ask_srcBidAmount
2656
+ ask_srcAmount
2657
+ blockNumber
2658
+ blockTimestamp
2659
+ dex
2660
+ dollarValueIn
2661
+ dstTokenSymbol
2662
+ exchange
2663
+ maker
2664
+ srcTokenSymbol
2665
+ timestamp
2666
+ transactionHash
2667
+ }
2668
+ }
2669
+ `,
2670
+ extractResults: (C) => {
2671
+ var E;
2672
+ return ((E = C.data) == null ? void 0 : E.orderCreateds) || [];
2673
+ }
2674
+ });
2675
+ }
2676
+ const Cn = async ({ chainId: e, orders: a, signal: d }) => {
2677
+ if (a.length === 0) return [];
2678
+ const f = Re(a.map((g) => g.Contract_id.toString()));
2679
+ if (!f.length) return [];
2680
+ const b = `where: { twapId_in: [${f.map((g) => `"${g}"`).join(", ")}]}`;
2681
+ return await Me({
2682
+ chainId: e,
2683
+ signal: d,
2684
+ limit: 1e3,
2685
+ buildQuery: (g, C) => `
2686
+ {
2687
+ statusNews(
2688
+ first: ${C},
2689
+ skip: ${g * C},
2690
+ ${b}
2691
+ ) {
2692
+ twapId
2693
+ twapAddress
2694
+ status
2695
+ }
2696
+ }
2697
+ `,
2698
+ extractResults: (g) => {
2699
+ var C;
2700
+ return ((C = g.data) == null ? void 0 : C.statusNews) || [];
2701
+ }
2702
+ });
2703
+ };
2704
+ function Re(e) {
2705
+ return Array.from(new Set(e));
2706
+ }
2707
+ const Fn = async ({ chainId: e, orders: a, signal: d }) => {
2708
+ const f = Re(a.map((F) => F.Contract_id)), u = Re(a.map((F) => F.twapAddress)).filter(Boolean);
2709
+ if (f.length === 0) return [];
2710
+ const b = f.join(", "), A = u.map((F) => `"${F}"`).join(", "), g = u.length ? `twapAddress_in: [${A}]` : "", E = `where: { ${[`TWAP_id_in: [${b}]`, g].filter(Boolean).join(", ")} }`;
2711
+ return await Me({
2712
+ chainId: e,
2713
+ signal: d,
2714
+ limit: 1e3,
2715
+ buildQuery: (F, D) => `
2716
+ {
2717
+ orderFilleds(first: ${D}, orderBy: timestamp, skip: ${F * D}, ${E}) {
2718
+ id
2719
+ dstAmountOut
2720
+ dstFee
2721
+ srcFilledAmount
2722
+ twapAddress
2723
+ exchange
2724
+ TWAP_id
2725
+ srcAmountIn
2726
+ timestamp
2727
+ transactionHash
2728
+ dollarValueIn
2729
+ dollarValueOut
2730
+ }
2731
+ }
2732
+ `,
2733
+ extractResults: (F) => {
2734
+ var D;
2735
+ return (((D = F.data) == null ? void 0 : D.orderFilleds) || []).map((R) => ({
2736
+ ...R,
2737
+ timestamp: new Date(R.timestamp).getTime()
2738
+ }));
2739
+ }
2740
+ });
2741
+ };
2742
+ class kn extends Error {
2743
+ constructor() {
2744
+ super("No graph endpoint found"), this.name = "NoGraphEndpointError";
2745
+ }
30
2746
  }
2747
+ const Dn = async ({
2748
+ chainId: e,
2749
+ signal: a,
2750
+ page: d,
2751
+ limit: f,
2752
+ filters: u
2753
+ }) => {
2754
+ const b = await wn({ chainId: e, signal: a, page: d, limit: f, filters: u }), [A, g] = await Promise.all([Fn({ chainId: e, orders: b, signal: a }), Cn({ chainId: e, orders: b, signal: a })]);
2755
+ return b.map((E) => {
2756
+ const O = A == null ? void 0 : A.filter((F) => F.TWAP_id === Number(E.Contract_id) && xe(F.exchange, E.exchange) && xe(F.twapAddress, E.twapAddress));
2757
+ return xn(E, e, O, Sn(E, O || [], g));
2758
+ }).sort((E, O) => O.createdAt - E.createdAt);
2759
+ }, Sn = (e, a, d) => {
2760
+ var A;
2761
+ const f = (A = d == null ? void 0 : d.find((g) => g.twapId === e.Contract_id.toString() && xe(g.twapAddress, e.twapAddress))) == null ? void 0 : A.status, { filledSrcAmount: u } = et(a), b = tt(e.ask_srcAmount, u);
2762
+ return Bn(b, e.ask_deadline * 1e3, f);
2763
+ }, tt = (e, a) => {
2764
+ if (!a || !e) return 0;
2765
+ const d = x(a).dividedBy(e).toNumber();
2766
+ return d >= 0.99 ? 100 : d <= 0 ? 0 : Number((d * 100).toFixed(2));
2767
+ }, Bn = (e, a, d) => e === 100 ? se.Completed : d === "CANCELED" ? se.Canceled : d === "COMPLETED" ? se.Completed : a > Date.now() ? se.Open : se.Expired, Ba = async ({
2768
+ signal: e,
2769
+ page: a,
2770
+ chainId: d,
2771
+ limit: f,
2772
+ config: u,
2773
+ account: b
2774
+ }) => (await Promise.all([
2775
+ u ? Dn({ chainId: d, signal: e, page: a, limit: f, filters: { accounts: [b], configs: [u] } }) : Promise.resolve([]),
2776
+ Tn({ chainId: d, signal: e, account: b })
2777
+ ]).then(([C, E]) => [...C, ...E])).sort((C, E) => E.createdAt - C.createdAt);
31
2778
  export {
32
- r as Spot,
33
- f as createSpot
2779
+ z as Configs,
2780
+ ze as DEFAULT_FILL_DELAY,
2781
+ sa as DEFAULT_STOP_LOSS_LIMIT_PERCENTAGE,
2782
+ na as DEFAULT_STOP_LOSS_PERCENTAGE,
2783
+ ra as DEFAULT_TAKE_PROFIT_LIMIT_PERCENTAGE,
2784
+ aa as DEFAULT_TAKE_PROFIT_PERCENTAGE,
2785
+ ta as DISCLAIMER_URL,
2786
+ tn as EIP712_TYPES,
2787
+ Rn as ERC20_ABI,
2788
+ Xn as EXCLUSIVITY_OVERRIDE_BPS,
2789
+ In as EXECUTOR_ABI,
2790
+ jn as FEES,
2791
+ Pn as IWETH_ABI,
2792
+ Xe as LEGACY_EXCHANGES_MAP,
2793
+ Nn as LENS_ABI,
2794
+ he as MAX_ORDER_DURATION_MILLIS,
2795
+ Gn as MIN_CHUNKS,
2796
+ _e as MIN_FILL_DELAY_MILLIS,
2797
+ Qt as MIN_FILL_DELAY_MINUTES,
2798
+ Ve as MIN_ORDER_DURATION_MILLIS,
2799
+ q as Module,
2800
+ Zn as ORBS_LOGO,
2801
+ Jn as ORBS_LOGO_FALLBACK,
2802
+ Yn as ORBS_SLTP_FAQ_URL,
2803
+ Qn as ORBS_TWAP_FAQ_URL,
2804
+ ea as ORBS_WEBSITE_URL,
2805
+ se as OrderStatus,
2806
+ j as OrderType,
2807
+ nn as PartnerChains,
2808
+ le as Partners,
2809
+ Qe as QUERY_PARAMS,
2810
+ vn as REACTOR_ABI,
2811
+ _n as REPERMIT_ABI,
2812
+ en as REPERMIT_PRIMARY_TYPE,
2813
+ Kn as SUGGEST_CHUNK_VALUE,
2814
+ Yt as THE_GRAPH_ORDERS_API,
2815
+ Mn as TWAP_ABI,
2816
+ ne as TimeUnit,
2817
+ Ln as amountBN,
2818
+ Un as amountUi,
2819
+ Ie as analytics,
2820
+ ka as buildRePermitOrderData,
2821
+ xe as eqIgnoreCase,
2822
+ Ba as getAccountOrders,
2823
+ je as getApiEndpoint,
2824
+ ua as getChunks,
2825
+ Fa as getConfig,
2826
+ zn as getConfigByExchange,
2827
+ ya as getDeadline,
2828
+ ia as getDestTokenAmount,
2829
+ da as getDestTokenMinAmountPerChunk,
2830
+ oa as getDuration,
2831
+ Ye as getEstimatedDelayBetweenChunksMillis,
2832
+ Ca as getMaxChunksError,
2833
+ fa as getMaxFillDelayError,
2834
+ ga as getMaxOrderDurationError,
2835
+ ca as getMaxPossibleChunks,
2836
+ Ea as getMinFillDelayError,
2837
+ xa as getMinOrderDurationError,
2838
+ wa as getMinTradeSizeError,
2839
+ la as getMinimumDelayMinutes,
2840
+ Wn as getNetwork,
2841
+ $n as getOrderFillDelayMillis,
2842
+ Hn as getPartnerChains,
2843
+ K as getPartnerIdentifier,
2844
+ qe as getQueryParam,
2845
+ ma as getSrcTokenChunkAmount,
2846
+ Ta as getStopLossLimitPriceError,
2847
+ ha as getStopLossPriceError,
2848
+ Aa as getTakeProfitLimitPriceError,
2849
+ ba as getTakeProfitPriceError,
2850
+ pa as getTriggerPricePerChunk,
2851
+ Vn as isNativeAddress,
2852
+ qn as maxUint256,
2853
+ Jt as nativeTokenAddresses,
2854
+ U as networks,
2855
+ Da as setUIVersion,
2856
+ Sa as submitOrder,
2857
+ Zt as zeroAddress
34
2858
  };