@swapkit/core 1.0.0-rc.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.
Files changed (35) hide show
  1. package/LICENSE +201 -0
  2. package/dist/index-9e36735e.cjs +1 -0
  3. package/dist/index-cf1865cd.js +649 -0
  4. package/dist/index.cjs +2 -0
  5. package/dist/index.d.ts +214 -0
  6. package/dist/index.es-320ea117.js +13836 -0
  7. package/dist/index.es-66e7d15a.js +11436 -0
  8. package/dist/index.es-8503fb04-8503fb04.js +34669 -0
  9. package/dist/index.es-8503fb04-903b9173.cjs +1 -0
  10. package/dist/index.es-c82b553a.cjs +14 -0
  11. package/dist/index.es-e22f22e9.cjs +1 -0
  12. package/dist/index.es.js +3743 -0
  13. package/package.json +57 -0
  14. package/src/aggregator/contracts/avaxGeneric.ts +92 -0
  15. package/src/aggregator/contracts/avaxWoofi.ts +145 -0
  16. package/src/aggregator/contracts/bscGeneric.ts +106 -0
  17. package/src/aggregator/contracts/ethGeneric.ts +92 -0
  18. package/src/aggregator/contracts/index.ts +74 -0
  19. package/src/aggregator/contracts/pancakeV2.ts +145 -0
  20. package/src/aggregator/contracts/pangolin.ts +120 -0
  21. package/src/aggregator/contracts/sushiswap.ts +120 -0
  22. package/src/aggregator/contracts/traderJoe.ts +120 -0
  23. package/src/aggregator/contracts/uniswapV2.ts +120 -0
  24. package/src/aggregator/contracts/uniswapV2Leg.ts +128 -0
  25. package/src/aggregator/contracts/uniswapV3_100.ts +128 -0
  26. package/src/aggregator/contracts/uniswapV3_10000.ts +128 -0
  27. package/src/aggregator/contracts/uniswapV3_3000.ts +128 -0
  28. package/src/aggregator/contracts/uniswapV3_500.ts +128 -0
  29. package/src/aggregator/getSwapParams.ts +70 -0
  30. package/src/client/__tests__/helpers.test.ts +69 -0
  31. package/src/client/explorerUrls.ts +60 -0
  32. package/src/client/index.ts +690 -0
  33. package/src/client/thornode.ts +31 -0
  34. package/src/client/types.ts +101 -0
  35. package/src/index.ts +4 -0
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "author": "swapkit-oss-team",
3
+ "dependencies": {
4
+ "@swapkit/types": "1.0.0-rc.0",
5
+ "@swapkit/helpers": "1.0.0-rc.0"
6
+ },
7
+ "description": "SwapKit Lib core",
8
+ "devDependencies": {
9
+ "@vitest/coverage-istanbul": "0.34.4",
10
+ "ethers": "6.7.1",
11
+ "vite": "4.4.9",
12
+ "vite-plugin-top-level-await": "1.3.1",
13
+ "vite-plugin-wasm": "3.2.2",
14
+ "vitest": "0.34.4",
15
+ "@internal/config": "0.0.0-internal.0",
16
+ "@swapkit/api": "1.0.0-rc.0",
17
+ "@swapkit/tokens": "1.0.0-rc.0",
18
+ "@swapkit/toolbox-cosmos": "1.0.0-rc.0",
19
+ "@swapkit/toolbox-evm": "1.0.0-rc.0",
20
+ "@swapkit/toolbox-utxo": "1.0.0-rc.0",
21
+ "@swapkit/wallet-wc": "1.0.0-rc.0"
22
+ },
23
+ "eslintConfig": {
24
+ "extends": "../../../internal/eslint-config"
25
+ },
26
+ "exports": {
27
+ ".": {
28
+ "import": "./dist/index.es.js",
29
+ "require": "./dist/index.cjs",
30
+ "types": "./dist/index.d.ts"
31
+ }
32
+ },
33
+ "files": [
34
+ "src/",
35
+ "dist/"
36
+ ],
37
+ "homepage": "https://github.com/thorswap/SwapKit",
38
+ "license": "Apache-2.0",
39
+ "main": "./dist/index.cjs",
40
+ "module": "./dist/index.es.js",
41
+ "name": "@swapkit/core",
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
45
+ "react-native": "./src/index.ts",
46
+ "repository": "https://github.com/thorswap/SwapKit.git",
47
+ "type": "module",
48
+ "types": "./dist/index.d.ts",
49
+ "version": "1.0.0-rc.0",
50
+ "scripts": {
51
+ "build": "NODE_OPTIONS=--max_old_space_size=16384 vite build",
52
+ "clean": "rm -rf dist vite.config.ts.* .turbo node_modules",
53
+ "lint": "eslint ./ --ext .ts,.tsx --fix; tsc --noEmit",
54
+ "test": "vitest --run",
55
+ "test:coverage": "vitest run --coverage"
56
+ }
57
+ }
@@ -0,0 +1,92 @@
1
+ export const avaxGeneric = [
2
+ {
3
+ inputs: [{ internalType: 'address', name: '_ttp', type: 'address' }],
4
+ stateMutability: 'nonpayable',
5
+ type: 'constructor',
6
+ },
7
+ {
8
+ anonymous: false,
9
+ inputs: [
10
+ { indexed: false, internalType: 'uint256', name: 'fee', type: 'uint256' },
11
+ { indexed: false, internalType: 'address', name: 'feeRecipient', type: 'address' },
12
+ ],
13
+ name: 'FeeSet',
14
+ type: 'event',
15
+ },
16
+ {
17
+ anonymous: false,
18
+ inputs: [
19
+ { indexed: true, internalType: 'address', name: 'owner', type: 'address' },
20
+ { indexed: false, internalType: 'bool', name: 'active', type: 'bool' },
21
+ ],
22
+ name: 'OwnerSet',
23
+ type: 'event',
24
+ },
25
+ {
26
+ inputs: [],
27
+ name: 'fee',
28
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
29
+ stateMutability: 'view',
30
+ type: 'function',
31
+ },
32
+ {
33
+ inputs: [],
34
+ name: 'feeRecipient',
35
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
36
+ stateMutability: 'view',
37
+ type: 'function',
38
+ },
39
+ {
40
+ inputs: [{ internalType: 'address', name: '', type: 'address' }],
41
+ name: 'owners',
42
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
43
+ stateMutability: 'view',
44
+ type: 'function',
45
+ },
46
+ {
47
+ inputs: [
48
+ { internalType: 'uint256', name: '_fee', type: 'uint256' },
49
+ { internalType: 'address', name: '_feeRecipient', type: 'address' },
50
+ ],
51
+ name: 'setFee',
52
+ outputs: [],
53
+ stateMutability: 'nonpayable',
54
+ type: 'function',
55
+ },
56
+ {
57
+ inputs: [
58
+ { internalType: 'address', name: 'owner', type: 'address' },
59
+ { internalType: 'bool', name: 'active', type: 'bool' },
60
+ ],
61
+ name: 'setOwner',
62
+ outputs: [],
63
+ stateMutability: 'nonpayable',
64
+ type: 'function',
65
+ },
66
+ {
67
+ inputs: [
68
+ { internalType: 'address', name: 'tcRouter', type: 'address' },
69
+ { internalType: 'address', name: 'tcVault', type: 'address' },
70
+ { internalType: 'string', name: 'tcMemo', type: 'string' },
71
+ { internalType: 'address', name: 'token', type: 'address' },
72
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
73
+ { internalType: 'address', name: 'router', type: 'address' },
74
+ { internalType: 'bytes', name: 'data', type: 'bytes' },
75
+ { internalType: 'uint256', name: 'deadline', type: 'uint256' },
76
+ ],
77
+ name: 'swapIn',
78
+ outputs: [],
79
+ stateMutability: 'nonpayable',
80
+ type: 'function',
81
+ },
82
+ {
83
+ inputs: [],
84
+ name: 'tokenTransferProxy',
85
+ outputs: [
86
+ { internalType: 'contract TSAggregatorTokenTransferProxy', name: '', type: 'address' },
87
+ ],
88
+ stateMutability: 'view',
89
+ type: 'function',
90
+ },
91
+ { stateMutability: 'payable', type: 'receive' },
92
+ ];
@@ -0,0 +1,145 @@
1
+ export const avaxWoofi = [
2
+ {
3
+ inputs: [
4
+ { internalType: 'address', name: '_ttp', type: 'address' },
5
+ { internalType: 'address', name: '_weth', type: 'address' },
6
+ { internalType: 'address', name: '_swapRouter', type: 'address' },
7
+ ],
8
+ stateMutability: 'nonpayable',
9
+ type: 'constructor',
10
+ },
11
+ {
12
+ anonymous: false,
13
+ inputs: [
14
+ { indexed: false, internalType: 'uint256', name: 'fee', type: 'uint256' },
15
+ { indexed: false, internalType: 'address', name: 'feeRecipient', type: 'address' },
16
+ ],
17
+ name: 'FeeSet',
18
+ type: 'event',
19
+ },
20
+ {
21
+ anonymous: false,
22
+ inputs: [
23
+ { indexed: true, internalType: 'address', name: 'owner', type: 'address' },
24
+ { indexed: false, internalType: 'bool', name: 'active', type: 'bool' },
25
+ ],
26
+ name: 'OwnerSet',
27
+ type: 'event',
28
+ },
29
+ {
30
+ anonymous: false,
31
+ inputs: [
32
+ { indexed: false, internalType: 'address', name: 'from', type: 'address' },
33
+ { indexed: false, internalType: 'address', name: 'token', type: 'address' },
34
+ { indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' },
35
+ { indexed: false, internalType: 'uint256', name: 'out', type: 'uint256' },
36
+ { indexed: false, internalType: 'uint256', name: 'fee', type: 'uint256' },
37
+ { indexed: false, internalType: 'address', name: 'vault', type: 'address' },
38
+ { indexed: false, internalType: 'string', name: 'memo', type: 'string' },
39
+ ],
40
+ name: 'SwapIn',
41
+ type: 'event',
42
+ },
43
+ {
44
+ anonymous: false,
45
+ inputs: [
46
+ { indexed: false, internalType: 'address', name: 'to', type: 'address' },
47
+ { indexed: false, internalType: 'address', name: 'token', type: 'address' },
48
+ { indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' },
49
+ { indexed: false, internalType: 'uint256', name: 'fee', type: 'uint256' },
50
+ ],
51
+ name: 'SwapOut',
52
+ type: 'event',
53
+ },
54
+ {
55
+ inputs: [],
56
+ name: 'fee',
57
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
58
+ stateMutability: 'view',
59
+ type: 'function',
60
+ },
61
+ {
62
+ inputs: [],
63
+ name: 'feeRecipient',
64
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
65
+ stateMutability: 'view',
66
+ type: 'function',
67
+ },
68
+ {
69
+ inputs: [{ internalType: 'address', name: '', type: 'address' }],
70
+ name: 'owners',
71
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
72
+ stateMutability: 'view',
73
+ type: 'function',
74
+ },
75
+ {
76
+ inputs: [
77
+ { internalType: 'uint256', name: '_fee', type: 'uint256' },
78
+ { internalType: 'address', name: '_feeRecipient', type: 'address' },
79
+ ],
80
+ name: 'setFee',
81
+ outputs: [],
82
+ stateMutability: 'nonpayable',
83
+ type: 'function',
84
+ },
85
+ {
86
+ inputs: [
87
+ { internalType: 'address', name: 'owner', type: 'address' },
88
+ { internalType: 'bool', name: 'active', type: 'bool' },
89
+ ],
90
+ name: 'setOwner',
91
+ outputs: [],
92
+ stateMutability: 'nonpayable',
93
+ type: 'function',
94
+ },
95
+ {
96
+ inputs: [
97
+ { internalType: 'address', name: 'router', type: 'address' },
98
+ { internalType: 'address', name: 'vault', type: 'address' },
99
+ { internalType: 'string', name: 'memo', type: 'string' },
100
+ { internalType: 'address', name: 'token', type: 'address' },
101
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
102
+ { internalType: 'uint256', name: 'amountOutMin', type: 'uint256' },
103
+ { internalType: 'uint256', name: 'deadline', type: 'uint256' },
104
+ ],
105
+ name: 'swapIn',
106
+ outputs: [],
107
+ stateMutability: 'nonpayable',
108
+ type: 'function',
109
+ },
110
+ {
111
+ inputs: [
112
+ { internalType: 'address', name: 'token', type: 'address' },
113
+ { internalType: 'address', name: 'to', type: 'address' },
114
+ { internalType: 'uint256', name: 'amountOutMin', type: 'uint256' },
115
+ ],
116
+ name: 'swapOut',
117
+ outputs: [],
118
+ stateMutability: 'payable',
119
+ type: 'function',
120
+ },
121
+ {
122
+ inputs: [],
123
+ name: 'swapRouter',
124
+ outputs: [{ internalType: 'contract IWoofi', name: '', type: 'address' }],
125
+ stateMutability: 'view',
126
+ type: 'function',
127
+ },
128
+ {
129
+ inputs: [],
130
+ name: 'tokenTransferProxy',
131
+ outputs: [
132
+ { internalType: 'contract TSAggregatorTokenTransferProxy', name: '', type: 'address' },
133
+ ],
134
+ stateMutability: 'view',
135
+ type: 'function',
136
+ },
137
+ {
138
+ inputs: [],
139
+ name: 'weth',
140
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
141
+ stateMutability: 'view',
142
+ type: 'function',
143
+ },
144
+ { stateMutability: 'payable', type: 'receive' },
145
+ ];
@@ -0,0 +1,106 @@
1
+ export const bscGeneric = [
2
+ {
3
+ inputs: [{ internalType: 'address', name: '_ttp', type: 'address' }],
4
+ stateMutability: 'nonpayable',
5
+ type: 'constructor',
6
+ },
7
+ {
8
+ anonymous: false,
9
+ inputs: [
10
+ { indexed: false, internalType: 'uint256', name: 'fee', type: 'uint256' },
11
+ { indexed: false, internalType: 'address', name: 'feeRecipient', type: 'address' },
12
+ ],
13
+ name: 'FeeSet',
14
+ type: 'event',
15
+ },
16
+ {
17
+ anonymous: false,
18
+ inputs: [
19
+ { indexed: true, internalType: 'address', name: 'owner', type: 'address' },
20
+ { indexed: false, internalType: 'bool', name: 'active', type: 'bool' },
21
+ ],
22
+ name: 'OwnerSet',
23
+ type: 'event',
24
+ },
25
+ {
26
+ anonymous: false,
27
+ inputs: [
28
+ { indexed: false, internalType: 'address', name: 'from', type: 'address' },
29
+ { indexed: false, internalType: 'address', name: 'token', type: 'address' },
30
+ { indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' },
31
+ { indexed: false, internalType: 'uint256', name: 'out', type: 'uint256' },
32
+ { indexed: false, internalType: 'uint256', name: 'fee', type: 'uint256' },
33
+ { indexed: false, internalType: 'address', name: 'vault', type: 'address' },
34
+ { indexed: false, internalType: 'string', name: 'memo', type: 'string' },
35
+ ],
36
+ name: 'SwapIn',
37
+ type: 'event',
38
+ },
39
+ {
40
+ inputs: [],
41
+ name: 'fee',
42
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
43
+ stateMutability: 'view',
44
+ type: 'function',
45
+ },
46
+ {
47
+ inputs: [],
48
+ name: 'feeRecipient',
49
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
50
+ stateMutability: 'view',
51
+ type: 'function',
52
+ },
53
+ {
54
+ inputs: [{ internalType: 'address', name: '', type: 'address' }],
55
+ name: 'owners',
56
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
57
+ stateMutability: 'view',
58
+ type: 'function',
59
+ },
60
+ {
61
+ inputs: [
62
+ { internalType: 'uint256', name: '_fee', type: 'uint256' },
63
+ { internalType: 'address', name: '_feeRecipient', type: 'address' },
64
+ ],
65
+ name: 'setFee',
66
+ outputs: [],
67
+ stateMutability: 'nonpayable',
68
+ type: 'function',
69
+ },
70
+ {
71
+ inputs: [
72
+ { internalType: 'address', name: 'owner', type: 'address' },
73
+ { internalType: 'bool', name: 'active', type: 'bool' },
74
+ ],
75
+ name: 'setOwner',
76
+ outputs: [],
77
+ stateMutability: 'nonpayable',
78
+ type: 'function',
79
+ },
80
+ {
81
+ inputs: [
82
+ { internalType: 'address', name: 'router', type: 'address' },
83
+ { internalType: 'address', name: 'vault', type: 'address' },
84
+ { internalType: 'string', name: 'memo', type: 'string' },
85
+ { internalType: 'address', name: 'token', type: 'address' },
86
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
87
+ { internalType: 'address', name: 'swapRouter', type: 'address' },
88
+ { internalType: 'bytes', name: 'data', type: 'bytes' },
89
+ { internalType: 'uint256', name: 'deadline', type: 'uint256' },
90
+ ],
91
+ name: 'swapIn',
92
+ outputs: [],
93
+ stateMutability: 'nonpayable',
94
+ type: 'function',
95
+ },
96
+ {
97
+ inputs: [],
98
+ name: 'tokenTransferProxy',
99
+ outputs: [
100
+ { internalType: 'contract TSAggregatorTokenTransferProxy', name: '', type: 'address' },
101
+ ],
102
+ stateMutability: 'view',
103
+ type: 'function',
104
+ },
105
+ { stateMutability: 'payable', type: 'receive' },
106
+ ];
@@ -0,0 +1,92 @@
1
+ export const ethGeneric = [
2
+ {
3
+ inputs: [{ internalType: 'address', name: '_ttp', type: 'address' }],
4
+ stateMutability: 'nonpayable',
5
+ type: 'constructor',
6
+ },
7
+ {
8
+ anonymous: false,
9
+ inputs: [
10
+ { indexed: false, internalType: 'uint256', name: 'fee', type: 'uint256' },
11
+ { indexed: false, internalType: 'address', name: 'feeRecipient', type: 'address' },
12
+ ],
13
+ name: 'FeeSet',
14
+ type: 'event',
15
+ },
16
+ {
17
+ anonymous: false,
18
+ inputs: [
19
+ { indexed: true, internalType: 'address', name: 'owner', type: 'address' },
20
+ { indexed: false, internalType: 'bool', name: 'active', type: 'bool' },
21
+ ],
22
+ name: 'OwnerSet',
23
+ type: 'event',
24
+ },
25
+ {
26
+ inputs: [],
27
+ name: 'fee',
28
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
29
+ stateMutability: 'view',
30
+ type: 'function',
31
+ },
32
+ {
33
+ inputs: [],
34
+ name: 'feeRecipient',
35
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
36
+ stateMutability: 'view',
37
+ type: 'function',
38
+ },
39
+ {
40
+ inputs: [{ internalType: 'address', name: '', type: 'address' }],
41
+ name: 'owners',
42
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
43
+ stateMutability: 'view',
44
+ type: 'function',
45
+ },
46
+ {
47
+ inputs: [
48
+ { internalType: 'uint256', name: '_fee', type: 'uint256' },
49
+ { internalType: 'address', name: '_feeRecipient', type: 'address' },
50
+ ],
51
+ name: 'setFee',
52
+ outputs: [],
53
+ stateMutability: 'nonpayable',
54
+ type: 'function',
55
+ },
56
+ {
57
+ inputs: [
58
+ { internalType: 'address', name: 'owner', type: 'address' },
59
+ { internalType: 'bool', name: 'active', type: 'bool' },
60
+ ],
61
+ name: 'setOwner',
62
+ outputs: [],
63
+ stateMutability: 'nonpayable',
64
+ type: 'function',
65
+ },
66
+ {
67
+ inputs: [
68
+ { internalType: 'address', name: 'tcRouter', type: 'address' },
69
+ { internalType: 'address', name: 'tcVault', type: 'address' },
70
+ { internalType: 'string', name: 'tcMemo', type: 'string' },
71
+ { internalType: 'address', name: 'token', type: 'address' },
72
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
73
+ { internalType: 'address', name: 'router', type: 'address' },
74
+ { internalType: 'bytes', name: 'data', type: 'bytes' },
75
+ { internalType: 'uint256', name: 'deadline', type: 'uint256' },
76
+ ],
77
+ name: 'swapIn',
78
+ outputs: [],
79
+ stateMutability: 'nonpayable',
80
+ type: 'function',
81
+ },
82
+ {
83
+ inputs: [],
84
+ name: 'tokenTransferProxy',
85
+ outputs: [
86
+ { internalType: 'contract TSAggregatorTokenTransferProxy', name: '', type: 'address' },
87
+ ],
88
+ stateMutability: 'view',
89
+ type: 'function',
90
+ },
91
+ { stateMutability: 'payable', type: 'receive' },
92
+ ];
@@ -0,0 +1,74 @@
1
+ import { avaxGeneric } from './avaxGeneric.ts';
2
+ import { avaxWoofi } from './avaxWoofi.ts';
3
+ import { bscGeneric } from './bscGeneric.ts';
4
+ import { ethGeneric } from './ethGeneric.ts';
5
+ import { pancakeV2 } from './pancakeV2.ts';
6
+ import { pangolin } from './pangolin.ts';
7
+ import { sushiswap } from './sushiswap.ts';
8
+ import { traderJoe } from './traderJoe.ts';
9
+ import { uniswapV2 } from './uniswapV2.ts';
10
+ import { uniswapV2Leg } from './uniswapV2Leg.ts';
11
+ import { uniswapV3_100 } from './uniswapV3_100.ts';
12
+ import { uniswapV3_500 } from './uniswapV3_500.ts';
13
+ import { uniswapV3_3000 } from './uniswapV3_3000.ts';
14
+ import { uniswapV3_10000 } from './uniswapV3_10000.ts';
15
+
16
+ type AbiTypes =
17
+ | typeof avaxGeneric
18
+ | typeof avaxWoofi
19
+ | typeof bscGeneric
20
+ | typeof ethGeneric
21
+ | typeof sushiswap
22
+ | typeof uniswapV2
23
+ | typeof pancakeV2
24
+ | typeof uniswapV2Leg
25
+ | typeof uniswapV3_100
26
+ | typeof uniswapV3_10000
27
+ | typeof uniswapV3_3000
28
+ | typeof uniswapV3_500;
29
+
30
+ export enum AGG_CONTRACT_ADDRESS {
31
+ // AVAX
32
+ PANGOLIN = '0x942c6dA485FD6cEf255853ef83a149d43A73F18a',
33
+ AVAX_GENERIC = '0x7C38b8B2efF28511ECc14a621e263857Fb5771d3',
34
+ AVAX_WOOFI = '0x5505BE604dFA8A1ad402A71f8A357fba47F9bf5a',
35
+ AVAX_TRADER_JOE = '0x3b7DbdD635B99cEa39D3d95Dbd0217F05e55B212',
36
+
37
+ // BSC
38
+ BSC_GENERIC = '0xB6fA6f1DcD686F4A573Fd243a6FABb4ba36Ba98c',
39
+ BSC_PANCAKE_V2 = '0x30912B38618D3D37De3191A4FFE982C65a9aEC2E',
40
+
41
+ // ETH
42
+ ETH_GENERIC = '0xd31f7e39afECEc4855fecc51b693F9A0Cec49fd2',
43
+ UNISWAP_V2 = '0x86904Eb2b3c743400D03f929F2246EfA80B91215',
44
+ SUSHISWAP = '0xbf365e79aA44A2164DA135100C57FDB6635ae870',
45
+ UNISWAP_V3_100 = '0xBd68cBe6c247e2c3a0e36B8F0e24964914f26Ee8',
46
+ UNISWAP_V3_500 = '0xe4ddca21881bac219af7f217703db0475d2a9f02',
47
+ UNISWAP_V3_3000 = '0x11733abf0cdb43298f7e949c930188451a9a9ef2',
48
+ UNISWAP_V3_10000 = '0xb33874810e5395eb49d8bd7e912631db115d5a03',
49
+ UNISWAP_V2_LEG = '0x3660dE6C56cFD31998397652941ECe42118375DA',
50
+ }
51
+
52
+ export const lowercasedGenericAbiMappings = {
53
+ [AGG_CONTRACT_ADDRESS.AVAX_GENERIC.toLowerCase()]: avaxGeneric,
54
+ [AGG_CONTRACT_ADDRESS.BSC_GENERIC.toLowerCase()]: bscGeneric,
55
+ [AGG_CONTRACT_ADDRESS.ETH_GENERIC.toLowerCase()]: ethGeneric,
56
+ };
57
+
58
+ export const lowercasedContractAbiMapping = {
59
+ ...lowercasedGenericAbiMappings,
60
+ // AVAX
61
+ [AGG_CONTRACT_ADDRESS.PANGOLIN.toLowerCase()]: pangolin,
62
+ [AGG_CONTRACT_ADDRESS.AVAX_WOOFI.toLowerCase()]: avaxWoofi,
63
+ [AGG_CONTRACT_ADDRESS.AVAX_TRADER_JOE.toLowerCase()]: traderJoe,
64
+ // BSC
65
+ [AGG_CONTRACT_ADDRESS.BSC_PANCAKE_V2.toLowerCase()]: pancakeV2,
66
+ // ETH
67
+ [AGG_CONTRACT_ADDRESS.SUSHISWAP.toLowerCase()]: sushiswap,
68
+ [AGG_CONTRACT_ADDRESS.UNISWAP_V2.toLowerCase()]: uniswapV2,
69
+ [AGG_CONTRACT_ADDRESS.UNISWAP_V2_LEG.toLowerCase()]: uniswapV2Leg,
70
+ [AGG_CONTRACT_ADDRESS.UNISWAP_V3_100.toLowerCase()]: uniswapV3_100,
71
+ [AGG_CONTRACT_ADDRESS.UNISWAP_V3_500.toLowerCase()]: uniswapV3_500,
72
+ [AGG_CONTRACT_ADDRESS.UNISWAP_V3_3000.toLowerCase()]: uniswapV3_3000,
73
+ [AGG_CONTRACT_ADDRESS.UNISWAP_V3_10000.toLowerCase()]: uniswapV3_10000,
74
+ } as Record<string, AbiTypes>;