genius-intents 0.17.5 → 0.18.1-develop.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 +79 -0
- package/dist/direct-pools/fourmeme/fourmeme-direct.config.d.ts +9 -0
- package/dist/direct-pools/fourmeme/fourmeme-direct.config.d.ts.map +1 -0
- package/dist/direct-pools/fourmeme/fourmeme-direct.config.js +14 -0
- package/dist/direct-pools/fourmeme/fourmeme-direct.config.js.map +1 -0
- package/dist/direct-pools/fourmeme/fourmeme-direct.service.d.ts +38 -0
- package/dist/direct-pools/fourmeme/fourmeme-direct.service.d.ts.map +1 -0
- package/dist/direct-pools/fourmeme/fourmeme-direct.service.js +308 -0
- package/dist/direct-pools/fourmeme/fourmeme-direct.service.js.map +1 -0
- package/dist/direct-pools/fourmeme/fourmeme-direct.types.d.ts +41 -0
- package/dist/direct-pools/fourmeme/fourmeme-direct.types.d.ts.map +1 -0
- package/dist/direct-pools/fourmeme/fourmeme-direct.types.js +3 -0
- package/dist/direct-pools/fourmeme/fourmeme-direct.types.js.map +1 -0
- package/dist/lib/dex/hyperswap/hyperswapV2-router.abi.d.ts +3 -0
- package/dist/lib/dex/hyperswap/hyperswapV2-router.abi.d.ts.map +1 -0
- package/dist/lib/dex/hyperswap/hyperswapV2-router.abi.js +249 -0
- package/dist/lib/dex/hyperswap/hyperswapV2-router.abi.js.map +1 -0
- package/dist/protocols/four-meme/four-meme.service.d.ts +23 -43
- package/dist/protocols/four-meme/four-meme.service.d.ts.map +1 -1
- package/dist/protocols/four-meme/four-meme.service.js +391 -157
- package/dist/protocols/four-meme/four-meme.service.js.map +1 -1
- package/dist/protocols/four-meme/four-meme.types.d.ts +47 -0
- package/dist/protocols/four-meme/four-meme.types.d.ts.map +1 -1
- package/dist/protocols/lifi/lifi.service.d.ts.map +1 -1
- package/dist/protocols/lifi/lifi.service.js +2 -0
- package/dist/protocols/lifi/lifi.service.js.map +1 -1
- package/dist/protocols/relay/relay.service.d.ts.map +1 -1
- package/dist/protocols/relay/relay.service.js +1 -0
- package/dist/protocols/relay/relay.service.js.map +1 -1
- package/dist/protocols/v2-dex/v2-dex.service.d.ts +1 -0
- package/dist/protocols/v2-dex/v2-dex.service.d.ts.map +1 -1
- package/dist/protocols/v2-dex/v2-dex.service.js +43 -67
- package/dist/protocols/v2-dex/v2-dex.service.js.map +1 -1
- package/dist/protocols/v2-dex/v2-dex.types.d.ts +9 -2
- package/dist/protocols/v2-dex/v2-dex.types.d.ts.map +1 -1
- package/dist/protocols/v2-dex/v2-dex.types.js +1 -0
- package/dist/protocols/v2-dex/v2-dex.types.js.map +1 -1
- package/dist/protocols/v3-dex/v3-dex.service.d.ts +1 -0
- package/dist/protocols/v3-dex/v3-dex.service.d.ts.map +1 -1
- package/dist/protocols/v3-dex/v3-dex.service.js +73 -16
- package/dist/protocols/v3-dex/v3-dex.service.js.map +1 -1
- package/dist/protocols/v3-dex/v3-dex.types.d.ts +2 -1
- package/dist/protocols/v3-dex/v3-dex.types.d.ts.map +1 -1
- package/dist/protocols/v3-dex/v3-dex.types.js +1 -0
- package/dist/protocols/v3-dex/v3-dex.types.js.map +1 -1
- package/dist/types/price-params.d.ts +4 -0
- package/dist/types/price-params.d.ts.map +1 -1
- package/dist/types/price-response.d.ts +2 -1
- package/dist/types/price-response.d.ts.map +1 -1
- package/dist/types/quote-response.d.ts +2 -1
- package/dist/types/quote-response.d.ts.map +1 -1
- package/dist/utils/check-vm.d.ts.map +1 -1
- package/dist/utils/check-vm.js +2 -1
- package/dist/utils/check-vm.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hyperswapV2RouterAbi = void 0;
|
|
4
|
+
exports.hyperswapV2RouterAbi = [
|
|
5
|
+
{
|
|
6
|
+
inputs: [
|
|
7
|
+
{ internalType: 'address', name: '_factory', type: 'address' },
|
|
8
|
+
{ internalType: 'address', name: '_WETH', type: 'address' },
|
|
9
|
+
],
|
|
10
|
+
stateMutability: 'nonpayable',
|
|
11
|
+
type: 'constructor',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
inputs: [],
|
|
15
|
+
name: 'WETH',
|
|
16
|
+
outputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
17
|
+
stateMutability: 'view',
|
|
18
|
+
type: 'function',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
inputs: [
|
|
22
|
+
{ internalType: 'address', name: 'tokenA', type: 'address' },
|
|
23
|
+
{ internalType: 'address', name: 'tokenB', type: 'address' },
|
|
24
|
+
{ internalType: 'uint256', name: 'amountADesired', type: 'uint256' },
|
|
25
|
+
{ internalType: 'uint256', name: 'amountBDesired', type: 'uint256' },
|
|
26
|
+
{ internalType: 'uint256', name: 'amountAMin', type: 'uint256' },
|
|
27
|
+
{ internalType: 'uint256', name: 'amountBMin', type: 'uint256' },
|
|
28
|
+
{ internalType: 'address', name: 'to', type: 'address' },
|
|
29
|
+
{ internalType: 'uint256', name: 'deadline', type: 'uint256' },
|
|
30
|
+
],
|
|
31
|
+
name: 'addLiquidity',
|
|
32
|
+
outputs: [
|
|
33
|
+
{ internalType: 'uint256', name: 'amountA', type: 'uint256' },
|
|
34
|
+
{ internalType: 'uint256', name: 'amountB', type: 'uint256' },
|
|
35
|
+
{ internalType: 'uint256', name: 'liquidity', type: 'uint256' },
|
|
36
|
+
],
|
|
37
|
+
stateMutability: 'nonpayable',
|
|
38
|
+
type: 'function',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
inputs: [
|
|
42
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
|
43
|
+
{ internalType: 'uint256', name: 'amountTokenDesired', type: 'uint256' },
|
|
44
|
+
{ internalType: 'uint256', name: 'amountTokenMin', type: 'uint256' },
|
|
45
|
+
{ internalType: 'uint256', name: 'amountETHMin', type: 'uint256' },
|
|
46
|
+
{ internalType: 'address', name: 'to', type: 'address' },
|
|
47
|
+
{ internalType: 'uint256', name: 'deadline', type: 'uint256' },
|
|
48
|
+
],
|
|
49
|
+
name: 'addLiquidityETH',
|
|
50
|
+
outputs: [
|
|
51
|
+
{ internalType: 'uint256', name: 'amountToken', type: 'uint256' },
|
|
52
|
+
{ internalType: 'uint256', name: 'amountETH', type: 'uint256' },
|
|
53
|
+
{ internalType: 'uint256', name: 'liquidity', type: 'uint256' },
|
|
54
|
+
],
|
|
55
|
+
stateMutability: 'payable',
|
|
56
|
+
type: 'function',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
inputs: [],
|
|
60
|
+
name: 'factory',
|
|
61
|
+
outputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
62
|
+
stateMutability: 'view',
|
|
63
|
+
type: 'function',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
inputs: [
|
|
67
|
+
{ internalType: 'uint256', name: 'amountIn', type: 'uint256' },
|
|
68
|
+
{ internalType: 'address[]', name: 'path', type: 'address[]' },
|
|
69
|
+
],
|
|
70
|
+
name: 'getAmountsOut',
|
|
71
|
+
outputs: [{ internalType: 'uint256[]', name: 'amounts', type: 'uint256[]' }],
|
|
72
|
+
stateMutability: 'view',
|
|
73
|
+
type: 'function',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
inputs: [
|
|
77
|
+
{ internalType: 'address', name: 'token1', type: 'address' },
|
|
78
|
+
{ internalType: 'address', name: 'token2', type: 'address' },
|
|
79
|
+
],
|
|
80
|
+
name: 'getPair',
|
|
81
|
+
outputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
82
|
+
stateMutability: 'view',
|
|
83
|
+
type: 'function',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
inputs: [
|
|
87
|
+
{ internalType: 'uint256', name: 'amountA', type: 'uint256' },
|
|
88
|
+
{ internalType: 'uint256', name: 'reserveA', type: 'uint256' },
|
|
89
|
+
{ internalType: 'uint256', name: 'reserveB', type: 'uint256' },
|
|
90
|
+
],
|
|
91
|
+
name: 'quote',
|
|
92
|
+
outputs: [{ internalType: 'uint256', name: 'amountB', type: 'uint256' }],
|
|
93
|
+
stateMutability: 'pure',
|
|
94
|
+
type: 'function',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
inputs: [
|
|
98
|
+
{ internalType: 'address', name: 'tokenA', type: 'address' },
|
|
99
|
+
{ internalType: 'address', name: 'tokenB', type: 'address' },
|
|
100
|
+
{ internalType: 'uint256', name: 'liquidity', type: 'uint256' },
|
|
101
|
+
{ internalType: 'uint256', name: 'amountAMin', type: 'uint256' },
|
|
102
|
+
{ internalType: 'uint256', name: 'amountBMin', type: 'uint256' },
|
|
103
|
+
{ internalType: 'address', name: 'to', type: 'address' },
|
|
104
|
+
{ internalType: 'uint256', name: 'deadline', type: 'uint256' },
|
|
105
|
+
],
|
|
106
|
+
name: 'removeLiquidity',
|
|
107
|
+
outputs: [
|
|
108
|
+
{ internalType: 'uint256', name: 'amountA', type: 'uint256' },
|
|
109
|
+
{ internalType: 'uint256', name: 'amountB', type: 'uint256' },
|
|
110
|
+
],
|
|
111
|
+
stateMutability: 'nonpayable',
|
|
112
|
+
type: 'function',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
inputs: [
|
|
116
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
|
117
|
+
{ internalType: 'uint256', name: 'liquidity', type: 'uint256' },
|
|
118
|
+
{ internalType: 'uint256', name: 'amountTokenMin', type: 'uint256' },
|
|
119
|
+
{ internalType: 'uint256', name: 'amountETHMin', type: 'uint256' },
|
|
120
|
+
{ internalType: 'address', name: 'to', type: 'address' },
|
|
121
|
+
{ internalType: 'uint256', name: 'deadline', type: 'uint256' },
|
|
122
|
+
],
|
|
123
|
+
name: 'removeLiquidityETH',
|
|
124
|
+
outputs: [
|
|
125
|
+
{ internalType: 'uint256', name: 'amountToken', type: 'uint256' },
|
|
126
|
+
{ internalType: 'uint256', name: 'amountETH', type: 'uint256' },
|
|
127
|
+
],
|
|
128
|
+
stateMutability: 'nonpayable',
|
|
129
|
+
type: 'function',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
inputs: [
|
|
133
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
|
134
|
+
{ internalType: 'uint256', name: 'liquidity', type: 'uint256' },
|
|
135
|
+
{ internalType: 'uint256', name: 'amountTokenMin', type: 'uint256' },
|
|
136
|
+
{ internalType: 'uint256', name: 'amountETHMin', type: 'uint256' },
|
|
137
|
+
{ internalType: 'address', name: 'to', type: 'address' },
|
|
138
|
+
{ internalType: 'uint256', name: 'deadline', type: 'uint256' },
|
|
139
|
+
],
|
|
140
|
+
name: 'removeLiquidityETHSupportingFeeOnTransferTokens',
|
|
141
|
+
outputs: [{ internalType: 'uint256', name: 'amountETH', type: 'uint256' }],
|
|
142
|
+
stateMutability: 'nonpayable',
|
|
143
|
+
type: 'function',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
inputs: [
|
|
147
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
|
148
|
+
{ internalType: 'uint256', name: 'liquidity', type: 'uint256' },
|
|
149
|
+
{ internalType: 'uint256', name: 'amountTokenMin', type: 'uint256' },
|
|
150
|
+
{ internalType: 'uint256', name: 'amountETHMin', type: 'uint256' },
|
|
151
|
+
{ internalType: 'address', name: 'to', type: 'address' },
|
|
152
|
+
{ internalType: 'uint256', name: 'deadline', type: 'uint256' },
|
|
153
|
+
{ internalType: 'bool', name: 'approveMax', type: 'bool' },
|
|
154
|
+
{ internalType: 'uint8', name: 'v', type: 'uint8' },
|
|
155
|
+
{ internalType: 'bytes32', name: 'r', type: 'bytes32' },
|
|
156
|
+
{ internalType: 'bytes32', name: 's', type: 'bytes32' },
|
|
157
|
+
],
|
|
158
|
+
name: 'removeLiquidityETHWithPermit',
|
|
159
|
+
outputs: [
|
|
160
|
+
{ internalType: 'uint256', name: 'amountToken', type: 'uint256' },
|
|
161
|
+
{ internalType: 'uint256', name: 'amountETH', type: 'uint256' },
|
|
162
|
+
],
|
|
163
|
+
stateMutability: 'nonpayable',
|
|
164
|
+
type: 'function',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
inputs: [
|
|
168
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
|
169
|
+
{ internalType: 'uint256', name: 'liquidity', type: 'uint256' },
|
|
170
|
+
{ internalType: 'uint256', name: 'amountTokenMin', type: 'uint256' },
|
|
171
|
+
{ internalType: 'uint256', name: 'amountETHMin', type: 'uint256' },
|
|
172
|
+
{ internalType: 'address', name: 'to', type: 'address' },
|
|
173
|
+
{ internalType: 'uint256', name: 'deadline', type: 'uint256' },
|
|
174
|
+
{ internalType: 'bool', name: 'approveMax', type: 'bool' },
|
|
175
|
+
{ internalType: 'uint8', name: 'v', type: 'uint8' },
|
|
176
|
+
{ internalType: 'bytes32', name: 'r', type: 'bytes32' },
|
|
177
|
+
{ internalType: 'bytes32', name: 's', type: 'bytes32' },
|
|
178
|
+
],
|
|
179
|
+
name: 'removeLiquidityETHWithPermitSupportingFeeOnTransferTokens',
|
|
180
|
+
outputs: [{ internalType: 'uint256', name: 'amountETH', type: 'uint256' }],
|
|
181
|
+
stateMutability: 'nonpayable',
|
|
182
|
+
type: 'function',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
inputs: [
|
|
186
|
+
{ internalType: 'address', name: 'tokenA', type: 'address' },
|
|
187
|
+
{ internalType: 'address', name: 'tokenB', type: 'address' },
|
|
188
|
+
{ internalType: 'uint256', name: 'liquidity', type: 'uint256' },
|
|
189
|
+
{ internalType: 'uint256', name: 'amountAMin', type: 'uint256' },
|
|
190
|
+
{ internalType: 'uint256', name: 'amountBMin', type: 'uint256' },
|
|
191
|
+
{ internalType: 'address', name: 'to', type: 'address' },
|
|
192
|
+
{ internalType: 'uint256', name: 'deadline', type: 'uint256' },
|
|
193
|
+
{ internalType: 'bool', name: 'approveMax', type: 'bool' },
|
|
194
|
+
{ internalType: 'uint8', name: 'v', type: 'uint8' },
|
|
195
|
+
{ internalType: 'bytes32', name: 'r', type: 'bytes32' },
|
|
196
|
+
{ internalType: 'bytes32', name: 's', type: 'bytes32' },
|
|
197
|
+
],
|
|
198
|
+
name: 'removeLiquidityWithPermit',
|
|
199
|
+
outputs: [
|
|
200
|
+
{ internalType: 'uint256', name: 'amountA', type: 'uint256' },
|
|
201
|
+
{ internalType: 'uint256', name: 'amountB', type: 'uint256' },
|
|
202
|
+
],
|
|
203
|
+
stateMutability: 'nonpayable',
|
|
204
|
+
type: 'function',
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
inputs: [
|
|
208
|
+
{ internalType: 'uint256', name: 'amountOutMin', type: 'uint256' },
|
|
209
|
+
{ internalType: 'address[]', name: 'path', type: 'address[]' },
|
|
210
|
+
{ internalType: 'address', name: 'to', type: 'address' },
|
|
211
|
+
{ internalType: 'address', name: 'referrer', type: 'address' },
|
|
212
|
+
{ internalType: 'uint256', name: 'deadline', type: 'uint256' },
|
|
213
|
+
],
|
|
214
|
+
name: 'swapExactETHForTokensSupportingFeeOnTransferTokens',
|
|
215
|
+
outputs: [],
|
|
216
|
+
stateMutability: 'payable',
|
|
217
|
+
type: 'function',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
inputs: [
|
|
221
|
+
{ internalType: 'uint256', name: 'amountIn', type: 'uint256' },
|
|
222
|
+
{ internalType: 'uint256', name: 'amountOutMin', type: 'uint256' },
|
|
223
|
+
{ internalType: 'address[]', name: 'path', type: 'address[]' },
|
|
224
|
+
{ internalType: 'address', name: 'to', type: 'address' },
|
|
225
|
+
{ internalType: 'address', name: 'referrer', type: 'address' },
|
|
226
|
+
{ internalType: 'uint256', name: 'deadline', type: 'uint256' },
|
|
227
|
+
],
|
|
228
|
+
name: 'swapExactTokensForETHSupportingFeeOnTransferTokens',
|
|
229
|
+
outputs: [],
|
|
230
|
+
stateMutability: 'nonpayable',
|
|
231
|
+
type: 'function',
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
inputs: [
|
|
235
|
+
{ internalType: 'uint256', name: 'amountIn', type: 'uint256' },
|
|
236
|
+
{ internalType: 'uint256', name: 'amountOutMin', type: 'uint256' },
|
|
237
|
+
{ internalType: 'address[]', name: 'path', type: 'address[]' },
|
|
238
|
+
{ internalType: 'address', name: 'to', type: 'address' },
|
|
239
|
+
{ internalType: 'address', name: 'referrer', type: 'address' },
|
|
240
|
+
{ internalType: 'uint256', name: 'deadline', type: 'uint256' },
|
|
241
|
+
],
|
|
242
|
+
name: 'swapExactTokensForTokensSupportingFeeOnTransferTokens',
|
|
243
|
+
outputs: [],
|
|
244
|
+
stateMutability: 'nonpayable',
|
|
245
|
+
type: 'function',
|
|
246
|
+
},
|
|
247
|
+
{ stateMutability: 'payable', type: 'receive' },
|
|
248
|
+
];
|
|
249
|
+
//# sourceMappingURL=hyperswapV2-router.abi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hyperswapV2-router.abi.js","sourceRoot":"","sources":["../../../../src/lib/dex/hyperswap/hyperswapV2-router.abi.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAQ;IACvC;QACE,MAAM,EAAE;YACN,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9D,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;SAC5D;QACD,eAAe,EAAE,YAAY;QAC7B,IAAI,EAAE,aAAa;KACpB;IACD;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACjE,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;IACD;QACE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AC7B,IAAI,EAAE,UAAU;KACjB;IACD,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;CACvC,CAAC"}
|
|
@@ -11,50 +11,42 @@ import { IntentQuoteParams } from '../../types/quote-params';
|
|
|
11
11
|
* using the four.meme TokenManager contracts. It provides functionality for fetching price quotes
|
|
12
12
|
* and generating transaction data for token swaps on BSC where either input or output must be BNB.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
14
|
+
* NOTE: Per your request, legacy ABIs and legacy BNB↔BNB-paired behavior are UNCHANGED.
|
|
15
|
+
* We only add optional paths that call HelperV3.buyWithEth / HelperV3.sellForEth for ERC20-quoted pairs.
|
|
15
16
|
*/
|
|
16
17
|
export declare class FourMemeService implements IIntentProtocol {
|
|
17
|
-
/**
|
|
18
|
-
* The protocol identifier for four.meme Protocol.
|
|
19
|
-
*/
|
|
20
18
|
readonly protocol = ProtocolEnum.FOUR_MEME;
|
|
21
|
-
/**
|
|
22
|
-
* The list of blockchain networks supported by the four.meme service.
|
|
23
|
-
*/
|
|
24
19
|
readonly chains: ChainIdEnum[];
|
|
25
|
-
/**
|
|
26
|
-
* Indicates that the service operates only on a single blockchain.
|
|
27
|
-
*/
|
|
28
20
|
readonly singleChain = true;
|
|
29
|
-
/**
|
|
30
|
-
* Indicates that the service does not support cross-chain operations.
|
|
31
|
-
*/
|
|
32
21
|
readonly multiChain = false;
|
|
33
22
|
/**
|
|
34
|
-
*
|
|
23
|
+
* TokenManagerHelper V3 (wrapper)
|
|
35
24
|
*/
|
|
36
25
|
private readonly _tokenManagerHelperV3;
|
|
26
|
+
private _viem;
|
|
37
27
|
/**
|
|
38
|
-
*
|
|
28
|
+
* ABI for TokenManager V1 contract
|
|
29
|
+
* (UNCHANGED)
|
|
39
30
|
*/
|
|
40
|
-
private
|
|
31
|
+
private readonly _tokenManagerV1Abi;
|
|
41
32
|
/**
|
|
42
|
-
*
|
|
33
|
+
* ABI for TokenManager V2 contract
|
|
34
|
+
* (UNCHANGED, even if signatures look odd — preserving your legacy logic)
|
|
43
35
|
*/
|
|
44
|
-
private
|
|
36
|
+
private readonly _tokenManagerV2Abi;
|
|
45
37
|
/**
|
|
46
|
-
* ABI for
|
|
38
|
+
* Secondary ABI for TokenManager V2 (UNCHANGED)
|
|
47
39
|
*/
|
|
48
|
-
private readonly
|
|
40
|
+
private readonly _tokenManagerV2SecondaryAbi;
|
|
49
41
|
/**
|
|
50
|
-
*
|
|
42
|
+
* Helper V3 read ABI (UNCHANGED)
|
|
51
43
|
*/
|
|
52
|
-
private readonly
|
|
44
|
+
private readonly _helperViemAbi;
|
|
53
45
|
/**
|
|
54
|
-
* ABI for
|
|
46
|
+
* NEW: Minimal Helper V3 tx ABI for the new entrypoints.
|
|
47
|
+
* We keep it separate so original ABIs & logic remain untouched.
|
|
55
48
|
*/
|
|
56
|
-
private readonly
|
|
57
|
-
private readonly _tokenManagerV2SecondaryAbi;
|
|
49
|
+
private readonly _helperV3EthAbi;
|
|
58
50
|
constructor(config: GeniusIntentsSDKConfig & FourMemeConfig);
|
|
59
51
|
isCorrectConfig<T extends {
|
|
60
52
|
[key: string]: string;
|
|
@@ -75,33 +67,21 @@ export declare class FourMemeService implements IIntentProtocol {
|
|
|
75
67
|
private _determineSwapDirection;
|
|
76
68
|
/**
|
|
77
69
|
* Applies slippage to an amount.
|
|
78
|
-
*
|
|
79
|
-
* @param {string} amount - The base amount.
|
|
80
|
-
* @param {number} slippage - The slippage percentage (0.01 = 1%).
|
|
81
|
-
* @param {boolean} isMaximum - Whether to calculate maximum (true) or minimum (false) amount.
|
|
82
|
-
*
|
|
83
|
-
* @returns {string} The amount with slippage applied.
|
|
84
70
|
*/
|
|
85
71
|
private _applySlippage;
|
|
86
72
|
/**
|
|
87
73
|
* Formats the given amount string to ensure it is divisible by 1 GWEI (10^9 wei).
|
|
88
|
-
*
|
|
89
|
-
* This method is used to avoid "GWEI" errors from the four meme contracts by aligning
|
|
90
|
-
* the amount to the nearest lower value that is divisible by GWEI. If the input amount
|
|
91
|
-
* is already divisible by GWEI, it is returned as-is. If the aligned amount would be zero,
|
|
92
|
-
* the method returns the minimum value of 1 GWEI.
|
|
93
|
-
*
|
|
94
|
-
* @param amount - The amount to format, represented as a string.
|
|
95
|
-
* @returns The formatted amount as a string, guaranteed to be divisible by 1 GWEI and never zero.
|
|
74
|
+
* Avoids "GW - GWEI" errors.
|
|
96
75
|
*/
|
|
97
76
|
private _formatAmount;
|
|
77
|
+
/**
|
|
78
|
+
* Determines if the provided address matches any of the predefined quote token addresses.
|
|
79
|
+
*/
|
|
80
|
+
private _isQuoteAddress;
|
|
98
81
|
/**
|
|
99
82
|
* Validates the parameters for a price quote request.
|
|
100
|
-
*
|
|
101
|
-
* @param {PriceParams} params - The parameters to validate.
|
|
102
|
-
*
|
|
103
|
-
* @throws {SdkError} If any of the parameters are invalid or unsupported.
|
|
104
83
|
*/
|
|
105
84
|
protected validatePriceParams(params: IntentPriceParams): void;
|
|
85
|
+
private _minOutFromEstimated;
|
|
106
86
|
}
|
|
107
87
|
//# sourceMappingURL=four-meme.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"four-meme.service.d.ts","sourceRoot":"","sources":["../../../src/protocols/four-meme/four-meme.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"four-meme.service.d.ts","sourceRoot":"","sources":["../../../src/protocols/four-meme/four-meme.service.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,cAAc,EAId,qBAAqB,EAGtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAK3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CA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