@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
@@ -0,0 +1,145 @@
1
+ export const pancakeV2 = [
2
+ {
3
+ inputs: [
4
+ { internalType: 'address', name: '_ttp', type: 'address' },
5
+ { internalType: 'address', name: '_wbnb', 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 IPancakeRouterV2', 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: 'wbnb',
140
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
141
+ stateMutability: 'view',
142
+ type: 'function',
143
+ },
144
+ { stateMutability: 'payable', type: 'receive' },
145
+ ];
@@ -0,0 +1,120 @@
1
+ export const pangolin = [
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
+ inputs: [],
31
+ name: 'fee',
32
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
33
+ stateMutability: 'view',
34
+ type: 'function',
35
+ },
36
+ {
37
+ inputs: [],
38
+ name: 'feeRecipient',
39
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
40
+ stateMutability: 'view',
41
+ type: 'function',
42
+ },
43
+ {
44
+ inputs: [{ internalType: 'address', name: '', type: 'address' }],
45
+ name: 'owners',
46
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
47
+ stateMutability: 'view',
48
+ type: 'function',
49
+ },
50
+ {
51
+ inputs: [
52
+ { internalType: 'uint256', name: '_fee', type: 'uint256' },
53
+ { internalType: 'address', name: '_feeRecipient', type: 'address' },
54
+ ],
55
+ name: 'setFee',
56
+ outputs: [],
57
+ stateMutability: 'nonpayable',
58
+ type: 'function',
59
+ },
60
+ {
61
+ inputs: [
62
+ { internalType: 'address', name: 'owner', type: 'address' },
63
+ { internalType: 'bool', name: 'active', type: 'bool' },
64
+ ],
65
+ name: 'setOwner',
66
+ outputs: [],
67
+ stateMutability: 'nonpayable',
68
+ type: 'function',
69
+ },
70
+ {
71
+ inputs: [
72
+ { internalType: 'address', name: 'tcRouter', type: 'address' },
73
+ { internalType: 'address', name: 'tcVault', type: 'address' },
74
+ { internalType: 'string', name: 'tcMemo', type: 'string' },
75
+ { internalType: 'address', name: 'token', type: 'address' },
76
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
77
+ { internalType: 'uint256', name: 'amountOutMin', type: 'uint256' },
78
+ { internalType: 'uint256', name: 'deadline', type: 'uint256' },
79
+ ],
80
+ name: 'swapIn',
81
+ outputs: [],
82
+ stateMutability: 'nonpayable',
83
+ type: 'function',
84
+ },
85
+ {
86
+ inputs: [
87
+ { internalType: 'address', name: 'token', type: 'address' },
88
+ { internalType: 'address', name: 'to', type: 'address' },
89
+ { internalType: 'uint256', name: 'amountOutMin', type: 'uint256' },
90
+ ],
91
+ name: 'swapOut',
92
+ outputs: [],
93
+ stateMutability: 'payable',
94
+ type: 'function',
95
+ },
96
+ {
97
+ inputs: [],
98
+ name: 'swapRouter',
99
+ outputs: [{ internalType: 'contract IUniswapRouterV2AVAX', name: '', type: 'address' }],
100
+ stateMutability: 'view',
101
+ type: 'function',
102
+ },
103
+ {
104
+ inputs: [],
105
+ name: 'tokenTransferProxy',
106
+ outputs: [
107
+ { internalType: 'contract TSAggregatorTokenTransferProxy', name: '', type: 'address' },
108
+ ],
109
+ stateMutability: 'view',
110
+ type: 'function',
111
+ },
112
+ {
113
+ inputs: [],
114
+ name: 'weth',
115
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
116
+ stateMutability: 'view',
117
+ type: 'function',
118
+ },
119
+ { stateMutability: 'payable', type: 'receive' },
120
+ ];
@@ -0,0 +1,120 @@
1
+ export const sushiswap = [
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
+ inputs: [],
31
+ name: 'fee',
32
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
33
+ stateMutability: 'view',
34
+ type: 'function',
35
+ },
36
+ {
37
+ inputs: [],
38
+ name: 'feeRecipient',
39
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
40
+ stateMutability: 'view',
41
+ type: 'function',
42
+ },
43
+ {
44
+ inputs: [{ internalType: 'address', name: '', type: 'address' }],
45
+ name: 'owners',
46
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
47
+ stateMutability: 'view',
48
+ type: 'function',
49
+ },
50
+ {
51
+ inputs: [
52
+ { internalType: 'uint256', name: '_fee', type: 'uint256' },
53
+ { internalType: 'address', name: '_feeRecipient', type: 'address' },
54
+ ],
55
+ name: 'setFee',
56
+ outputs: [],
57
+ stateMutability: 'nonpayable',
58
+ type: 'function',
59
+ },
60
+ {
61
+ inputs: [
62
+ { internalType: 'address', name: 'owner', type: 'address' },
63
+ { internalType: 'bool', name: 'active', type: 'bool' },
64
+ ],
65
+ name: 'setOwner',
66
+ outputs: [],
67
+ stateMutability: 'nonpayable',
68
+ type: 'function',
69
+ },
70
+ {
71
+ inputs: [
72
+ { internalType: 'address', name: 'tcRouter', type: 'address' },
73
+ { internalType: 'address', name: 'tcVault', type: 'address' },
74
+ { internalType: 'string', name: 'tcMemo', type: 'string' },
75
+ { internalType: 'address', name: 'token', type: 'address' },
76
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
77
+ { internalType: 'uint256', name: 'amountOutMin', type: 'uint256' },
78
+ { internalType: 'uint256', name: 'deadline', type: 'uint256' },
79
+ ],
80
+ name: 'swapIn',
81
+ outputs: [],
82
+ stateMutability: 'nonpayable',
83
+ type: 'function',
84
+ },
85
+ {
86
+ inputs: [
87
+ { internalType: 'address', name: 'token', type: 'address' },
88
+ { internalType: 'address', name: 'to', type: 'address' },
89
+ { internalType: 'uint256', name: 'amountOutMin', type: 'uint256' },
90
+ ],
91
+ name: 'swapOut',
92
+ outputs: [],
93
+ stateMutability: 'payable',
94
+ type: 'function',
95
+ },
96
+ {
97
+ inputs: [],
98
+ name: 'swapRouter',
99
+ outputs: [{ internalType: 'contract IUniswapRouterV2', name: '', type: 'address' }],
100
+ stateMutability: 'view',
101
+ type: 'function',
102
+ },
103
+ {
104
+ inputs: [],
105
+ name: 'tokenTransferProxy',
106
+ outputs: [
107
+ { internalType: 'contract TSAggregatorTokenTransferProxy', name: '', type: 'address' },
108
+ ],
109
+ stateMutability: 'view',
110
+ type: 'function',
111
+ },
112
+ {
113
+ inputs: [],
114
+ name: 'weth',
115
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
116
+ stateMutability: 'view',
117
+ type: 'function',
118
+ },
119
+ { stateMutability: 'payable', type: 'receive' },
120
+ ];
@@ -0,0 +1,120 @@
1
+ export const traderJoe = [
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
+ inputs: [],
31
+ name: 'fee',
32
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
33
+ stateMutability: 'view',
34
+ type: 'function',
35
+ },
36
+ {
37
+ inputs: [],
38
+ name: 'feeRecipient',
39
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
40
+ stateMutability: 'view',
41
+ type: 'function',
42
+ },
43
+ {
44
+ inputs: [{ internalType: 'address', name: '', type: 'address' }],
45
+ name: 'owners',
46
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
47
+ stateMutability: 'view',
48
+ type: 'function',
49
+ },
50
+ {
51
+ inputs: [
52
+ { internalType: 'uint256', name: '_fee', type: 'uint256' },
53
+ { internalType: 'address', name: '_feeRecipient', type: 'address' },
54
+ ],
55
+ name: 'setFee',
56
+ outputs: [],
57
+ stateMutability: 'nonpayable',
58
+ type: 'function',
59
+ },
60
+ {
61
+ inputs: [
62
+ { internalType: 'address', name: 'owner', type: 'address' },
63
+ { internalType: 'bool', name: 'active', type: 'bool' },
64
+ ],
65
+ name: 'setOwner',
66
+ outputs: [],
67
+ stateMutability: 'nonpayable',
68
+ type: 'function',
69
+ },
70
+ {
71
+ inputs: [
72
+ { internalType: 'address', name: 'tcRouter', type: 'address' },
73
+ { internalType: 'address', name: 'tcVault', type: 'address' },
74
+ { internalType: 'string', name: 'tcMemo', type: 'string' },
75
+ { internalType: 'address', name: 'token', type: 'address' },
76
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
77
+ { internalType: 'uint256', name: 'amountOutMin', type: 'uint256' },
78
+ { internalType: 'uint256', name: 'deadline', type: 'uint256' },
79
+ ],
80
+ name: 'swapIn',
81
+ outputs: [],
82
+ stateMutability: 'nonpayable',
83
+ type: 'function',
84
+ },
85
+ {
86
+ inputs: [
87
+ { internalType: 'address', name: 'token', type: 'address' },
88
+ { internalType: 'address', name: 'to', type: 'address' },
89
+ { internalType: 'uint256', name: 'amountOutMin', type: 'uint256' },
90
+ ],
91
+ name: 'swapOut',
92
+ outputs: [],
93
+ stateMutability: 'payable',
94
+ type: 'function',
95
+ },
96
+ {
97
+ inputs: [],
98
+ name: 'swapRouter',
99
+ outputs: [{ internalType: 'contract IUniswapRouterV2AVAX', name: '', type: 'address' }],
100
+ stateMutability: 'view',
101
+ type: 'function',
102
+ },
103
+ {
104
+ inputs: [],
105
+ name: 'tokenTransferProxy',
106
+ outputs: [
107
+ { internalType: 'contract TSAggregatorTokenTransferProxy', name: '', type: 'address' },
108
+ ],
109
+ stateMutability: 'view',
110
+ type: 'function',
111
+ },
112
+ {
113
+ inputs: [],
114
+ name: 'weth',
115
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
116
+ stateMutability: 'view',
117
+ type: 'function',
118
+ },
119
+ { stateMutability: 'payable', type: 'receive' },
120
+ ];
@@ -0,0 +1,120 @@
1
+ export const uniswapV2 = [
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
+ inputs: [],
31
+ name: 'fee',
32
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
33
+ stateMutability: 'view',
34
+ type: 'function',
35
+ },
36
+ {
37
+ inputs: [],
38
+ name: 'feeRecipient',
39
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
40
+ stateMutability: 'view',
41
+ type: 'function',
42
+ },
43
+ {
44
+ inputs: [{ internalType: 'address', name: '', type: 'address' }],
45
+ name: 'owners',
46
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
47
+ stateMutability: 'view',
48
+ type: 'function',
49
+ },
50
+ {
51
+ inputs: [
52
+ { internalType: 'uint256', name: '_fee', type: 'uint256' },
53
+ { internalType: 'address', name: '_feeRecipient', type: 'address' },
54
+ ],
55
+ name: 'setFee',
56
+ outputs: [],
57
+ stateMutability: 'nonpayable',
58
+ type: 'function',
59
+ },
60
+ {
61
+ inputs: [
62
+ { internalType: 'address', name: 'owner', type: 'address' },
63
+ { internalType: 'bool', name: 'active', type: 'bool' },
64
+ ],
65
+ name: 'setOwner',
66
+ outputs: [],
67
+ stateMutability: 'nonpayable',
68
+ type: 'function',
69
+ },
70
+ {
71
+ inputs: [
72
+ { internalType: 'address', name: 'tcRouter', type: 'address' },
73
+ { internalType: 'address', name: 'tcVault', type: 'address' },
74
+ { internalType: 'string', name: 'tcMemo', type: 'string' },
75
+ { internalType: 'address', name: 'token', type: 'address' },
76
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
77
+ { internalType: 'uint256', name: 'amountOutMin', type: 'uint256' },
78
+ { internalType: 'uint256', name: 'deadline', type: 'uint256' },
79
+ ],
80
+ name: 'swapIn',
81
+ outputs: [],
82
+ stateMutability: 'nonpayable',
83
+ type: 'function',
84
+ },
85
+ {
86
+ inputs: [
87
+ { internalType: 'address', name: 'token', type: 'address' },
88
+ { internalType: 'address', name: 'to', type: 'address' },
89
+ { internalType: 'uint256', name: 'amountOutMin', type: 'uint256' },
90
+ ],
91
+ name: 'swapOut',
92
+ outputs: [],
93
+ stateMutability: 'payable',
94
+ type: 'function',
95
+ },
96
+ {
97
+ inputs: [],
98
+ name: 'swapRouter',
99
+ outputs: [{ internalType: 'contract IUniswapRouterV2', name: '', type: 'address' }],
100
+ stateMutability: 'view',
101
+ type: 'function',
102
+ },
103
+ {
104
+ inputs: [],
105
+ name: 'tokenTransferProxy',
106
+ outputs: [
107
+ { internalType: 'contract TSAggregatorTokenTransferProxy', name: '', type: 'address' },
108
+ ],
109
+ stateMutability: 'view',
110
+ type: 'function',
111
+ },
112
+ {
113
+ inputs: [],
114
+ name: 'weth',
115
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
116
+ stateMutability: 'view',
117
+ type: 'function',
118
+ },
119
+ { stateMutability: 'payable', type: 'receive' },
120
+ ];