@pioneer-platform/uniswap-client 0.0.29 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/lib/constants/chainInfo.d.ts +2 -2
- package/lib/constants/chainInfo.js +40 -43
- package/lib/constants/chains.d.ts +20 -20
- package/lib/constants/chains.js +25 -26
- package/lib/constants/governance.js +13 -14
- package/lib/constants/lists.js +20 -28
- package/lib/constants/misc.d.ts +4 -5
- package/lib/constants/misc.js +2 -2
- package/lib/constants/networks.js +45 -46
- package/lib/constants/proposals/uniswap_grants_proposal_description.js +106 -1
- package/lib/constants/providers.d.ts +16 -15
- package/lib/constants/providers.js +23 -24
- package/lib/constants/routing.js +44 -61
- package/lib/constants/tokens.d.ts +49 -49
- package/lib/constants/tokens.js +133 -170
- package/lib/index.js +556 -877
- package/lib/routing/clientSideSmartOrderRouter.js +72 -121
- package/lib/routing/gas.js +63 -150
- package/lib/routing/types.d.ts +7 -7
- package/lib/routing/types.js +160 -264
- package/lib/routing/utils.js +141 -196
- package/lib/rpc/AppJsonRpcProvider.js +40 -131
- package/lib/rpc/ConfiguredJsonRpcProvider.d.ts +1 -1
- package/lib/rpc/ConfiguredJsonRpcProvider.js +8 -27
- package/lib/utils/contracts/getContract.js +6 -7
- package/lib/utils/transformSwapRouteToGetQuoteResult.js +24 -27
- package/lib/utils/uniswapData.d.ts +6 -6
- package/lib/utils/uniswapData.js +64 -142
- package/package.json +19 -19
- package/tsconfig.json +27 -8
- package/LICENSE +0 -674
- package/lib/constants/chains.test.d.ts +0 -1
- package/lib/constants/chains.test.js +0 -26
- package/lib/constants/localCurrencies.d.ts +0 -6
- package/lib/constants/localCurrencies.js +0 -94
- package/lib/constants/localCurrencyIcons.d.ts +0 -18
- package/lib/constants/localCurrencyIcons.js +0 -298
- package/lib/constants/routing.test.d.ts +0 -1
- package/lib/constants/routing.test.js +0 -32
- package/lib/constants/tokenLists/broken.tokenlist.json +0 -22
- package/lib/constants/tokenLogoLookup.d.ts +0 -8
- package/lib/constants/tokenLogoLookup.js +0 -48
- package/lib/constants/tokenSafety.js +0 -129
- package/lib/constants/tokenSafetyLookup.d.ts +0 -18
- package/lib/constants/tokenSafetyLookup.js +0 -66
- package/lib/constants/tokenSaftey.test.d.ts +0 -1
- package/lib/constants/tokenSaftey.test.js +0 -31
package/lib/utils/uniswapData.js
CHANGED
|
@@ -1,56 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
4
|
};
|
|
41
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
6
|
+
exports.FEE_AMOUNT = exports.USDC = exports.DAI = exports.WETH = exports.ETHER = void 0;
|
|
7
|
+
exports.getUniswapPools = getUniswapPools;
|
|
8
|
+
exports.getPair = getPair;
|
|
9
|
+
exports.getPool = getPool;
|
|
10
|
+
exports.buildTrade = buildTrade;
|
|
11
|
+
const jsbi_1 = __importDefault(require("jsbi"));
|
|
12
|
+
const ethers_1 = require("ethers");
|
|
13
|
+
const router_sdk_1 = require("@uniswap/router-sdk");
|
|
14
|
+
const v2_sdk_1 = require("@uniswap/v2-sdk");
|
|
15
|
+
const v3_sdk_1 = require("@uniswap/v3-sdk");
|
|
48
16
|
// import { SwapOptions } from '../../src'
|
|
49
|
-
|
|
50
|
-
|
|
17
|
+
const sdk_core_1 = require("@uniswap/sdk-core");
|
|
18
|
+
const UniswapV3Pool_json_1 = __importDefault(require("@uniswap/v3-core/artifacts/contracts/UniswapV3Pool.sol/UniswapV3Pool.json"));
|
|
51
19
|
// import { TEST_RECIPIENT_ADDRESS } from './addresses'
|
|
52
|
-
|
|
53
|
-
|
|
20
|
+
const V2_FACTORY = '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f';
|
|
21
|
+
const V2_ABI = [
|
|
54
22
|
{
|
|
55
23
|
constant: true,
|
|
56
24
|
inputs: [],
|
|
@@ -77,103 +45,58 @@ var V2_ABI = [
|
|
|
77
45
|
type: 'function',
|
|
78
46
|
},
|
|
79
47
|
];
|
|
80
|
-
|
|
48
|
+
const FORK_BLOCK = 16075500;
|
|
81
49
|
exports.ETHER = sdk_core_1.Ether.onChain(1);
|
|
82
50
|
exports.WETH = new sdk_core_1.Token(1, '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', 18, 'WETH', 'Wrapped Ether');
|
|
83
51
|
exports.DAI = new sdk_core_1.Token(1, '0x6B175474E89094C44Da98b954EedeAC495271d0F', 18, 'DAI', 'dai');
|
|
84
52
|
exports.USDC = new sdk_core_1.Token(1, '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', 6, 'USDC', 'USD Coin');
|
|
85
53
|
exports.FEE_AMOUNT = v3_sdk_1.FeeAmount.MEDIUM;
|
|
86
|
-
function getUniswapPools(forkBlock) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
case 3:
|
|
101
|
-
WETH_USDC_V3 = _a.sent();
|
|
102
|
-
return [4 /*yield*/, getPool(exports.WETH, exports.USDC, v3_sdk_1.FeeAmount.LOW, fork)];
|
|
103
|
-
case 4:
|
|
104
|
-
WETH_USDC_V3_LOW_FEE = _a.sent();
|
|
105
|
-
return [4 /*yield*/, getPool(exports.USDC, exports.DAI, v3_sdk_1.FeeAmount.LOW, fork)];
|
|
106
|
-
case 5:
|
|
107
|
-
USDC_DAI_V3 = _a.sent();
|
|
108
|
-
return [2 /*return*/, {
|
|
109
|
-
WETH_USDC_V2: WETH_USDC_V2,
|
|
110
|
-
USDC_DAI_V2: USDC_DAI_V2,
|
|
111
|
-
WETH_USDC_V3: WETH_USDC_V3,
|
|
112
|
-
WETH_USDC_V3_LOW_FEE: WETH_USDC_V3_LOW_FEE,
|
|
113
|
-
USDC_DAI_V3: USDC_DAI_V3,
|
|
114
|
-
}];
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
});
|
|
54
|
+
async function getUniswapPools(forkBlock) {
|
|
55
|
+
const fork = forkBlock ?? FORK_BLOCK;
|
|
56
|
+
const WETH_USDC_V2 = await getPair(exports.WETH, exports.USDC, fork);
|
|
57
|
+
const USDC_DAI_V2 = await getPair(exports.USDC, exports.DAI, fork);
|
|
58
|
+
const WETH_USDC_V3 = await getPool(exports.WETH, exports.USDC, exports.FEE_AMOUNT, fork);
|
|
59
|
+
const WETH_USDC_V3_LOW_FEE = await getPool(exports.WETH, exports.USDC, v3_sdk_1.FeeAmount.LOW, fork);
|
|
60
|
+
const USDC_DAI_V3 = await getPool(exports.USDC, exports.DAI, v3_sdk_1.FeeAmount.LOW, fork);
|
|
61
|
+
return {
|
|
62
|
+
WETH_USDC_V2,
|
|
63
|
+
USDC_DAI_V2,
|
|
64
|
+
WETH_USDC_V3,
|
|
65
|
+
WETH_USDC_V3_LOW_FEE,
|
|
66
|
+
USDC_DAI_V3,
|
|
67
|
+
};
|
|
118
68
|
}
|
|
119
|
-
exports.getUniswapPools = getUniswapPools;
|
|
120
69
|
function getProvider() {
|
|
121
70
|
return new ethers_1.ethers.providers.JsonRpcProvider(process.env['FORK_URL']);
|
|
122
71
|
}
|
|
123
|
-
function getPair(tokenA, tokenB, blockNumber) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
pairAddress = (0, v2_sdk_1.computePairAddress)({ factoryAddress: V2_FACTORY, tokenA: tokenA, tokenB: tokenB });
|
|
130
|
-
contract = new ethers_1.ethers.Contract(pairAddress, V2_ABI, getProvider());
|
|
131
|
-
return [4 /*yield*/, contract.getReserves({ blockTag: blockNumber })];
|
|
132
|
-
case 1:
|
|
133
|
-
_a = _c.sent(), reserve0 = _a.reserve0, reserve1 = _a.reserve1;
|
|
134
|
-
_b = tokenA.sortsBefore(tokenB) ? [tokenA, tokenB] : [tokenB, tokenA] // does safety checks
|
|
135
|
-
, token0 = _b[0], token1 = _b[1];
|
|
136
|
-
return [2 /*return*/, new v2_sdk_1.Pair(sdk_core_1.CurrencyAmount.fromRawAmount(token0, reserve0), sdk_core_1.CurrencyAmount.fromRawAmount(token1, reserve1))];
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
});
|
|
72
|
+
async function getPair(tokenA, tokenB, blockNumber) {
|
|
73
|
+
const pairAddress = (0, v2_sdk_1.computePairAddress)({ factoryAddress: V2_FACTORY, tokenA, tokenB });
|
|
74
|
+
const contract = new ethers_1.ethers.Contract(pairAddress, V2_ABI, getProvider());
|
|
75
|
+
const { reserve0, reserve1 } = await contract.getReserves({ blockTag: blockNumber });
|
|
76
|
+
const [token0, token1] = tokenA.sortsBefore(tokenB) ? [tokenA, tokenB] : [tokenB, tokenA]; // does safety checks
|
|
77
|
+
return new v2_sdk_1.Pair(sdk_core_1.CurrencyAmount.fromRawAmount(token0, reserve0), sdk_core_1.CurrencyAmount.fromRawAmount(token1, reserve1));
|
|
140
78
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
{
|
|
162
|
-
index: (0, v3_sdk_1.nearestUsableTick)(v3_sdk_1.TickMath.MIN_TICK, v3_sdk_1.TICK_SPACINGS[feeAmount]),
|
|
163
|
-
liquidityNet: liquidity,
|
|
164
|
-
liquidityGross: liquidity,
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
index: (0, v3_sdk_1.nearestUsableTick)(v3_sdk_1.TickMath.MAX_TICK, v3_sdk_1.TICK_SPACINGS[feeAmount]),
|
|
168
|
-
liquidityNet: jsbi_1.default.multiply(liquidity, jsbi_1.default.BigInt('-1')),
|
|
169
|
-
liquidityGross: liquidity,
|
|
170
|
-
},
|
|
171
|
-
])];
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
});
|
|
79
|
+
async function getPool(tokenA, tokenB, feeAmount, blockNumber) {
|
|
80
|
+
const [token0, token1] = tokenA.sortsBefore(tokenB) ? [tokenA, tokenB] : [tokenB, tokenA]; // does safety checks
|
|
81
|
+
const poolAddress = v3_sdk_1.Pool.getAddress(token0, token1, feeAmount);
|
|
82
|
+
const contract = new ethers_1.ethers.Contract(poolAddress, UniswapV3Pool_json_1.default.abi, getProvider());
|
|
83
|
+
let liquidity = await contract.liquidity({ blockTag: blockNumber });
|
|
84
|
+
let { sqrtPriceX96, tick } = await contract.slot0({ blockTag: blockNumber });
|
|
85
|
+
liquidity = jsbi_1.default.BigInt(liquidity.toString());
|
|
86
|
+
sqrtPriceX96 = jsbi_1.default.BigInt(sqrtPriceX96.toString());
|
|
87
|
+
return new v3_sdk_1.Pool(token0, token1, feeAmount, sqrtPriceX96, liquidity, tick, [
|
|
88
|
+
{
|
|
89
|
+
index: (0, v3_sdk_1.nearestUsableTick)(v3_sdk_1.TickMath.MIN_TICK, v3_sdk_1.TICK_SPACINGS[feeAmount]),
|
|
90
|
+
liquidityNet: liquidity,
|
|
91
|
+
liquidityGross: liquidity,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
index: (0, v3_sdk_1.nearestUsableTick)(v3_sdk_1.TickMath.MAX_TICK, v3_sdk_1.TICK_SPACINGS[feeAmount]),
|
|
95
|
+
liquidityNet: jsbi_1.default.multiply(liquidity, jsbi_1.default.BigInt('-1')),
|
|
96
|
+
liquidityGross: liquidity,
|
|
97
|
+
},
|
|
98
|
+
]);
|
|
175
99
|
}
|
|
176
|
-
exports.getPool = getPool;
|
|
177
100
|
// use some sane defaults
|
|
178
101
|
// export function swapOptions(options: Partial<SwapOptions>): SwapOptions {
|
|
179
102
|
// // If theres a fee this counts as "slippage" for the amount out, so take it into account
|
|
@@ -191,27 +114,26 @@ exports.getPool = getPool;
|
|
|
191
114
|
function buildTrade(trades) {
|
|
192
115
|
return new router_sdk_1.Trade({
|
|
193
116
|
v2Routes: trades
|
|
194
|
-
.filter(
|
|
195
|
-
.map(
|
|
117
|
+
.filter((trade) => trade instanceof v2_sdk_1.Trade)
|
|
118
|
+
.map((trade) => ({
|
|
196
119
|
routev2: trade.route,
|
|
197
120
|
inputAmount: trade.inputAmount,
|
|
198
121
|
outputAmount: trade.outputAmount,
|
|
199
|
-
})
|
|
122
|
+
})),
|
|
200
123
|
v3Routes: trades
|
|
201
|
-
.filter(
|
|
202
|
-
.map(
|
|
124
|
+
.filter((trade) => trade instanceof v3_sdk_1.Trade)
|
|
125
|
+
.map((trade) => ({
|
|
203
126
|
routev3: trade.route,
|
|
204
127
|
inputAmount: trade.inputAmount,
|
|
205
128
|
outputAmount: trade.outputAmount,
|
|
206
|
-
})
|
|
129
|
+
})),
|
|
207
130
|
mixedRoutes: trades
|
|
208
|
-
.filter(
|
|
209
|
-
.map(
|
|
131
|
+
.filter((trade) => trade instanceof router_sdk_1.MixedRouteTrade)
|
|
132
|
+
.map((trade) => ({
|
|
210
133
|
mixedRoute: trade.route,
|
|
211
134
|
inputAmount: trade.inputAmount,
|
|
212
135
|
outputAmount: trade.outputAmount,
|
|
213
|
-
})
|
|
136
|
+
})),
|
|
214
137
|
tradeType: trades[0].tradeType,
|
|
215
138
|
});
|
|
216
139
|
}
|
|
217
|
-
exports.buildTrade = buildTrade;
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pioneer-platform/uniswap-client",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@keepkey/keepkey-sdk": "^0.2.57",
|
|
8
|
-
"@pioneer-platform/loggerdog": "^8.
|
|
9
|
-
"@pioneer-platform/maya-network": "^8.
|
|
10
|
-
"@pioneer-platform/pioneer-caip": "^9.
|
|
11
|
-
"@pioneer-platform/pioneer-coins": "^9.
|
|
12
|
-
"@pioneer-platform/pioneer-discovery": "^0.0
|
|
8
|
+
"@pioneer-platform/loggerdog": "^8.4.0",
|
|
9
|
+
"@pioneer-platform/maya-network": "^8.4.0",
|
|
10
|
+
"@pioneer-platform/pioneer-caip": "^9.3.0",
|
|
11
|
+
"@pioneer-platform/pioneer-coins": "^9.4.0",
|
|
12
|
+
"@pioneer-platform/pioneer-discovery": "^0.1.0",
|
|
13
13
|
"@types/ms": "^0.7.34",
|
|
14
14
|
"@types/ms.macro": "^2.0.2",
|
|
15
15
|
"@uniswap/router-sdk": "1.9.0",
|
|
@@ -21,33 +21,33 @@
|
|
|
21
21
|
"@uniswap/universal-router-sdk": "1.8.2",
|
|
22
22
|
"@uniswap/v2-sdk": "4.3.0",
|
|
23
23
|
"@uniswap/v3-sdk": "3.11.0",
|
|
24
|
-
"axios": "^1.
|
|
24
|
+
"axios": "^1.6.0",
|
|
25
25
|
"dayjs": "^1.11.10",
|
|
26
26
|
"dotenv": "^8.2.0",
|
|
27
27
|
"ms": "^2.1.3",
|
|
28
28
|
"ms.macro": "^2.0.0",
|
|
29
29
|
"uuidv4": "^6.2.13"
|
|
30
30
|
},
|
|
31
|
-
"scripts": {
|
|
32
|
-
"npm": "npm i",
|
|
33
|
-
"test": "npm run build && node __tests__/test-module.js",
|
|
34
|
-
"test-sdk": "npm run build && node __tests__/test-module-sdk.js",
|
|
35
|
-
"build": "tsc -p .",
|
|
36
|
-
"prepublish": "npm run build",
|
|
37
|
-
"refresh": "rm -rf ./node_modules ./package-lock.json && npm install"
|
|
38
|
-
},
|
|
39
31
|
"devDependencies": {
|
|
40
32
|
"@types/async-retry": "^1.4.8",
|
|
41
33
|
"@types/bunyan": "^1.8.11",
|
|
42
34
|
"@types/jest": "^25.2.3",
|
|
43
|
-
"@types/node": "^
|
|
35
|
+
"@types/node": "^18.16.0",
|
|
44
36
|
"@types/source-map-support": "^0.5.3",
|
|
45
37
|
"babel-plugin-macros": "^3.1.0",
|
|
46
38
|
"jest": "^26.4.2",
|
|
47
39
|
"onchange": "^7.0.2",
|
|
48
40
|
"serve": "^11.3.2",
|
|
49
41
|
"ts-jest": "^29.0.5",
|
|
50
|
-
"typescript": "^5.0.
|
|
42
|
+
"typescript": "^5.0.4"
|
|
51
43
|
},
|
|
52
|
-
"gitHead": "
|
|
53
|
-
|
|
44
|
+
"gitHead": "a76012f6693a12181c4744e53e977a9eaeef0ed3",
|
|
45
|
+
"scripts": {
|
|
46
|
+
"npm": "pnpm i",
|
|
47
|
+
"test": "pnpm run build && node __tests__/test-module.js",
|
|
48
|
+
"test-sdk": "pnpm run build && node __tests__/test-module-sdk.js",
|
|
49
|
+
"build": "tsc -p .",
|
|
50
|
+
"prepublish": "pnpm run build",
|
|
51
|
+
"refresh": "rm -rf ./node_modules ./package-lock.json && pnpm install"
|
|
52
|
+
}
|
|
53
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
3
|
+
"target": "es2020",
|
|
4
4
|
"module": "commonjs",
|
|
5
|
-
"lib": ["
|
|
5
|
+
"lib": ["es2020", "dom"],
|
|
6
6
|
"declaration": true,
|
|
7
|
-
"outDir": "lib",
|
|
8
|
-
"rootDir": "src",
|
|
9
|
-
"strict":
|
|
10
|
-
"
|
|
7
|
+
"outDir": "./lib",
|
|
8
|
+
"rootDir": "./src",
|
|
9
|
+
"strict": false,
|
|
10
|
+
"noImplicitAny": false,
|
|
11
|
+
"strictNullChecks": false,
|
|
12
|
+
"strictFunctionTypes": false,
|
|
13
|
+
"strictBindCallApply": false,
|
|
14
|
+
"strictPropertyInitialization": false,
|
|
15
|
+
"noImplicitThis": false,
|
|
16
|
+
"alwaysStrict": false,
|
|
11
17
|
"esModuleInterop": true,
|
|
12
|
-
"resolveJsonModule": true
|
|
13
|
-
|
|
18
|
+
"resolveJsonModule": true,
|
|
19
|
+
"skipLibCheck": true,
|
|
20
|
+
"forceConsistentCasingInFileNames": true
|
|
21
|
+
},
|
|
22
|
+
"include": ["src/**/*.ts"],
|
|
23
|
+
"exclude": [
|
|
24
|
+
"node_modules",
|
|
25
|
+
"**/__tests__/*",
|
|
26
|
+
"src/abis/**/*",
|
|
27
|
+
"src/uniswap/**/*",
|
|
28
|
+
"src/utils/**/*",
|
|
29
|
+
"src/routing/**/*",
|
|
30
|
+
"src/constants/**/*",
|
|
31
|
+
"src/rpc/**/*"
|
|
32
|
+
]
|
|
14
33
|
}
|