@usdu-finance/usdu-core 0.0.4 → 0.0.6

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/dist/index.mjs CHANGED
@@ -1,35 +1,3 @@
1
- // helper/wallet.ts
2
- import { ethers } from "ethers";
3
- function getChildFromSeed(seed, index) {
4
- return ethers.HDNodeWallet.fromPhrase(seed, void 0, `m/44'/60'/0'/0/${index}`);
5
- }
6
- function getAddressFromChildIndex(seed, index) {
7
- return getChildFromSeed(seed, index).address;
8
- }
9
- function getPublicKeyFromChildIndex(seed, index) {
10
- return getChildFromSeed(seed, index).publicKey;
11
- }
12
- function getPrivateKeyFromChildIndex(seed, index) {
13
- return getChildFromSeed(seed, index).privateKey;
14
- }
15
- function getWalletInto(seed = process.env.DEPLOYER_SEED, index = process.env.DEPLOYER_SEED_INDEX, amount = 3) {
16
- if (!seed) throw new Error("Failed to import the seed string from .env");
17
- if (!index) throw new Error("Failed to import the index string from .env");
18
- console.log("seed:", seed);
19
- const start = index && index?.length > 0 ? parseInt(index) : 0;
20
- for (let i = start; i < start + amount; i++) {
21
- const w = getChildFromSeed(seed, i);
22
- console.log("Wallet", i);
23
- console.log({
24
- address: w.address,
25
- pubKey: w.publicKey,
26
- privKey: w.privateKey,
27
- path: w.path,
28
- index: w.index
29
- });
30
- }
31
- }
32
-
33
1
  // exports/address.config.ts
34
2
  import { arbitrum, avalanche, base, gnosis, mainnet, optimism, polygon, sonic } from "viem/chains";
35
3
  import { zeroAddress } from "viem";
