@orbs-network/twap 1.6.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,8 +17,63 @@ export interface Config {
17
17
  exchangeContract: "UniswapV2Exchange" | "ParaswapExchange";
18
18
  pathfinderKey: Paraswap.OnlyDex;
19
19
  }
20
- export declare const SpiritSwapConfig: Config;
21
- export declare const SpookySwapConfig: Config;
20
+ export declare const ChainConfigs: {
21
+ eth: {
22
+ chainId: number;
23
+ twapAddress: string;
24
+ lensAddress: string;
25
+ bidDelaySeconds: number;
26
+ minChunkSizeUsd: number;
27
+ wToken: {
28
+ address: string;
29
+ decimals: number;
30
+ symbol: string;
31
+ logoUrl: string;
32
+ };
33
+ };
34
+ ftm: {
35
+ chainId: number;
36
+ twapAddress: string;
37
+ lensAddress: string;
38
+ bidDelaySeconds: number;
39
+ minChunkSizeUsd: number;
40
+ wToken: {
41
+ address: string;
42
+ decimals: number;
43
+ symbol: string;
44
+ logoUrl: string;
45
+ };
46
+ };
47
+ poly: {
48
+ chainId: number;
49
+ twapAddress: string;
50
+ lensAddress: string;
51
+ bidDelaySeconds: number;
52
+ minChunkSizeUsd: number;
53
+ wToken: {
54
+ address: string;
55
+ decimals: number;
56
+ symbol: string;
57
+ logoUrl: string;
58
+ };
59
+ };
60
+ avax: {
61
+ chainId: number;
62
+ twapAddress: string;
63
+ lensAddress: string;
64
+ bidDelaySeconds: number;
65
+ minChunkSizeUsd: number;
66
+ wToken: {
67
+ address: string;
68
+ decimals: number;
69
+ symbol: string;
70
+ logoUrl: string;
71
+ };
72
+ };
73
+ };
74
+ export declare const Configs: {
75
+ [integration: string]: Config;
76
+ };
22
77
  export declare const nativeTokenAddresses: string[];
23
78
  export declare const isNativeAddress: (address: string) => boolean;
24
79
  export declare const chainConfig: (chainId: number) => {
@@ -3,11 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.chainConfig = exports.isNativeAddress = exports.nativeTokenAddresses = exports.SpookySwapConfig = exports.SpiritSwapConfig = void 0;
6
+ exports.chainConfig = exports.isNativeAddress = exports.nativeTokenAddresses = exports.Configs = exports.ChainConfigs = void 0;
7
7
  const web3_candies_1 = require("@defi.org/web3-candies");
8
8
  const lodash_1 = __importDefault(require("lodash"));
9
9
  const paraswap_1 = require("./paraswap");
10
- const ChainConfigs = {
10
+ exports.ChainConfigs = {
11
11
  eth: {
12
12
  chainId: 1,
13
13
  twapAddress: "",
@@ -61,6 +61,10 @@ const ChainConfigs = {
61
61
  },
62
62
  },
63
63
  };
64
+ exports.Configs = {
65
+ SpiritSwap: Object.assign(Object.assign({}, exports.ChainConfigs.ftm), { partner: "SpiritSwap", exchangeAddress: "0xAd19179201be5A51D1cBd3bB2fC651BB05822404", exchangeContract: "ParaswapExchange", pathfinderKey: paraswap_1.Paraswap.OnlyDex.SpiritSwap }),
66
+ SpookySwap: Object.assign(Object.assign({}, exports.ChainConfigs.ftm), { partner: "SpookySwap", exchangeAddress: "0x37F427DA0D12Fe2C80aCa09EE08e7e92A1B2B114", exchangeContract: "UniswapV2Exchange", pathfinderKey: paraswap_1.Paraswap.OnlyDex.SpookySwap }),
67
+ };
64
68
  // export const UniswapV2Config: Config = {
65
69
  // ...ChainConfigs.eth,
66
70
  // partner: "UniswapV2",
@@ -76,8 +80,6 @@ const ChainConfigs = {
76
80
  // partner: "QuickSwap",
77
81
  // exchangeAddress: "0xeFE1B6096838949156e5130604434A2a13c68C68",
78
82
  // };
79
- exports.SpiritSwapConfig = Object.assign(Object.assign({}, ChainConfigs.ftm), { partner: "SpiritSwap", exchangeAddress: "0xAd19179201be5A51D1cBd3bB2fC651BB05822404", exchangeContract: "ParaswapExchange", pathfinderKey: paraswap_1.Paraswap.OnlyDex.SpiritSwap });
80
- exports.SpookySwapConfig = Object.assign(Object.assign({}, ChainConfigs.ftm), { partner: "SpookySwap", exchangeAddress: "0x37F427DA0D12Fe2C80aCa09EE08e7e92A1B2B114", exchangeContract: "UniswapV2Exchange", pathfinderKey: paraswap_1.Paraswap.OnlyDex.SpookySwap });
81
83
  exports.nativeTokenAddresses = [
82
84
  web3_candies_1.zeroAddress,
83
85
  "0x0000000000000000000000000000000000001010",
@@ -85,5 +87,5 @@ exports.nativeTokenAddresses = [
85
87
  ];
86
88
  const isNativeAddress = (address) => !!lodash_1.default.find(exports.nativeTokenAddresses, (a) => (0, web3_candies_1.eqIgnoreCase)(a, address));
87
89
  exports.isNativeAddress = isNativeAddress;
88
- const chainConfig = (chainId) => lodash_1.default.find(ChainConfigs, (c) => c.chainId === chainId);
90
+ const chainConfig = (chainId) => lodash_1.default.find(exports.ChainConfigs, (c) => c.chainId === chainId);
89
91
  exports.chainConfig = chainConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbs-network/twap",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/orbs-network/twap.git"