@defisaver/sdk 1.3.33 → 1.3.35
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/AccessLists/UtilsAccessLists.ts +0 -4
- package/esm/AccessLists/UtilsAccessLists.js +0 -3
- package/esm/src/DfsWeb3.js +10 -2
- package/esm/src/abis/DFSProxyRegistry.json +250 -42
- package/esm/src/actions/aavev4/AaveV4DelegateBorrowAction.d.ts +16 -0
- package/esm/src/actions/aavev4/AaveV4DelegateBorrowAction.js +24 -0
- package/esm/src/actions/aavev4/AaveV4DelegateSetUsingAsCollateralAction.d.ts +15 -0
- package/esm/src/actions/aavev4/AaveV4DelegateSetUsingAsCollateralAction.js +22 -0
- package/esm/src/actions/aavev4/AaveV4DelegateWithdrawAction.d.ts +16 -0
- package/esm/src/actions/aavev4/AaveV4DelegateWithdrawAction.js +24 -0
- package/esm/src/actions/aavev4/AaveV4SetUserManagersAction.d.ts +14 -0
- package/esm/src/actions/aavev4/AaveV4SetUserManagersAction.js +16 -0
- package/esm/src/actions/aavev4/index.d.ts +4 -0
- package/esm/src/actions/aavev4/index.js +4 -0
- package/esm/src/addresses.d.ts +24 -0
- package/esm/src/addresses.js +9 -5
- package/esm/src/index.d.ts +96 -0
- package/package.json +1 -1
- package/src/DfsWeb3.ts +8 -2
- package/src/abis/DFSProxyRegistry.json +251 -43
- package/src/actions/aavev4/AaveV4DelegateBorrowAction.ts +36 -0
- package/src/actions/aavev4/AaveV4DelegateSetUsingAsCollateralAction.ts +33 -0
- package/src/actions/aavev4/AaveV4DelegateWithdrawAction.ts +36 -0
- package/src/actions/aavev4/AaveV4SetUserManagersAction.ts +26 -0
- package/src/actions/aavev4/index.ts +5 -1
- package/src/addresses.ts +9 -5
- package/test/DfsWeb3.js +4 -2
- package/test/accessLists/MockAccessLists.json +0 -13
- package/umd/index.js +246 -109
|
@@ -13,9 +13,6 @@ export const UtilsAccessLists = {
|
|
|
13
13
|
PullToken: [],
|
|
14
14
|
SumInputs: [],
|
|
15
15
|
SubInputs: [],
|
|
16
|
-
ChangeProxyOwner: [
|
|
17
|
-
['0xF8f8B3C98Cf2E63Df3041b73f80F362a4cf3A576', []], // DFSProxyRegistryController
|
|
18
|
-
],
|
|
19
16
|
TokenBalance: [],
|
|
20
17
|
AutomationV2Unsub: [
|
|
21
18
|
['0x5c55B921f590a89C1Ebe84dF170E655a82b62126', []], // DefisaverLogger
|
package/esm/src/DfsWeb3.js
CHANGED
|
@@ -34,6 +34,7 @@ export class DfsWeb3 {
|
|
|
34
34
|
throw new Error('Method not implemented.');
|
|
35
35
|
}
|
|
36
36
|
prepareAccount() {
|
|
37
|
+
var _a, _b, _c;
|
|
37
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
39
|
const accounts = yield this.web3.eth.getAccounts();
|
|
39
40
|
if (!accounts || !accounts.length)
|
|
@@ -42,8 +43,15 @@ export class DfsWeb3 {
|
|
|
42
43
|
const DFSPRoxyRegistyAbiItems = DFSPRoxyRegistyAbi.map(item => (Object.assign(Object.assign({}, item), { stateMutability: item.stateMutability, type: item.type })));
|
|
43
44
|
const dfsRegistry = new this.web3.eth.Contract(DFSPRoxyRegistyAbiItems, getAddr('DFSProxyRegistry', CONFIG.chainId));
|
|
44
45
|
const proxies = yield dfsRegistry.methods.getAllProxies(this.account).call();
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
const mcdProxy = (_a = proxies.mcdProxy) !== null && _a !== void 0 ? _a : proxies[0];
|
|
47
|
+
const additionalProxies = (_c = (_b = proxies.validAdditionalProxies) !== null && _b !== void 0 ? _b : proxies[1]) !== null && _c !== void 0 ? _c : [];
|
|
48
|
+
// DFSProxyRegistryV2 only returns mcdProxy when Maker registry still matches current owner.
|
|
49
|
+
// Ownership-transferred wallets show up in validAdditionalProxies instead.
|
|
50
|
+
if (mcdProxy && mcdProxy !== '0x0000000000000000000000000000000000000000') {
|
|
51
|
+
this.proxy = mcdProxy;
|
|
52
|
+
}
|
|
53
|
+
else if (additionalProxies.length > 0) {
|
|
54
|
+
this.proxy = additionalProxies[0];
|
|
47
55
|
}
|
|
48
56
|
this.accountReady = true;
|
|
49
57
|
});
|
|
@@ -3,50 +3,144 @@
|
|
|
3
3
|
"inputs": [
|
|
4
4
|
{
|
|
5
5
|
"internalType": "address",
|
|
6
|
-
"name": "
|
|
6
|
+
"name": "proxy",
|
|
7
|
+
"type": "address"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"name": "InvalidDSProxy",
|
|
11
|
+
"type": "error"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"inputs": [],
|
|
15
|
+
"name": "NonContractCall",
|
|
16
|
+
"type": "error"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"inputs": [],
|
|
20
|
+
"name": "SenderNotAdmin",
|
|
21
|
+
"type": "error"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"inputs": [],
|
|
25
|
+
"name": "SenderNotOwner",
|
|
26
|
+
"type": "error"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"inputs": [
|
|
30
|
+
{
|
|
31
|
+
"internalType": "address",
|
|
32
|
+
"name": "sender",
|
|
7
33
|
"type": "address"
|
|
8
34
|
},
|
|
9
35
|
{
|
|
10
36
|
"internalType": "address",
|
|
11
|
-
"name": "
|
|
37
|
+
"name": "user",
|
|
12
38
|
"type": "address"
|
|
13
39
|
}
|
|
14
40
|
],
|
|
15
|
-
"name": "
|
|
16
|
-
"
|
|
17
|
-
"stateMutability": "nonpayable",
|
|
18
|
-
"type": "function"
|
|
41
|
+
"name": "SenderNotUserOrOwner",
|
|
42
|
+
"type": "error"
|
|
19
43
|
},
|
|
20
44
|
{
|
|
45
|
+
"anonymous": false,
|
|
21
46
|
"inputs": [
|
|
22
47
|
{
|
|
48
|
+
"indexed": true,
|
|
23
49
|
"internalType": "address",
|
|
24
|
-
"name": "",
|
|
50
|
+
"name": "user",
|
|
25
51
|
"type": "address"
|
|
26
52
|
},
|
|
27
53
|
{
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
54
|
+
"indexed": true,
|
|
55
|
+
"internalType": "address",
|
|
56
|
+
"name": "proxy",
|
|
57
|
+
"type": "address"
|
|
31
58
|
}
|
|
32
59
|
],
|
|
33
|
-
"name": "
|
|
34
|
-
"
|
|
60
|
+
"name": "AdditionalProxyAdded",
|
|
61
|
+
"type": "event"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"anonymous": false,
|
|
65
|
+
"inputs": [
|
|
35
66
|
{
|
|
67
|
+
"indexed": true,
|
|
36
68
|
"internalType": "address",
|
|
37
|
-
"name": "",
|
|
69
|
+
"name": "user",
|
|
70
|
+
"type": "address"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"indexed": true,
|
|
74
|
+
"internalType": "address",
|
|
75
|
+
"name": "proxy",
|
|
38
76
|
"type": "address"
|
|
39
77
|
}
|
|
40
78
|
],
|
|
41
|
-
"
|
|
42
|
-
"type": "
|
|
79
|
+
"name": "AdditionalProxyRemoved",
|
|
80
|
+
"type": "event"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"anonymous": false,
|
|
84
|
+
"inputs": [
|
|
85
|
+
{
|
|
86
|
+
"indexed": true,
|
|
87
|
+
"internalType": "address",
|
|
88
|
+
"name": "user",
|
|
89
|
+
"type": "address"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"indexed": true,
|
|
93
|
+
"internalType": "address",
|
|
94
|
+
"name": "proxy",
|
|
95
|
+
"type": "address"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"indexed": true,
|
|
99
|
+
"internalType": "address",
|
|
100
|
+
"name": "caller",
|
|
101
|
+
"type": "address"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"indexed": false,
|
|
105
|
+
"internalType": "bool",
|
|
106
|
+
"name": "excluded",
|
|
107
|
+
"type": "bool"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"name": "ProxyExclusionUpdated",
|
|
111
|
+
"type": "event"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"anonymous": false,
|
|
115
|
+
"inputs": [
|
|
116
|
+
{
|
|
117
|
+
"indexed": true,
|
|
118
|
+
"internalType": "address",
|
|
119
|
+
"name": "proxy",
|
|
120
|
+
"type": "address"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"indexed": true,
|
|
124
|
+
"internalType": "address",
|
|
125
|
+
"name": "oldOwner",
|
|
126
|
+
"type": "address"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"indexed": true,
|
|
130
|
+
"internalType": "address",
|
|
131
|
+
"name": "newOwner",
|
|
132
|
+
"type": "address"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"name": "ProxySynced",
|
|
136
|
+
"type": "event"
|
|
43
137
|
},
|
|
44
138
|
{
|
|
45
139
|
"inputs": [],
|
|
46
|
-
"name": "
|
|
140
|
+
"name": "MCD_REGISTRY",
|
|
47
141
|
"outputs": [
|
|
48
142
|
{
|
|
49
|
-
"internalType": "contract
|
|
143
|
+
"internalType": "contract IDSProxyRegistry",
|
|
50
144
|
"name": "",
|
|
51
145
|
"type": "address"
|
|
52
146
|
}
|
|
@@ -58,47 +152,82 @@
|
|
|
58
152
|
"inputs": [
|
|
59
153
|
{
|
|
60
154
|
"internalType": "address",
|
|
61
|
-
"name": "
|
|
155
|
+
"name": "user",
|
|
62
156
|
"type": "address"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"internalType": "uint256",
|
|
160
|
+
"name": "",
|
|
161
|
+
"type": "uint256"
|
|
63
162
|
}
|
|
64
163
|
],
|
|
65
|
-
"name": "
|
|
66
|
-
"outputs": [
|
|
67
|
-
|
|
164
|
+
"name": "additionalProxies",
|
|
165
|
+
"outputs": [
|
|
166
|
+
{
|
|
167
|
+
"internalType": "address",
|
|
168
|
+
"name": "proxies",
|
|
169
|
+
"type": "address"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"stateMutability": "view",
|
|
68
173
|
"type": "function"
|
|
69
174
|
},
|
|
70
175
|
{
|
|
71
176
|
"inputs": [
|
|
72
177
|
{
|
|
73
178
|
"internalType": "address",
|
|
74
|
-
"name": "
|
|
179
|
+
"name": "user",
|
|
75
180
|
"type": "address"
|
|
76
181
|
},
|
|
77
182
|
{
|
|
78
183
|
"internalType": "address",
|
|
79
|
-
"name": "
|
|
184
|
+
"name": "proxy",
|
|
80
185
|
"type": "address"
|
|
81
186
|
}
|
|
82
187
|
],
|
|
83
|
-
"name": "
|
|
84
|
-
"outputs": [
|
|
85
|
-
|
|
188
|
+
"name": "additionalProxyIndex",
|
|
189
|
+
"outputs": [
|
|
190
|
+
{
|
|
191
|
+
"internalType": "uint256",
|
|
192
|
+
"name": "indexPlusOne",
|
|
193
|
+
"type": "uint256"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"stateMutability": "view",
|
|
197
|
+
"type": "function"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"inputs": [],
|
|
201
|
+
"name": "adminVault",
|
|
202
|
+
"outputs": [
|
|
203
|
+
{
|
|
204
|
+
"internalType": "contract IAdminVault",
|
|
205
|
+
"name": "",
|
|
206
|
+
"type": "address"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"stateMutability": "view",
|
|
86
210
|
"type": "function"
|
|
87
211
|
},
|
|
88
212
|
{
|
|
89
213
|
"inputs": [
|
|
90
214
|
{
|
|
91
215
|
"internalType": "address",
|
|
92
|
-
"name": "",
|
|
216
|
+
"name": "_user",
|
|
93
217
|
"type": "address"
|
|
94
218
|
}
|
|
95
219
|
],
|
|
96
|
-
"name": "
|
|
220
|
+
"name": "getAllProxies",
|
|
97
221
|
"outputs": [
|
|
98
222
|
{
|
|
99
223
|
"internalType": "address",
|
|
100
|
-
"name": "",
|
|
224
|
+
"name": "mcdProxy",
|
|
101
225
|
"type": "address"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"internalType": "address[]",
|
|
229
|
+
"name": "validAdditionalProxies",
|
|
230
|
+
"type": "address[]"
|
|
102
231
|
}
|
|
103
232
|
],
|
|
104
233
|
"stateMutability": "view",
|
|
@@ -112,20 +241,33 @@
|
|
|
112
241
|
"type": "address"
|
|
113
242
|
}
|
|
114
243
|
],
|
|
115
|
-
"name": "
|
|
244
|
+
"name": "getMcdProxy",
|
|
116
245
|
"outputs": [
|
|
117
246
|
{
|
|
118
247
|
"internalType": "address",
|
|
119
|
-
"name": "",
|
|
248
|
+
"name": "proxy",
|
|
249
|
+
"type": "address"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"stateMutability": "view",
|
|
253
|
+
"type": "function"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"inputs": [
|
|
257
|
+
{
|
|
258
|
+
"internalType": "address",
|
|
259
|
+
"name": "_user",
|
|
120
260
|
"type": "address"
|
|
121
261
|
},
|
|
122
262
|
{
|
|
123
263
|
"internalType": "address[]",
|
|
124
|
-
"name": "",
|
|
264
|
+
"name": "_proxies",
|
|
125
265
|
"type": "address[]"
|
|
126
266
|
}
|
|
127
267
|
],
|
|
128
|
-
"
|
|
268
|
+
"name": "removeAdditionalProxies",
|
|
269
|
+
"outputs": [],
|
|
270
|
+
"stateMutability": "nonpayable",
|
|
129
271
|
"type": "function"
|
|
130
272
|
},
|
|
131
273
|
{
|
|
@@ -134,33 +276,99 @@
|
|
|
134
276
|
"internalType": "address",
|
|
135
277
|
"name": "_user",
|
|
136
278
|
"type": "address"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"internalType": "address",
|
|
282
|
+
"name": "_proxy",
|
|
283
|
+
"type": "address"
|
|
137
284
|
}
|
|
138
285
|
],
|
|
139
|
-
"name": "
|
|
140
|
-
"outputs": [
|
|
286
|
+
"name": "removeAdditionalProxy",
|
|
287
|
+
"outputs": [],
|
|
288
|
+
"stateMutability": "nonpayable",
|
|
289
|
+
"type": "function"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"inputs": [
|
|
141
293
|
{
|
|
142
294
|
"internalType": "address",
|
|
143
|
-
"name": "",
|
|
295
|
+
"name": "user",
|
|
296
|
+
"type": "address"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"internalType": "address",
|
|
300
|
+
"name": "proxy",
|
|
144
301
|
"type": "address"
|
|
145
302
|
}
|
|
146
303
|
],
|
|
304
|
+
"name": "removedProxies",
|
|
305
|
+
"outputs": [
|
|
306
|
+
{
|
|
307
|
+
"internalType": "bool",
|
|
308
|
+
"name": "removed",
|
|
309
|
+
"type": "bool"
|
|
310
|
+
}
|
|
311
|
+
],
|
|
147
312
|
"stateMutability": "view",
|
|
148
313
|
"type": "function"
|
|
149
314
|
},
|
|
150
315
|
{
|
|
151
|
-
"inputs": [
|
|
152
|
-
|
|
316
|
+
"inputs": [
|
|
317
|
+
{
|
|
318
|
+
"internalType": "address",
|
|
319
|
+
"name": "_user",
|
|
320
|
+
"type": "address"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"internalType": "address",
|
|
324
|
+
"name": "_proxy",
|
|
325
|
+
"type": "address"
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
"name": "restoreAdditionalProxy",
|
|
153
329
|
"outputs": [],
|
|
154
330
|
"stateMutability": "nonpayable",
|
|
155
331
|
"type": "function"
|
|
156
332
|
},
|
|
157
333
|
{
|
|
158
|
-
"inputs": [
|
|
159
|
-
|
|
334
|
+
"inputs": [
|
|
335
|
+
{
|
|
336
|
+
"internalType": "address[]",
|
|
337
|
+
"name": "_proxies",
|
|
338
|
+
"type": "address[]"
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
"name": "syncProxies",
|
|
342
|
+
"outputs": [],
|
|
343
|
+
"stateMutability": "nonpayable",
|
|
344
|
+
"type": "function"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"inputs": [
|
|
348
|
+
{
|
|
349
|
+
"internalType": "address",
|
|
350
|
+
"name": "_proxy",
|
|
351
|
+
"type": "address"
|
|
352
|
+
}
|
|
353
|
+
],
|
|
354
|
+
"name": "syncProxy",
|
|
355
|
+
"outputs": [],
|
|
356
|
+
"stateMutability": "nonpayable",
|
|
357
|
+
"type": "function"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"inputs": [
|
|
361
|
+
{
|
|
362
|
+
"internalType": "address",
|
|
363
|
+
"name": "proxy",
|
|
364
|
+
"type": "address"
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
"name": "trackedOwner",
|
|
160
368
|
"outputs": [
|
|
161
369
|
{
|
|
162
|
-
"internalType": "
|
|
163
|
-
"name": "",
|
|
370
|
+
"internalType": "address",
|
|
371
|
+
"name": "owner",
|
|
164
372
|
"type": "address"
|
|
165
373
|
}
|
|
166
374
|
],
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4DelegateBorrowAction - Approves a spender to borrow from the specified reserve on behalf of the wallet.
|
|
5
|
+
*
|
|
6
|
+
* @category AaveV4DelegateBorrow
|
|
7
|
+
*/
|
|
8
|
+
export declare class AaveV4DelegateBorrowAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param spoke Address of the spoke.
|
|
11
|
+
* @param reserveId Reserve id.
|
|
12
|
+
* @param spender Address that will receive the borrow allowance.
|
|
13
|
+
* @param amount Amount of borrow allowance.
|
|
14
|
+
*/
|
|
15
|
+
constructor(spoke: EthAddress, reserveId: uint256, spender: EthAddress, amount: uint256);
|
|
16
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4DelegateBorrowAction - Approves a spender to borrow from the specified reserve on behalf of the wallet.
|
|
5
|
+
*
|
|
6
|
+
* @category AaveV4DelegateBorrow
|
|
7
|
+
*/
|
|
8
|
+
export class AaveV4DelegateBorrowAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param spoke Address of the spoke.
|
|
11
|
+
* @param reserveId Reserve id.
|
|
12
|
+
* @param spender Address that will receive the borrow allowance.
|
|
13
|
+
* @param amount Amount of borrow allowance.
|
|
14
|
+
*/
|
|
15
|
+
constructor(spoke, reserveId, spender, amount) {
|
|
16
|
+
super('AaveV4DelegateBorrow', getAddr('AaveV4DelegateBorrow'), ['address', 'uint256', 'address', 'uint256'], [spoke, reserveId, spender, amount]);
|
|
17
|
+
this.mappableArgs = [
|
|
18
|
+
this.args[0],
|
|
19
|
+
this.args[1],
|
|
20
|
+
this.args[2],
|
|
21
|
+
this.args[3],
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4DelegateSetUsingAsCollateralAction - Approves a delegatee to set using as collateral on behalf of the wallet.
|
|
5
|
+
*
|
|
6
|
+
* @category AaveV4DelegateSetUsingAsCollateral
|
|
7
|
+
*/
|
|
8
|
+
export declare class AaveV4DelegateSetUsingAsCollateralAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param spoke Address of the spoke.
|
|
11
|
+
* @param delegatee Address that will receive the permission.
|
|
12
|
+
* @param permission Whether the delegatee can set using as collateral.
|
|
13
|
+
*/
|
|
14
|
+
constructor(spoke: EthAddress, delegatee: EthAddress, permission: boolean);
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4DelegateSetUsingAsCollateralAction - Approves a delegatee to set using as collateral on behalf of the wallet.
|
|
5
|
+
*
|
|
6
|
+
* @category AaveV4DelegateSetUsingAsCollateral
|
|
7
|
+
*/
|
|
8
|
+
export class AaveV4DelegateSetUsingAsCollateralAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param spoke Address of the spoke.
|
|
11
|
+
* @param delegatee Address that will receive the permission.
|
|
12
|
+
* @param permission Whether the delegatee can set using as collateral.
|
|
13
|
+
*/
|
|
14
|
+
constructor(spoke, delegatee, permission) {
|
|
15
|
+
super('AaveV4DelegateSetUsingAsCollateral', getAddr('AaveV4DelegateSetUsingAsCollateral'), ['address', 'address', 'bool'], [spoke, delegatee, permission]);
|
|
16
|
+
this.mappableArgs = [
|
|
17
|
+
this.args[0],
|
|
18
|
+
this.args[1],
|
|
19
|
+
this.args[2],
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4DelegateWithdrawAction - Approves a spender to withdraw from the specified reserve on behalf of the wallet.
|
|
5
|
+
*
|
|
6
|
+
* @category AaveV4DelegateWithdraw
|
|
7
|
+
*/
|
|
8
|
+
export declare class AaveV4DelegateWithdrawAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param spoke Address of the spoke.
|
|
11
|
+
* @param reserveId Reserve id.
|
|
12
|
+
* @param spender Address that will receive the withdraw allowance.
|
|
13
|
+
* @param amount Amount of withdraw allowance.
|
|
14
|
+
*/
|
|
15
|
+
constructor(spoke: EthAddress, reserveId: uint256, spender: EthAddress, amount: uint256);
|
|
16
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4DelegateWithdrawAction - Approves a spender to withdraw from the specified reserve on behalf of the wallet.
|
|
5
|
+
*
|
|
6
|
+
* @category AaveV4DelegateWithdraw
|
|
7
|
+
*/
|
|
8
|
+
export class AaveV4DelegateWithdrawAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param spoke Address of the spoke.
|
|
11
|
+
* @param reserveId Reserve id.
|
|
12
|
+
* @param spender Address that will receive the withdraw allowance.
|
|
13
|
+
* @param amount Amount of withdraw allowance.
|
|
14
|
+
*/
|
|
15
|
+
constructor(spoke, reserveId, spender, amount) {
|
|
16
|
+
super('AaveV4DelegateWithdraw', getAddr('AaveV4DelegateWithdraw'), ['address', 'uint256', 'address', 'uint256'], [spoke, reserveId, spender, amount]);
|
|
17
|
+
this.mappableArgs = [
|
|
18
|
+
this.args[0],
|
|
19
|
+
this.args[1],
|
|
20
|
+
this.args[2],
|
|
21
|
+
this.args[3],
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4SetUserManagersAction - Sets position managers for the user's wallet.
|
|
5
|
+
*
|
|
6
|
+
* @category AaveV4
|
|
7
|
+
*/
|
|
8
|
+
export declare class AaveV4SetUserManagersAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param spoke Address of the spoke.
|
|
11
|
+
* @param updates The array of position manager updates.
|
|
12
|
+
*/
|
|
13
|
+
constructor(spoke: EthAddress, updates: Array<[EthAddress, boolean]>);
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4SetUserManagersAction - Sets position managers for the user's wallet.
|
|
5
|
+
*
|
|
6
|
+
* @category AaveV4
|
|
7
|
+
*/
|
|
8
|
+
export class AaveV4SetUserManagersAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param spoke Address of the spoke.
|
|
11
|
+
* @param updates The array of position manager updates.
|
|
12
|
+
*/
|
|
13
|
+
constructor(spoke, updates) {
|
|
14
|
+
super('AaveV4SetUserManagers', getAddr('AaveV4SetUserManagers'), ['address', 'tuple(address,bool)[]'], [spoke, updates]);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -9,3 +9,7 @@ export * from './AaveV4DelegateBorrowWithSigAction';
|
|
|
9
9
|
export * from './AaveV4DelegateWithdrawWithSigAction';
|
|
10
10
|
export * from './AaveV4SetUserManagersWithSigAction';
|
|
11
11
|
export * from './AaveV4DelegateSetUsingAsCollateralWithSigAction';
|
|
12
|
+
export * from './AaveV4DelegateBorrowAction';
|
|
13
|
+
export * from './AaveV4DelegateWithdrawAction';
|
|
14
|
+
export * from './AaveV4DelegateSetUsingAsCollateralAction';
|
|
15
|
+
export * from './AaveV4SetUserManagersAction';
|
|
@@ -9,3 +9,7 @@ export * from './AaveV4DelegateBorrowWithSigAction';
|
|
|
9
9
|
export * from './AaveV4DelegateWithdrawWithSigAction';
|
|
10
10
|
export * from './AaveV4SetUserManagersWithSigAction';
|
|
11
11
|
export * from './AaveV4DelegateSetUsingAsCollateralWithSigAction';
|
|
12
|
+
export * from './AaveV4DelegateBorrowAction';
|
|
13
|
+
export * from './AaveV4DelegateWithdrawAction';
|
|
14
|
+
export * from './AaveV4DelegateSetUsingAsCollateralAction';
|
|
15
|
+
export * from './AaveV4SetUserManagersAction';
|