@defisaver/sdk 1.3.32 → 1.3.34

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.
@@ -3,50 +3,144 @@
3
3
  "inputs": [
4
4
  {
5
5
  "internalType": "address",
6
- "name": "_user",
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": "_proxy",
37
+ "name": "user",
12
38
  "type": "address"
13
39
  }
14
40
  ],
15
- "name": "addAdditionalProxy",
16
- "outputs": [],
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
- "internalType": "uint256",
29
- "name": "",
30
- "type": "uint256"
54
+ "indexed": true,
55
+ "internalType": "address",
56
+ "name": "proxy",
57
+ "type": "address"
31
58
  }
32
59
  ],
33
- "name": "additionalProxies",
34
- "outputs": [
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
- "stateMutability": "view",
42
- "type": "function"
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": "adminVault",
140
+ "name": "MCD_REGISTRY",
47
141
  "outputs": [
48
142
  {
49
- "internalType": "contract AdminVault",
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": "_newAdminVault",
155
+ "name": "user",
62
156
  "type": "address"
157
+ },
158
+ {
159
+ "internalType": "uint256",
160
+ "name": "",
161
+ "type": "uint256"
63
162
  }
64
163
  ],
65
- "name": "changeAdminVault",
66
- "outputs": [],
67
- "stateMutability": "nonpayable",
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": "_user",
179
+ "name": "user",
75
180
  "type": "address"
76
181
  },
77
182
  {
78
183
  "internalType": "address",
79
- "name": "_proxy",
184
+ "name": "proxy",
80
185
  "type": "address"
81
186
  }
82
187
  ],
83
- "name": "changeMcdOwner",
84
- "outputs": [],
85
- "stateMutability": "nonpayable",
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": "changedOwners",
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": "getAllProxies",
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
- "stateMutability": "view",
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": "getMcdProxy",
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
- "name": "kill",
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
- "name": "mcdRegistry",
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": "contract IProxyRegistry",
163
- "name": "",
370
+ "internalType": "address",
371
+ "name": "owner",
164
372
  "type": "address"
165
373
  }
166
374
  ],
@@ -190,4 +398,4 @@
190
398
  "stateMutability": "nonpayable",
191
399
  "type": "function"
192
400
  }