@@ -40,6 +8,7 @@ var ADDRESS = {
40
8
  chainSelector: "5009297550715157269",
41
9
  // curator / DAO
42
10
  curator: "0x9fe66037c44236c87D9Ac8345F489b4413fDFf06",
11
+ aragonDao: "0x9fe66037c44236c87D9Ac8345F489b4413fDFf06",
43
12
  aragonMultiSig: "0x369C21c8cB56C0211772F003c917b2807204BB4D",
44
13
  aragonDelayedAction: "0x8E8Bec995809bF29712C89149603a8C48329aF51",
45
14
  aragonVetoMultiSig: "0xF786531776903BaE94A1A4f4F17a0233dca5f9d5",
@@ -162,6 +131,508 @@ var SupportedChainsMap = {
162
131
  };
163
132
  var SupportedChainIds = Object.values(SupportedChains).map((chain) => chain.id);
164
133
 
134
+ // exports/abis/aragon/AragonDao.ts
135
+ var AragonDao_ABI = [
136
+ { inputs: [], stateMutability: "nonpayable", type: "constructor" },
137
+ { inputs: [{ internalType: "uint256", name: "index", type: "uint256" }], name: "ActionFailed", type: "error" },
138
+ { inputs: [], name: "AlreadyInitialized", type: "error" },
139
+ { inputs: [], name: "AnyAddressDisallowedForWhoAndWhere", type: "error" },
140
+ {
141
+ inputs: [{ internalType: "contract IPermissionCondition", name: "condition", type: "address" }],
142
+ name: "ConditionInterfaceNotSupported",
143
+ type: "error"
144
+ },
145
+ {
146
+ inputs: [{ internalType: "contract IPermissionCondition", name: "condition", type: "address" }],
147
+ name: "ConditionNotAContract",
148
+ type: "error"
149
+ },
150
+ { inputs: [], name: "FunctionRemoved", type: "error" },
151
+ { inputs: [], name: "GrantWithConditionNotSupported", type: "error" },
152
+ { inputs: [], name: "InsufficientGas", type: "error" },
153
+ {
154
+ inputs: [
155
+ { internalType: "uint256", name: "expected", type: "uint256" },
156
+ { internalType: "uint256", name: "actual", type: "uint256" }
157
+ ],
158
+ name: "NativeTokenDepositAmountMismatch",
159
+ type: "error"
160
+ },
161
+ {
162
+ inputs: [
163
+ { internalType: "address", name: "where", type: "address" },
164
+ { internalType: "address", name: "who", type: "address" },
165
+ { internalType: "bytes32", name: "permissionId", type: "bytes32" },
166
+ { internalType: "address", name: "currentCondition", type: "address" },
167
+ { internalType: "address", name: "newCondition", type: "address" }
168
+ ],
169
+ name: "PermissionAlreadyGrantedForDifferentCondition",
170
+ type: "error"
171
+ },
172
+ { inputs: [], name: "PermissionsForAnyAddressDisallowed", type: "error" },
173
+ {
174
+ inputs: [{ internalType: "uint8[3]", name: "protocolVersion", type: "uint8[3]" }],
175
+ name: "ProtocolVersionUpgradeNotSupported",
176
+ type: "error"
177
+ },
178
+ { inputs: [], name: "ReentrantCall", type: "error" },
179
+ { inputs: [], name: "TooManyActions", type: "error" },
180
+ {
181
+ inputs: [
182
+ { internalType: "address", name: "where", type: "address" },
183
+ { internalType: "address", name: "who", type: "address" },
184
+ { internalType: "bytes32", name: "permissionId", type: "bytes32" }
185
+ ],
186
+ name: "Unauthorized",
187
+ type: "error"
188
+ },
189
+ {
190
+ inputs: [
191
+ { internalType: "bytes4", name: "callbackSelector", type: "bytes4" },
192
+ { internalType: "bytes4", name: "magicNumber", type: "bytes4" }
193
+ ],
194
+ name: "UnknownCallback",
195
+ type: "error"
196
+ },
197
+ { inputs: [], name: "ZeroAmount", type: "error" },
198
+ {
199
+ anonymous: false,
200
+ inputs: [
201
+ { indexed: false, internalType: "address", name: "previousAdmin", type: "address" },
202
+ { indexed: false, internalType: "address", name: "newAdmin", type: "address" }
203
+ ],
204
+ name: "AdminChanged",
205
+ type: "event"
206
+ },
207
+ {
208
+ anonymous: false,
209
+ inputs: [{ indexed: true, internalType: "address", name: "beacon", type: "address" }],
210
+ name: "BeaconUpgraded",
211
+ type: "event"
212
+ },
213
+ {
214
+ anonymous: false,
215
+ inputs: [
216
+ { indexed: false, internalType: "address", name: "sender", type: "address" },
217
+ { indexed: true, internalType: "bytes4", name: "sig", type: "bytes4" },
218
+ { indexed: false, internalType: "bytes", name: "data", type: "bytes" }
219
+ ],
220
+ name: "CallbackReceived",
221
+ type: "event"
222
+ },
223
+ {
224
+ anonymous: false,
225
+ inputs: [
226
+ { indexed: true, internalType: "address", name: "sender", type: "address" },
227
+ { indexed: true, internalType: "address", name: "token", type: "address" },
228
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
229
+ { indexed: false, internalType: "string", name: "_reference", type: "string" }
230
+ ],
231
+ name: "Deposited",
232
+ type: "event"
233
+ },
234
+ {
235
+ anonymous: false,
236
+ inputs: [
237
+ { indexed: true, internalType: "address", name: "actor", type: "address" },
238
+ { indexed: false, internalType: "bytes32", name: "callId", type: "bytes32" },
239
+ {
240
+ components: [
241
+ { internalType: "address", name: "to", type: "address" },
242
+ { internalType: "uint256", name: "value", type: "uint256" },
243
+ { internalType: "bytes", name: "data", type: "bytes" }
244
+ ],
245
+ indexed: false,
246
+ internalType: "struct Action[]",
247
+ name: "actions",
248
+ type: "tuple[]"
249
+ },
250
+ { indexed: false, internalType: "uint256", name: "allowFailureMap", type: "uint256" },
251
+ { indexed: false, internalType: "uint256", name: "failureMap", type: "uint256" },
252
+ { indexed: false, internalType: "bytes[]", name: "execResults", type: "bytes[]" }
253
+ ],
254
+ name: "Executed",
255
+ type: "event"
256
+ },
257
+ {
258
+ anonymous: false,
259
+ inputs: [
260
+ { indexed: true, internalType: "bytes32", name: "permissionId", type: "bytes32" },
261
+ { indexed: true, internalType: "address", name: "here", type: "address" },
262
+ { indexed: false, internalType: "address", name: "where", type: "address" },
263
+ { indexed: true, internalType: "address", name: "who", type: "address" },
264
+ { indexed: false, internalType: "address", name: "condition", type: "address" }
265
+ ],
266
+ name: "Granted",
267
+ type: "event"
268
+ },
269
+ {
270
+ anonymous: false,
271
+ inputs: [{ indexed: false, internalType: "uint8", name: "version", type: "uint8" }],
272
+ name: "Initialized",
273
+ type: "event"
274
+ },
275
+ {
276
+ anonymous: false,
277
+ inputs: [{ indexed: false, internalType: "bytes", name: "metadata", type: "bytes" }],
278
+ name: "MetadataSet",
279
+ type: "event"
280
+ },
281
+ {
282
+ anonymous: false,
283
+ inputs: [
284
+ { indexed: false, internalType: "address", name: "sender", type: "address" },
285
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" }
286
+ ],
287
+ name: "NativeTokenDeposited",
288
+ type: "event"
289
+ },
290
+ {
291
+ anonymous: false,
292
+ inputs: [{ indexed: false, internalType: "string", name: "daoURI", type: "string" }],
293
+ name: "NewURI",
294
+ type: "event"
295
+ },
296
+ {
297
+ anonymous: false,
298
+ inputs: [
299
+ { indexed: true, internalType: "bytes32", name: "permissionId", type: "bytes32" },
300
+ { indexed: true, internalType: "address", name: "here", type: "address" },
301
+ { indexed: false, internalType: "address", name: "where", type: "address" },
302
+ { indexed: true, internalType: "address", name: "who", type: "address" }
303
+ ],
304
+ name: "Revoked",
305
+ type: "event"
306
+ },
307
+ {
308
+ anonymous: false,
309
+ inputs: [
310
+ { indexed: false, internalType: "bytes4", name: "interfaceId", type: "bytes4" },
311
+ { indexed: false, internalType: "bytes4", name: "callbackSelector", type: "bytes4" },
312
+ { indexed: false, internalType: "bytes4", name: "magicNumber", type: "bytes4" }
313
+ ],
314
+ name: "StandardCallbackRegistered",
315
+ type: "event"
316
+ },
317
+ {
318
+ anonymous: false,
319
+ inputs: [{ indexed: false, internalType: "address", name: "forwarder", type: "address" }],
320
+ name: "TrustedForwarderSet",
321
+ type: "event"
322
+ },
323
+ {
324
+ anonymous: false,
325
+ inputs: [{ indexed: true, internalType: "address", name: "implementation", type: "address" }],
326
+ name: "Upgraded",
327
+ type: "event"
328
+ },
329
+ { stateMutability: "nonpayable", type: "fallback" },
330
+ {
331
+ inputs: [],
332
+ name: "EXECUTE_PERMISSION_ID",
333
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
334
+ stateMutability: "view",
335
+ type: "function"
336
+ },
337
+ {
338
+ inputs: [],
339
+ name: "REGISTER_STANDARD_CALLBACK_PERMISSION_ID",
340
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
341
+ stateMutability: "view",
342
+ type: "function"
343
+ },
344
+ {
345
+ inputs: [],
346
+ name: "ROOT_PERMISSION_ID",
347
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
348
+ stateMutability: "view",
349
+ type: "function"
350
+ },
351
+ {
352
+ inputs: [],
353
+ name: "SET_METADATA_PERMISSION_ID",
354
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
355
+ stateMutability: "view",
356
+ type: "function"
357
+ },
358
+ {
359
+ inputs: [],
360
+ name: "SET_TRUSTED_FORWARDER_PERMISSION_ID",
361
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
362
+ stateMutability: "view",
363
+ type: "function"
364
+ },
365
+ {
366
+ inputs: [],
367
+ name: "UPGRADE_DAO_PERMISSION_ID",
368
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
369
+ stateMutability: "view",
370
+ type: "function"
371
+ },
372
+ {
373
+ inputs: [],
374
+ name: "VALIDATE_SIGNATURE_PERMISSION_ID",
375
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
376
+ stateMutability: "view",
377
+ type: "function"
378
+ },
379
+ {
380
+ inputs: [
381
+ {
382
+ components: [
383
+ { internalType: "enum PermissionLib.Operation", name: "operation", type: "uint8" },
384
+ { internalType: "address", name: "where", type: "address" },
385
+ { internalType: "address", name: "who", type: "address" },
386
+ { internalType: "address", name: "condition", type: "address" },
387
+ { internalType: "bytes32", name: "permissionId", type: "bytes32" }
388
+ ],
389
+ internalType: "struct PermissionLib.MultiTargetPermission[]",
390
+ name: "_items",
391
+ type: "tuple[]"
392
+ }
393
+ ],
394
+ name: "applyMultiTargetPermissions",
395
+ outputs: [],
396
+ stateMutability: "nonpayable",
397
+ type: "function"
398
+ },
399
+ {
400
+ inputs: [
401
+ { internalType: "address", name: "_where", type: "address" },
402
+ {
403
+ components: [
404
+ { internalType: "enum PermissionLib.Operation", name: "operation", type: "uint8" },
405
+ { internalType: "address", name: "who", type: "address" },
406
+ { internalType: "bytes32", name: "permissionId", type: "bytes32" }
407
+ ],
408
+ internalType: "struct PermissionLib.SingleTargetPermission[]",
409
+ name: "items",
410
+ type: "tuple[]"
411
+ }
412
+ ],
413
+ name: "applySingleTargetPermissions",
414
+ outputs: [],
415
+ stateMutability: "nonpayable",
416
+ type: "function"
417
+ },
418
+ {
419
+ inputs: [],
420
+ name: "daoURI",
421
+ outputs: [{ internalType: "string", name: "", type: "string" }],
422
+ stateMutability: "view",
423
+ type: "function"
424
+ },
425
+ {
426
+ inputs: [
427
+ { internalType: "address", name: "_token", type: "address" },
428
+ { internalType: "uint256", name: "_amount", type: "uint256" },
429
+ { internalType: "string", name: "_reference", type: "string" }
430
+ ],
431
+ name: "deposit",
432
+ outputs: [],
433
+ stateMutability: "payable",
434
+ type: "function"
435
+ },
436
+ {
437
+ inputs: [
438
+ { internalType: "bytes32", name: "_callId", type: "bytes32" },
439
+ {
440
+ components: [
441
+ { internalType: "address", name: "to", type: "address" },
442
+ { internalType: "uint256", name: "value", type: "uint256" },
443
+ { internalType: "bytes", name: "data", type: "bytes" }
444
+ ],
445
+ internalType: "struct Action[]",
446
+ name: "_actions",
447
+ type: "tuple[]"
448
+ },
449
+ { internalType: "uint256", name: "_allowFailureMap", type: "uint256" }
450
+ ],
451
+ name: "execute",
452
+ outputs: [
453
+ { internalType: "bytes[]", name: "execResults", type: "bytes[]" },
454
+ { internalType: "uint256", name: "failureMap", type: "uint256" }
455
+ ],
456
+ stateMutability: "nonpayable",
457
+ type: "function"
458
+ },
459
+ {
460
+ inputs: [],
461
+ name: "getTrustedForwarder",
462
+ outputs: [{ internalType: "address", name: "", type: "address" }],
463
+ stateMutability: "view",
464
+ type: "function"
465
+ },
466
+ {
467
+ inputs: [
468
+ { internalType: "address", name: "_where", type: "address" },
469
+ { internalType: "address", name: "_who", type: "address" },
470
+ { internalType: "bytes32", name: "_permissionId", type: "bytes32" }
471
+ ],
472
+ name: "grant",
473
+ outputs: [],
474
+ stateMutability: "nonpayable",
475
+ type: "function"
476
+ },
477
+ {
478
+ inputs: [
479
+ { internalType: "address", name: "_where", type: "address" },
480
+ { internalType: "address", name: "_who", type: "address" },
481
+ { internalType: "bytes32", name: "_permissionId", type: "bytes32" },
482
+ { internalType: "contract IPermissionCondition", name: "_condition", type: "address" }
483
+ ],
484
+ name: "grantWithCondition",
485
+ outputs: [],
486
+ stateMutability: "nonpayable",
487
+ type: "function"
488
+ },
489
+ {
490
+ inputs: [
491
+ { internalType: "address", name: "_where", type: "address" },
492
+ { internalType: "address", name: "_who", type: "address" },
493
+ { internalType: "bytes32", name: "_permissionId", type: "bytes32" },
494
+ { internalType: "bytes", name: "_data", type: "bytes" }
495
+ ],
496
+ name: "hasPermission",
497
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
498
+ stateMutability: "view",
499
+ type: "function"
500
+ },
501
+ {
502
+ inputs: [
503
+ { internalType: "bytes", name: "_metadata", type: "bytes" },
504
+ { internalType: "address", name: "_initialOwner", type: "address" },
505
+ { internalType: "address", name: "_trustedForwarder", type: "address" },
506
+ { internalType: "string", name: "daoURI_", type: "string" }
507
+ ],
508
+ name: "initialize",
509
+ outputs: [],
510
+ stateMutability: "nonpayable",
511
+ type: "function"
512
+ },
513
+ {
514
+ inputs: [
515
+ { internalType: "uint8[3]", name: "_previousProtocolVersion", type: "uint8[3]" },
516
+ { internalType: "bytes", name: "_initData", type: "bytes" }
517
+ ],
518
+ name: "initializeFrom",
519
+ outputs: [],
520
+ stateMutability: "nonpayable",
521
+ type: "function"
522
+ },
523
+ {
524
+ inputs: [
525
+ { internalType: "address", name: "_where", type: "address" },
526
+ { internalType: "address", name: "_who", type: "address" },
527
+ { internalType: "bytes32", name: "_permissionId", type: "bytes32" },
528
+ { internalType: "bytes", name: "_data", type: "bytes" }
529
+ ],
530
+ name: "isGranted",
531
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
532
+ stateMutability: "view",
533
+ type: "function"
534
+ },
535
+ {
536
+ inputs: [
537
+ { internalType: "bytes32", name: "_hash", type: "bytes32" },
538
+ { internalType: "bytes", name: "_signature", type: "bytes" }
539
+ ],
540
+ name: "isValidSignature",
541
+ outputs: [{ internalType: "bytes4", name: "", type: "bytes4" }],
542
+ stateMutability: "view",
543
+ type: "function"
544
+ },
545
+ {
546
+ inputs: [],
547
+ name: "protocolVersion",
548
+ outputs: [{ internalType: "uint8[3]", name: "", type: "uint8[3]" }],
549
+ stateMutability: "pure",
550
+ type: "function"
551
+ },
552
+ {
553
+ inputs: [],
554
+ name: "proxiableUUID",
555
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
556
+ stateMutability: "view",
557
+ type: "function"
558
+ },
559
+ {
560
+ inputs: [
561
+ { internalType: "bytes4", name: "_interfaceId", type: "bytes4" },
562
+ { internalType: "bytes4", name: "_callbackSelector", type: "bytes4" },
563
+ { internalType: "bytes4", name: "_magicNumber", type: "bytes4" }
564
+ ],
565
+ name: "registerStandardCallback",
566
+ outputs: [],
567
+ stateMutability: "nonpayable",
568
+ type: "function"
569
+ },
570
+ {
571
+ inputs: [
572
+ { internalType: "address", name: "_where", type: "address" },
573
+ { internalType: "address", name: "_who", type: "address" },
574
+ { internalType: "bytes32", name: "_permissionId", type: "bytes32" }
575
+ ],
576
+ name: "revoke",
577
+ outputs: [],
578
+ stateMutability: "nonpayable",
579
+ type: "function"
580
+ },
581
+ {
582
+ inputs: [{ internalType: "string", name: "newDaoURI", type: "string" }],
583
+ name: "setDaoURI",
584
+ outputs: [],
585
+ stateMutability: "nonpayable",
586
+ type: "function"
587
+ },
588
+ {
589
+ inputs: [{ internalType: "bytes", name: "_metadata", type: "bytes" }],
590
+ name: "setMetadata",
591
+ outputs: [],
592
+ stateMutability: "nonpayable",
593
+ type: "function"
594
+ },
595
+ {
596
+ inputs: [{ internalType: "address", name: "", type: "address" }],
597
+ name: "setSignatureValidator",
598
+ outputs: [],
599
+ stateMutability: "pure",
600
+ type: "function"
601
+ },
602
+ {
603
+ inputs: [{ internalType: "address", name: "_newTrustedForwarder", type: "address" }],
604
+ name: "setTrustedForwarder",
605
+ outputs: [],
606
+ stateMutability: "nonpayable",
607
+ type: "function"
608
+ },
609
+ {
610
+ inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
611
+ name: "supportsInterface",
612
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
613
+ stateMutability: "view",
614
+ type: "function"
615
+ },
616
+ {
617
+ inputs: [{ internalType: "address", name: "newImplementation", type: "address" }],
618
+ name: "upgradeTo",
619
+ outputs: [],
620
+ stateMutability: "nonpayable",
621
+ type: "function"
622
+ },
623
+ {
624
+ inputs: [
625
+ { internalType: "address", name: "newImplementation", type: "address" },
626
+ { internalType: "bytes", name: "data", type: "bytes" }
627
+ ],
628
+ name: "upgradeToAndCall",
629
+ outputs: [],
630
+ stateMutability: "payable",
631
+ type: "function"
632
+ },
633
+ { stateMutability: "payable", type: "receive" }
634
+ ];
635
+
165
636
  // exports/abis/aragon/AragonMultiSig.ts
166
637
  var AragonMultiSig_ABI = [
167
638
  {
@@ -23099,6 +23570,7 @@ var VaultAdapterV1_ABI = [
23099
23570
  export {
23100
23571
  ADDRESS,
23101
23572
  AggregatorV3Interface_ABI,
23573
+ AragonDao_ABI,
23102
23574
  AragonDelayedAction_ABI,
23103
23575
  AragonMultiSig_ABI,
23104
23576
  AragonVetoMultiSig_ABI,
@@ -23146,10 +23618,5 @@ export {
23146
23618
  SupportedChains,
23147
23619
  SupportedChainsMap,
23148
23620
  VaultAdapterRecoverV1_ABI,
23149
- VaultAdapterV1_ABI,
23150
- getAddressFromChildIndex,
23151
- getChildFromSeed,
23152
- getPrivateKeyFromChildIndex,
23153
- getPublicKeyFromChildIndex,
23154
- getWalletInto
23621
+ VaultAdapterV1_ABI
23155
23622
  };