193
- ]
401
+ ]
package/src/addresses.ts CHANGED
@@ -11,7 +11,7 @@ export const actionAddresses = {
11
11
  SendTokens: '0x7d05c0ABeF6d91300a237026507c4a2631ddAdEa',
12
12
  SumInputs: '0x70907d840aBBc984Fd949311d2f005e6aC4a4D7a',
13
13
  SubInputs: '0xe1804b756188F63f723d2FECc02988D0Cc1aB823',
14
- ChangeProxyOwner: '0x81cA52CfE66421d0ceF82d5F33230e43b5F23D2B',
14
+ ChangeProxyOwner: '0x1cc4A7f6B17a4C900F2afe4A0718A73714AC33f2',
15
15
  TokenBalance: '0xa92B177950F1460119940436515FD857C24494BC',
16
16
  AutomationV2Unsub: '0xe35Fb12fE9796847751076aCf5ee7d124108612C',
17
17
  SendTokenAndUnwrap: '0x4155537e6933E59a62deb68f6ad93d237d07242a',
@@ -431,7 +431,7 @@ export const actionAddresses = {
431
431
  CreateSub: '0x2daED8030BFC87B3d27c02E2f044B9CF4841Ff3e',
432
432
  TokenBalance: '0xC6FF5b01f7c7b35b6e093fF70D2332B361C5Be5A',
433
433
  TokenizedVaultAdapter: '0xdf31669FEd440f5BfF658ca0bBF0D22B8abdeb73',
434
- ChangeProxyOwner: '0x62769258ea8b3a85cc6fb4332fc2760a122dbc9e',
434
+ ChangeProxyOwner: '0xf573585C38d947D8A70F7F6c83D060F1F89855AE',
435
435
  PermitToken: '0xE70c05125E7Cfe929f7ccC1baD348004aCF0f0d6',
436
436
  HandleAuth: '0x7f143607250ee51e4dce31254c8ad33ec4c2dad5',
437
437
  MerklClaim: '0xa7574a72D93D236040648b1dc80ddA3E7A4de40F',
@@ -500,7 +500,7 @@ export const actionAddresses = {
500
500
  CreateSub: '0xbFD17a0a844b75976585a382a5BcCaFC9EAd731f',
501
501
  TokenBalance: '0x483B903E702F60698Dd8124558C6199922737f1F',
502
502
  TokenizedVaultAdapter: '0xD05C512bDFf6D3eAc5328807B3bC075F35271167',
503
- ChangeProxyOwner: '0x29F66A5fcB601c806E7156f29FDEC771BdC9c08d',
503
+ ChangeProxyOwner: '0xacf5bAD9543A98EcAcC620cF6CB989Ec88f1650D',
504
504
  PermitToken: '0x2E5E7a691092C158bb8341b936eF24FCcA6c0e00',
505
505
  HandleAuth: '0xbfcab1339e1a56a0a836cbca6457eaf71f148fcb',
506
506
  UpdateSub: '0x3511f444362F8cBd185DbF21C9488D16c1306461',
@@ -612,7 +612,7 @@ export const actionAddresses = {
612
612
  SumInputs: '0xC856ef8fe425B2EFe373e0e7038fAFF4a4f764fE',
613
613
  SubInputs: '0xd244B1991Fcb8FC0f32FA55bce37714fc5929B95',
614
614
  TokenBalance: '0xc44bcE580B1b3339fE9272D3bC3d6566083ea59C',
615
- ChangeProxyOwner: '0x1947a44d3717a47556175d64fdc208619aa08874',
615
+ ChangeProxyOwner: '0x7b55d25BfF49Fd62563823570f47E9a35AA39541',
616
616
  PermitToken: '0x57c8ae94a5A11dA33e0518054102488b604628D0',
617
617
  HandleAuth: '0x18a90e6db79199ace00140631ef931e0bd97837c',
618
618
  ToggleSub: '0x5F16C0a08d52b67fc73706c494F7535Dd3382b58',
@@ -796,7 +796,7 @@ export const otherAddresses = {
796
796
  [NETWORKS.ethereum.chainId]: {
797
797
  RecipeExecutor: '0xbc3Fc959FeF3F12a41738f406c02198cdeE7481F',
798
798
  DFSRegistry: '0x287778F121F134C66212FB16c9b53eC991D32f5b',
799
- DFSProxyRegistry: '0x29474FdaC7142f9aB7773B8e38264FA15E3805ed',
799
+ DFSProxyRegistry: '0x0cCB1F91beb8590949880D2a61C26C11d6280319',
800
800
  ProxyRegistry: '0x4678f0a6958e4D2Bc4F1BAF7Bc52E8F3564f3fE4',
801
801
  SFProxyEntryPoint: '0xAa15ca459659F35B1064EC546A44d962d54bA89e',
802
802
 
package/test/DfsWeb3.js CHANGED
@@ -5,13 +5,15 @@ const dfs = require('../src');
5
5
  const {getIlkInfo, assetAmountInWei} = require("@defisaver/tokens");
6
6
 
7
7
  describe('DfsWeb3', () => {
8
+ // Current owner of previously used test proxy 0x9cCf... (ownership transferred from 0x0a80...)
9
+ const testAccount = '0xa9BB3c0637a9Bc10A43b6D9565A8e1C287B3d2DE';
8
10
  let dfsWeb3;
9
11
  before(async () => {
10
12
  const web3 = new Web3(process.env.RPC);
11
13
 
12
- web3.eth.getAccounts = () => ['0x0a80C3C540eEF99811f4579fa7b1A0617294e06f'];
14
+ web3.eth.getAccounts = () => [testAccount];
13
15
  dfsWeb3 = new dfs.DfsWeb3(web3);
14
- dfsWeb3.account = '0x0a80C3C540eEF99811f4579fa7b1A0617294e06f';
16
+ dfsWeb3.account = testAccount;
15
17
 
16
18
  await dfsWeb3.prepareAccount();
17
19
  assert.containsAllKeys(dfsWeb3, ['web3', 'account', 'proxy']);
@@ -1372,19 +1372,6 @@
1372
1372
  [ 8, 4, 12, 3, 13, 9 ]
1373
1373
  ]
1374
1374
  ],
1375
- "ChangeProxyOwner": [
1376
- [
1377
- "0x32cEdFfF6e64f6cD1907Ae0b27b78c36320587E7",
1378
- [ 3, 11, 1, 15, 10, 8 ]
1379
- ],
1380
- [
1381
- "0xF8f8B3C98Cf2E63Df3041b73f80F362a4cf3A576",
1382
- [
1383
- 10, 5, 8, 6,
1384
- 13, 2, 0
1385
- ]
1386
- ]
1387
- ],
1388
1375
  "TokenBalance": [
1389
1376
  [
1390
1377
  "0xFEb82445aEaA675D59A43CD5833f5A6807f97ea2",