@steerprotocol/curator-tools 1.4.1 → 1.6.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/README.md CHANGED
@@ -58,9 +58,9 @@ Canonical overrides are stored on **Arbitrum One**, and the payload’s `chainId
58
58
  - **Schema string**: `address vault,uint256 chainId,uint256 strategyTokenId,string manifestCid`
59
59
  - **Semantics**: `chainId` is `targetChainId` (it may differ from `block.chainid`)
60
60
  - **SchemaRegistry (Arbitrum One)**: `0xA310da9c5B885E7fb3fbA9D66E9Ba6Df512b78eB`
61
- - **Resolver (Arbitrum One)**: `0xD36E3f33c6f1814F6923835Ae7dC508FEDA14b62`
61
+ - **Resolver (Arbitrum One)**: `0x6628d1Bf82F34de132d0e1c60DEB574C1352d5A7`
62
62
  - **Schema revocable**: `true`
63
- - **Schema UID**: `0x2a8ed2dea14b650384d87e1a9fdcd56ab7489fac437134f594f518d9538cbab9`
63
+ - **Schema UID**: `0xf1a6a394d1f3dd832a15e5b750963d929812e2b74d2dcea68ddf9f75691f16bf`
64
64
  - **Deprecated schema (no resolver)**: `0x62b656756a16bd3d2ef501cd9493c603fd90b050d6e9cfffc8e450639ce30a27` (registered with resolver `address(0)`, so it enforces no on-chain curator checks)
65
65
 
66
66
  ## User Flows
@@ -180,6 +180,7 @@ const store2 = new StrategyStore(
180
180
  {
181
181
  resolverAddress: '0x...',
182
182
  registryAddress: '0x...', // Optional: Enables strict vault validation
183
+ chainId: 42161, // Required for curator checks/updates
183
184
  },
184
185
  provider
185
186
  );
package/dist/index.d.mts CHANGED
@@ -1,5 +1,42 @@
1
1
  import { ethers } from 'ethers';
2
-
2
+ import { Address } from 'viem';
3
+ import { Chain } from 'viem/chains';
4
+
5
+ /**
6
+ * Chain-specific configuration
7
+ */
8
+ interface ChainConfig {
9
+ chainId: number;
10
+ chainName: string;
11
+ chain: Chain;
12
+ rpcUrl: string;
13
+ explorerUrl: string;
14
+ easAddress: Address;
15
+ schemaRegistry: Address;
16
+ resolverAddress?: Address;
17
+ schemaUID?: string;
18
+ }
19
+ /**
20
+ * Supported chains configuration
21
+ */
22
+ declare const CHAINS: Record<string, ChainConfig>;
23
+ /**
24
+ * Computes a deterministic multi-chain vault identifier
25
+ * This MUST match the Solidity implementation exactly
26
+ *
27
+ * @param vault The vault address
28
+ * @param chainId The target chain ID
29
+ * @returns A deterministic address representing this vault+chain combination
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * const vault = "0x1234567890123456789012345678901234567890" as Address;
34
+ * const chainId = 1n; // Ethereum Mainnet
35
+ * const identifier = computeVaultIdentifier(vault, chainId);
36
+ * // Returns: 0xABC... (deterministic address)
37
+ * ```
38
+ */
39
+ declare function computeVaultIdentifier(vault: Address, chainId: bigint): Address;
3
40
  interface StrategyStoreConfig {
4
41
  chainId?: number;
5
42
  resolverAddress?: string;
@@ -13,50 +50,35 @@ declare class StrategyStore {
13
50
  private registry?;
14
51
  private resolverAddress;
15
52
  private registryAddress?;
53
+ private chainId?;
16
54
  constructor(config: string | StrategyStoreConfig, providerOrSigner: ethers.Provider | ethers.Signer, overrides?: {
17
55
  resolver?: any;
18
56
  registry?: any;
19
57
  });
58
+ private resolveChainId;
20
59
  /**
21
60
  * Checks if an address is the top-level admin.
22
61
  * @param address The address to check.
23
62
  */
24
63
  isAdmin(address: string): Promise<boolean>;
25
64
  /**
26
-
27
65
  * Checks if a curator is authorized for a specific vault.
28
-
29
66
  * @param vault The vault address.
30
-
31
67
  * @param curator The curator address.
32
-
68
+ * @param chainId The chain ID for authorization (defaults to config chainId).
33
69
  */
34
- isCurator(vault: string, curator: string): Promise<boolean>;
70
+ isCurator(vault: string, curator: string, chainId?: number | bigint): Promise<boolean>;
35
71
  /**
36
-
37
-
38
-
39
72
  * Encodes a transaction to register or revoke a curator.
40
-
41
-
42
-
43
73
  * @param vault The vault address.
44
-
45
-
46
-
47
74
  * @param curator The curator address.
48
-
49
-
50
-
51
- * @param status The status to set (default: true).
52
-
53
-
54
-
75
+ * @param statusOrChainId The status to set (boolean) or chain ID if status is omitted.
76
+ * @param chainId The chain ID for authorization (defaults to config chainId).
55
77
  */
56
- registerCuratorTx(vault: string, curator: string, status?: boolean): Promise<{
78
+ registerCuratorTx(vault: string, curator: string, statusOrChainId?: boolean | number | bigint, chainId?: number | bigint): Promise<{
57
79
  to: string;
58
80
  data: string;
59
81
  }>;
60
82
  }
61
83
 
62
- export { StrategyStore, type StrategyStoreConfig };
84
+ export { CHAINS, type ChainConfig, StrategyStore, type StrategyStoreConfig, computeVaultIdentifier };
package/dist/index.mjs CHANGED
@@ -2,18 +2,704 @@
2
2
  import { ethers } from "ethers";
3
3
  import { z } from "zod";
4
4
  import { getContractAddressByChainIdAndContractName } from "@steerprotocol/sdk";
5
+ import { encodePacked, keccak256 } from "viem";
6
+ import { base } from "viem/chains";
7
+
8
+ // deployments/8453.json
9
+ var __default = {
10
+ chainId: 8453,
11
+ chainName: "Base Mainnet",
12
+ rpcUrl: "https://mainnet.base.org",
13
+ explorerUrl: "https://basescan.org",
14
+ easAddress: "0x4200000000000000000000000000000000000021",
15
+ schemaRegistry: "0x4200000000000000000000000000000000000020",
16
+ deployments: {
17
+ SteerAuthorityResolver: {
18
+ address: "0xdf351177442462498f76fd9230bff050e4b8588d",
19
+ deployer: "0xe445be10273c1520d6f112cff1dd96f38be9ec49",
20
+ deployedAt: "2026-01-07T11:55:32.000Z",
21
+ blockNumber: "0x269f5f3",
22
+ transaction: "0xc1547acfc6f373c64f68d1bf572d056587f5b19b5e04cadd83d06f777c445f2b",
23
+ gasUsed: "0x214ed7",
24
+ version: "1.0.0",
25
+ type: "direct",
26
+ abi: "abis/SteerAuthorityResolver.json",
27
+ metadata: {}
28
+ }
29
+ },
30
+ schema: {
31
+ uid: "0x5e3df110d540031725b71b8cc7163c315aa790ea521678d041f01e18cf590b3b",
32
+ schemaString: "address vault,uint256 chainId,uint256 strategyTokenId,string manifestCid",
33
+ resolver: "0xdf351177442462498f76fd9230bff050e4b8588d",
34
+ revocable: true,
35
+ registeredAt: "2026-01-07T12:13:05.000Z",
36
+ blockNumber: "0x269f93f",
37
+ transaction: "0xe047c37ba6f152eb52f80bee3214f37cf6baddaf6e504ec6cf180bc4990bd0c7",
38
+ gasUsed: "0x28304"
39
+ },
40
+ metadata: {
41
+ lastUpdated: "2026-01-07T12:13:05.000Z",
42
+ totalDeployments: 1
43
+ }
44
+ };
45
+
46
+ // deployments/abis/SteerAuthorityResolver.json
47
+ var SteerAuthorityResolver_default = {
48
+ contractName: "SteerAuthorityResolver",
49
+ abi: [
50
+ {
51
+ type: "constructor",
52
+ inputs: [
53
+ {
54
+ name: "eas",
55
+ type: "address",
56
+ internalType: "contract IEAS"
57
+ }
58
+ ],
59
+ stateMutability: "nonpayable"
60
+ },
61
+ {
62
+ type: "receive",
63
+ stateMutability: "payable"
64
+ },
65
+ {
66
+ type: "function",
67
+ name: "acceptOwnership",
68
+ inputs: [],
69
+ outputs: [],
70
+ stateMutability: "nonpayable"
71
+ },
72
+ {
73
+ type: "function",
74
+ name: "attest",
75
+ inputs: [
76
+ {
77
+ name: "attestation",
78
+ type: "tuple",
79
+ internalType: "struct Attestation",
80
+ components: [
81
+ {
82
+ name: "uid",
83
+ type: "bytes32",
84
+ internalType: "bytes32"
85
+ },
86
+ {
87
+ name: "schema",
88
+ type: "bytes32",
89
+ internalType: "bytes32"
90
+ },
91
+ {
92
+ name: "time",
93
+ type: "uint64",
94
+ internalType: "uint64"
95
+ },
96
+ {
97
+ name: "expirationTime",
98
+ type: "uint64",
99
+ internalType: "uint64"
100
+ },
101
+ {
102
+ name: "revocationTime",
103
+ type: "uint64",
104
+ internalType: "uint64"
105
+ },
106
+ {
107
+ name: "refUID",
108
+ type: "bytes32",
109
+ internalType: "bytes32"
110
+ },
111
+ {
112
+ name: "recipient",
113
+ type: "address",
114
+ internalType: "address"
115
+ },
116
+ {
117
+ name: "attester",
118
+ type: "address",
119
+ internalType: "address"
120
+ },
121
+ {
122
+ name: "revocable",
123
+ type: "bool",
124
+ internalType: "bool"
125
+ },
126
+ {
127
+ name: "data",
128
+ type: "bytes",
129
+ internalType: "bytes"
130
+ }
131
+ ]
132
+ }
133
+ ],
134
+ outputs: [
135
+ {
136
+ name: "",
137
+ type: "bool",
138
+ internalType: "bool"
139
+ }
140
+ ],
141
+ stateMutability: "payable"
142
+ },
143
+ {
144
+ type: "function",
145
+ name: "computeVaultIdentifier",
146
+ inputs: [
147
+ {
148
+ name: "vault",
149
+ type: "address",
150
+ internalType: "address"
151
+ },
152
+ {
153
+ name: "chainId",
154
+ type: "uint256",
155
+ internalType: "uint256"
156
+ }
157
+ ],
158
+ outputs: [
159
+ {
160
+ name: "",
161
+ type: "address",
162
+ internalType: "address"
163
+ }
164
+ ],
165
+ stateMutability: "pure"
166
+ },
167
+ {
168
+ type: "function",
169
+ name: "isCurator",
170
+ inputs: [
171
+ {
172
+ name: "",
173
+ type: "address",
174
+ internalType: "address"
175
+ },
176
+ {
177
+ name: "",
178
+ type: "uint256",
179
+ internalType: "uint256"
180
+ },
181
+ {
182
+ name: "",
183
+ type: "address",
184
+ internalType: "address"
185
+ }
186
+ ],
187
+ outputs: [
188
+ {
189
+ name: "",
190
+ type: "bool",
191
+ internalType: "bool"
192
+ }
193
+ ],
194
+ stateMutability: "view"
195
+ },
196
+ {
197
+ type: "function",
198
+ name: "isPayable",
199
+ inputs: [],
200
+ outputs: [
201
+ {
202
+ name: "",
203
+ type: "bool",
204
+ internalType: "bool"
205
+ }
206
+ ],
207
+ stateMutability: "pure"
208
+ },
209
+ {
210
+ type: "function",
211
+ name: "multiAttest",
212
+ inputs: [
213
+ {
214
+ name: "attestations",
215
+ type: "tuple[]",
216
+ internalType: "struct Attestation[]",
217
+ components: [
218
+ {
219
+ name: "uid",
220
+ type: "bytes32",
221
+ internalType: "bytes32"
222
+ },
223
+ {
224
+ name: "schema",
225
+ type: "bytes32",
226
+ internalType: "bytes32"
227
+ },
228
+ {
229
+ name: "time",
230
+ type: "uint64",
231
+ internalType: "uint64"
232
+ },
233
+ {
234
+ name: "expirationTime",
235
+ type: "uint64",
236
+ internalType: "uint64"
237
+ },
238
+ {
239
+ name: "revocationTime",
240
+ type: "uint64",
241
+ internalType: "uint64"
242
+ },
243
+ {
244
+ name: "refUID",
245
+ type: "bytes32",
246
+ internalType: "bytes32"
247
+ },
248
+ {
249
+ name: "recipient",
250
+ type: "address",
251
+ internalType: "address"
252
+ },
253
+ {
254
+ name: "attester",
255
+ type: "address",
256
+ internalType: "address"
257
+ },
258
+ {
259
+ name: "revocable",
260
+ type: "bool",
261
+ internalType: "bool"
262
+ },
263
+ {
264
+ name: "data",
265
+ type: "bytes",
266
+ internalType: "bytes"
267
+ }
268
+ ]
269
+ },
270
+ {
271
+ name: "values",
272
+ type: "uint256[]",
273
+ internalType: "uint256[]"
274
+ }
275
+ ],
276
+ outputs: [
277
+ {
278
+ name: "",
279
+ type: "bool",
280
+ internalType: "bool"
281
+ }
282
+ ],
283
+ stateMutability: "payable"
284
+ },
285
+ {
286
+ type: "function",
287
+ name: "multiRevoke",
288
+ inputs: [
289
+ {
290
+ name: "attestations",
291
+ type: "tuple[]",
292
+ internalType: "struct Attestation[]",
293
+ components: [
294
+ {
295
+ name: "uid",
296
+ type: "bytes32",
297
+ internalType: "bytes32"
298
+ },
299
+ {
300
+ name: "schema",
301
+ type: "bytes32",
302
+ internalType: "bytes32"
303
+ },
304
+ {
305
+ name: "time",
306
+ type: "uint64",
307
+ internalType: "uint64"
308
+ },
309
+ {
310
+ name: "expirationTime",
311
+ type: "uint64",
312
+ internalType: "uint64"
313
+ },
314
+ {
315
+ name: "revocationTime",
316
+ type: "uint64",
317
+ internalType: "uint64"
318
+ },
319
+ {
320
+ name: "refUID",
321
+ type: "bytes32",
322
+ internalType: "bytes32"
323
+ },
324
+ {
325
+ name: "recipient",
326
+ type: "address",
327
+ internalType: "address"
328
+ },
329
+ {
330
+ name: "attester",
331
+ type: "address",
332
+ internalType: "address"
333
+ },
334
+ {
335
+ name: "revocable",
336
+ type: "bool",
337
+ internalType: "bool"
338
+ },
339
+ {
340
+ name: "data",
341
+ type: "bytes",
342
+ internalType: "bytes"
343
+ }
344
+ ]
345
+ },
346
+ {
347
+ name: "values",
348
+ type: "uint256[]",
349
+ internalType: "uint256[]"
350
+ }
351
+ ],
352
+ outputs: [
353
+ {
354
+ name: "",
355
+ type: "bool",
356
+ internalType: "bool"
357
+ }
358
+ ],
359
+ stateMutability: "payable"
360
+ },
361
+ {
362
+ type: "function",
363
+ name: "owner",
364
+ inputs: [],
365
+ outputs: [
366
+ {
367
+ name: "",
368
+ type: "address",
369
+ internalType: "address"
370
+ }
371
+ ],
372
+ stateMutability: "view"
373
+ },
374
+ {
375
+ type: "function",
376
+ name: "pendingOwner",
377
+ inputs: [],
378
+ outputs: [
379
+ {
380
+ name: "",
381
+ type: "address",
382
+ internalType: "address"
383
+ }
384
+ ],
385
+ stateMutability: "view"
386
+ },
387
+ {
388
+ type: "function",
389
+ name: "renounceOwnership",
390
+ inputs: [],
391
+ outputs: [],
392
+ stateMutability: "nonpayable"
393
+ },
394
+ {
395
+ type: "function",
396
+ name: "revoke",
397
+ inputs: [
398
+ {
399
+ name: "attestation",
400
+ type: "tuple",
401
+ internalType: "struct Attestation",
402
+ components: [
403
+ {
404
+ name: "uid",
405
+ type: "bytes32",
406
+ internalType: "bytes32"
407
+ },
408
+ {
409
+ name: "schema",
410
+ type: "bytes32",
411
+ internalType: "bytes32"
412
+ },
413
+ {
414
+ name: "time",
415
+ type: "uint64",
416
+ internalType: "uint64"
417
+ },
418
+ {
419
+ name: "expirationTime",
420
+ type: "uint64",
421
+ internalType: "uint64"
422
+ },
423
+ {
424
+ name: "revocationTime",
425
+ type: "uint64",
426
+ internalType: "uint64"
427
+ },
428
+ {
429
+ name: "refUID",
430
+ type: "bytes32",
431
+ internalType: "bytes32"
432
+ },
433
+ {
434
+ name: "recipient",
435
+ type: "address",
436
+ internalType: "address"
437
+ },
438
+ {
439
+ name: "attester",
440
+ type: "address",
441
+ internalType: "address"
442
+ },
443
+ {
444
+ name: "revocable",
445
+ type: "bool",
446
+ internalType: "bool"
447
+ },
448
+ {
449
+ name: "data",
450
+ type: "bytes",
451
+ internalType: "bytes"
452
+ }
453
+ ]
454
+ }
455
+ ],
456
+ outputs: [
457
+ {
458
+ name: "",
459
+ type: "bool",
460
+ internalType: "bool"
461
+ }
462
+ ],
463
+ stateMutability: "payable"
464
+ },
465
+ {
466
+ type: "function",
467
+ name: "setCurator",
468
+ inputs: [
469
+ {
470
+ name: "vault",
471
+ type: "address",
472
+ internalType: "address"
473
+ },
474
+ {
475
+ name: "chainId",
476
+ type: "uint256",
477
+ internalType: "uint256"
478
+ },
479
+ {
480
+ name: "curator",
481
+ type: "address",
482
+ internalType: "address"
483
+ },
484
+ {
485
+ name: "status",
486
+ type: "bool",
487
+ internalType: "bool"
488
+ }
489
+ ],
490
+ outputs: [],
491
+ stateMutability: "nonpayable"
492
+ },
493
+ {
494
+ type: "function",
495
+ name: "transferOwnership",
496
+ inputs: [
497
+ {
498
+ name: "newOwner",
499
+ type: "address",
500
+ internalType: "address"
501
+ }
502
+ ],
503
+ outputs: [],
504
+ stateMutability: "nonpayable"
505
+ },
506
+ {
507
+ type: "function",
508
+ name: "version",
509
+ inputs: [],
510
+ outputs: [
511
+ {
512
+ name: "",
513
+ type: "string",
514
+ internalType: "string"
515
+ }
516
+ ],
517
+ stateMutability: "view"
518
+ },
519
+ {
520
+ type: "event",
521
+ name: "CuratorStatusUpdated",
522
+ inputs: [
523
+ {
524
+ name: "vault",
525
+ type: "address",
526
+ indexed: true,
527
+ internalType: "address"
528
+ },
529
+ {
530
+ name: "chainId",
531
+ type: "uint256",
532
+ indexed: true,
533
+ internalType: "uint256"
534
+ },
535
+ {
536
+ name: "curator",
537
+ type: "address",
538
+ indexed: true,
539
+ internalType: "address"
540
+ },
541
+ {
542
+ name: "status",
543
+ type: "bool",
544
+ indexed: false,
545
+ internalType: "bool"
546
+ }
547
+ ],
548
+ anonymous: false
549
+ },
550
+ {
551
+ type: "event",
552
+ name: "OwnershipTransferStarted",
553
+ inputs: [
554
+ {
555
+ name: "previousOwner",
556
+ type: "address",
557
+ indexed: true,
558
+ internalType: "address"
559
+ },
560
+ {
561
+ name: "newOwner",
562
+ type: "address",
563
+ indexed: true,
564
+ internalType: "address"
565
+ }
566
+ ],
567
+ anonymous: false
568
+ },
569
+ {
570
+ type: "event",
571
+ name: "OwnershipTransferred",
572
+ inputs: [
573
+ {
574
+ name: "previousOwner",
575
+ type: "address",
576
+ indexed: true,
577
+ internalType: "address"
578
+ },
579
+ {
580
+ name: "newOwner",
581
+ type: "address",
582
+ indexed: true,
583
+ internalType: "address"
584
+ }
585
+ ],
586
+ anonymous: false
587
+ },
588
+ {
589
+ type: "event",
590
+ name: "VaultIdentifierComputed",
591
+ inputs: [
592
+ {
593
+ name: "vault",
594
+ type: "address",
595
+ indexed: true,
596
+ internalType: "address"
597
+ },
598
+ {
599
+ name: "chainId",
600
+ type: "uint256",
601
+ indexed: true,
602
+ internalType: "uint256"
603
+ },
604
+ {
605
+ name: "identifier",
606
+ type: "address",
607
+ indexed: false,
608
+ internalType: "address"
609
+ }
610
+ ],
611
+ anonymous: false
612
+ },
613
+ {
614
+ type: "error",
615
+ name: "AccessDenied",
616
+ inputs: []
617
+ },
618
+ {
619
+ type: "error",
620
+ name: "InsufficientValue",
621
+ inputs: []
622
+ },
623
+ {
624
+ type: "error",
625
+ name: "InvalidEAS",
626
+ inputs: []
627
+ },
628
+ {
629
+ type: "error",
630
+ name: "InvalidLength",
631
+ inputs: []
632
+ },
633
+ {
634
+ type: "error",
635
+ name: "NotPayable",
636
+ inputs: []
637
+ },
638
+ {
639
+ type: "error",
640
+ name: "OwnableInvalidOwner",
641
+ inputs: [
642
+ {
643
+ name: "owner",
644
+ type: "address",
645
+ internalType: "address"
646
+ }
647
+ ]
648
+ },
649
+ {
650
+ type: "error",
651
+ name: "OwnableUnauthorizedAccount",
652
+ inputs: [
653
+ {
654
+ name: "account",
655
+ type: "address",
656
+ internalType: "address"
657
+ }
658
+ ]
659
+ }
660
+ ],
661
+ bytecode: "0x610100604052348015610010575f5ffd5b5060405161202e38038061202e833981810160405281019061003291906102da565b3381600160045f82608081815250508160a081815250508060c081815250505050505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036100b9576040517f83780ffe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1681525050505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361015e575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016101559190610314565b60405180910390fd5b61016d8161017460201b60201c565b505061032d565b60015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556101a7816101aa60201b60201c565b50565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102988261026f565b9050919050565b5f6102a98261028e565b9050919050565b6102b98161029f565b81146102c3575f5ffd5b50565b5f815190506102d4816102b0565b92915050565b5f602082840312156102ef576102ee61026b565b5b5f6102fc848285016102c6565b91505092915050565b61030e8161028e565b82525050565b5f6020820190506103275f830184610305565b92915050565b60805160a05160c05160e051611cce6103605f395f610b4d01525f61050a01525f6104e101525f6104b80152611cce5ff3fe6080604052600436106100e0575f3560e01c806391db0b7e1161007e578063e49617e111610058578063e49617e1146102c1578063e60c3505146102f1578063f2fde38b14610321578063faebd78f1461034957610125565b806391db0b7e1461023d578063ce46e0461461026d578063e30c39781461029757610125565b8063715018a6116100ba578063715018a6146101b757806379ba5097146101cd57806388e5b2d9146101e35780638da5cb5b1461021357610125565b80630dbe124c146101295780634cf08ec41461016557806354fd4d501461018d57610125565b36610125576100ed610385565b610123576040517f1574f9f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b5f5ffd5b348015610134575f5ffd5b5061014f600480360381019061014a91906112bd565b61038c565b60405161015c919061130a565b60405180910390f35b348015610170575f5ffd5b5061018b60048036038101906101869190611358565b61039f565b005b348015610198575f5ffd5b506101a16104b1565b6040516101ae919061142c565b60405180910390f35b3480156101c2575f5ffd5b506101cb610554565b005b3480156101d8575f5ffd5b506101e1610567565b005b6101fd60048036038101906101f89190611502565b6105f5565b60405161020a919061158f565b60405180910390f35b34801561021e575f5ffd5b50610227610708565b604051610234919061130a565b60405180910390f35b61025760048036038101906102529190611502565b61072f565b604051610264919061158f565b60405180910390f35b348015610278575f5ffd5b50610281610385565b60405161028e919061158f565b60405180910390f35b3480156102a2575f5ffd5b506102ab610842565b6040516102b8919061130a565b60405180910390f35b6102db60048036038101906102d691906115cb565b61086a565b6040516102e8919061158f565b60405180910390f35b61030b600480360381019061030691906115cb565b610884565b604051610318919061158f565b60405180910390f35b34801561032c575f5ffd5b5061034760048036038101906103429190611612565b61089e565b005b348015610354575f5ffd5b5061036f600480360381019061036a919061163d565b61094a565b60405161037c919061158f565b60405180910390f35b5f5f905090565b5f610397838361097f565b905092915050565b6103a76109c3565b8060025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8581526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16838573ffffffffffffffffffffffffffffffffffffffff167fa52909b2529d0d02f49631bcdaa508c7a9fc2907f3c5f71b7f1dcb4da7d19016846040516104a3919061158f565b60405180910390a450505050565b60606104dc7f0000000000000000000000000000000000000000000000000000000000000000610a4a565b6105057f0000000000000000000000000000000000000000000000000000000000000000610a4a565b61052e7f0000000000000000000000000000000000000000000000000000000000000000610a4a565b60405160200161054093929190611711565b604051602081830303815290604052905090565b61055c6109c3565b6105655f610b14565b565b5f610570610b44565b90508073ffffffffffffffffffffffffffffffffffffffff16610591610842565b73ffffffffffffffffffffffffffffffffffffffff16146105e957806040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016105e0919061130a565b60405180910390fd5b6105f281610b14565b50565b5f6105fe610b4b565b5f858590509050838390508114610641576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f3490505f5f90505b828110156106f8575f86868381811061066657610665611757565b5b905060200201359050828111156106a9576040517f1101129400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106d78989848181106106bf576106be611757565b5b90506020028101906106d19190611790565b82610bd2565b6106e7575f945050505050610700565b80830392505080600101905061064a565b506001925050505b949350505050565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f610738610b4b565b5f85859050905083839050811461077b576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f3490505f5f90505b82811015610832575f8686838181106107a05761079f611757565b5b905060200201359050828111156107e3576040517f1101129400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108118989848181106107f9576107f8611757565b5b905060200281019061080b9190611790565b82610dc5565b610821575f94505050505061083a565b808303925050806001019050610784565b506001925050505b949350505050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f610873610b4b565b61087d8234610bd2565b9050919050565b5f61088d610b4b565b6108978234610dc5565b9050919050565b6108a66109c3565b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16610905610708565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6002602052825f5260405f20602052815f5260405f20602052805f5260405f205f92509250509054906101000a900460ff1681565b5f5f601960f81b5f60f81b858560405160200161099f94939291906118d8565b604051602081830303815290604052805190602001209050805f1c91505092915050565b6109cb610b44565b73ffffffffffffffffffffffffffffffffffffffff166109e9610708565b73ffffffffffffffffffffffffffffffffffffffff1614610a4857610a0c610b44565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610a3f919061130a565b60405180910390fd5b565b60605f6001610a588461100d565b0190505f8167ffffffffffffffff811115610a7657610a75611930565b5b6040519080825280601f01601f191660200182016040528015610aa85781602001600182028036833780820191505090505b5090505f82602083010190505b600115610b09578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610afe57610afd61195d565b5b0494505f8503610ab5575b819350505050919050565b60015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055610b418161115e565b50565b5f33905090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bd0576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f5f5f84806101200190610be6919061198a565b810190610bf39190611b22565b5050915091505f610c04838361097f565b90505f8373ffffffffffffffffffffffffffffffffffffffff168760c0016020810190610c319190611612565b73ffffffffffffffffffffffffffffffffffffffff161480610c9057508173ffffffffffffffffffffffffffffffffffffffff168760c0016020810190610c789190611612565b73ffffffffffffffffffffffffffffffffffffffff16145b905080610cd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc990611bec565b60405180910390fd5b60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8481526020019081526020015f205f8860e0016020810190610d329190611612565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16610db7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dae90611c7a565b60405180910390fd5b600194505050505092915050565b5f5f5f5f5f86806101200190610ddb919061198a565b810190610de89190611b22565b93509350935093505f610dfb858561097f565b9050838573ffffffffffffffffffffffffffffffffffffffff167fac7da86a3b31dd8dc95acb9592e9bc9b9a213923695627428be12fdbae04fe0883604051610e44919061130a565b60405180910390a35f8573ffffffffffffffffffffffffffffffffffffffff168960c0016020810190610e779190611612565b73ffffffffffffffffffffffffffffffffffffffff161480610ed657508173ffffffffffffffffffffffffffffffffffffffff168960c0016020810190610ebe9190611612565b73ffffffffffffffffffffffffffffffffffffffff16145b905080610f18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0f90611bec565b60405180910390fd5b60025f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8681526020019081526020015f205f8a60e0016020810190610f789190611612565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16610ffd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff490611c7a565b60405180910390fd5b6001965050505050505092915050565b5f5f5f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611069577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161105f5761105e61195d565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106110a6576d04ee2d6d415b85acef8100000000838161109c5761109b61195d565b5b0492506020810190505b662386f26fc1000083106110d557662386f26fc1000083816110cb576110ca61195d565b5b0492506010810190505b6305f5e10083106110fe576305f5e10083816110f4576110f361195d565b5b0492506008810190505b61271083106111235761271083816111195761111861195d565b5b0492506004810190505b60648310611146576064838161113c5761113b61195d565b5b0492506002810190505b600a8310611155576001810190505b80915050919050565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f604051905090565b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61125982611230565b9050919050565b6112698161124f565b8114611273575f5ffd5b50565b5f8135905061128481611260565b92915050565b5f819050919050565b61129c8161128a565b81146112a6575f5ffd5b50565b5f813590506112b781611293565b92915050565b5f5f604083850312156112d3576112d2611228565b5b5f6112e085828601611276565b92505060206112f1858286016112a9565b9150509250929050565b6113048161124f565b82525050565b5f60208201905061131d5f8301846112fb565b92915050565b5f8115159050919050565b61133781611323565b8114611341575f5ffd5b50565b5f813590506113528161132e565b92915050565b5f5f5f5f608085870312156113705761136f611228565b5b5f61137d87828801611276565b945050602061138e878288016112a9565b935050604061139f87828801611276565b92505060606113b087828801611344565b91505092959194509250565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6113fe826113bc565b61140881856113c6565b93506114188185602086016113d6565b611421816113e4565b840191505092915050565b5f6020820190508181035f83015261144481846113f4565b905092915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f84011261146d5761146c61144c565b5b8235905067ffffffffffffffff81111561148a57611489611450565b5b6020830191508360208202830111156114a6576114a5611454565b5b9250929050565b5f5f83601f8401126114c2576114c161144c565b5b8235905067ffffffffffffffff8111156114df576114de611450565b5b6020830191508360208202830111156114fb576114fa611454565b5b9250929050565b5f5f5f5f6040858703121561151a57611519611228565b5b5f85013567ffffffffffffffff8111156115375761153661122c565b5b61154387828801611458565b9450945050602085013567ffffffffffffffff8111156115665761156561122c565b5b611572878288016114ad565b925092505092959194509250565b61158981611323565b82525050565b5f6020820190506115a25f830184611580565b92915050565b5f5ffd5b5f61014082840312156115c2576115c16115a8565b5b81905092915050565b5f602082840312156115e0576115df611228565b5b5f82013567ffffffffffffffff8111156115fd576115fc61122c565b5b611609848285016115ac565b91505092915050565b5f6020828403121561162757611626611228565b5b5f61163484828501611276565b91505092915050565b5f5f5f6060848603121561165457611653611228565b5b5f61166186828701611276565b9350506020611672868287016112a9565b925050604061168386828701611276565b9150509250925092565b5f81905092915050565b5f6116a1826113bc565b6116ab818561168d565b93506116bb8185602086016113d6565b80840191505092915050565b7f2e000000000000000000000000000000000000000000000000000000000000005f82015250565b5f6116fb60018361168d565b9150611706826116c7565b600182019050919050565b5f61171c8286611697565b9150611727826116ef565b91506117338285611697565b915061173e826116ef565b915061174a8284611697565b9150819050949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f82356001610140038336030381126117ac576117ab611784565b5b80830191505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b5f819050919050565b6117fd6117f8826117b8565b6117e3565b82525050565b5f8160601b9050919050565b5f61181982611803565b9050919050565b5f61182a8261180f565b9050919050565b61184261183d8261124f565b611820565b82525050565b5f819050919050565b61186261185d8261128a565b611848565b82525050565b7f53544545525f4d554c54495f434841494e5f5641554c545f4944454e544946495f8201527f4552000000000000000000000000000000000000000000000000000000000000602082015250565b5f6118c260228361168d565b91506118cd82611868565b602282019050919050565b5f6118e382876117ec565b6001820191506118f382866117ec565b6001820191506119038285611831565b6014820191506119138284611851565b602082019150611922826118b6565b915081905095945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f5f833560016020038436030381126119a6576119a5611784565b5b80840192508235915067ffffffffffffffff8211156119c8576119c7611788565b5b6020830192506001820236038313156119e4576119e361178c565b5b509250929050565b5f6119f682611230565b9050919050565b611a06816119ec565b8114611a10575f5ffd5b50565b5f81359050611a21816119fd565b92915050565b5f5ffd5b611a34826113e4565b810181811067ffffffffffffffff82111715611a5357611a52611930565b5b80604052505050565b5f611a6561121f565b9050611a718282611a2b565b919050565b5f67ffffffffffffffff821115611a9057611a8f611930565b5b611a99826113e4565b9050602081019050919050565b828183375f83830152505050565b5f611ac6611ac184611a76565b611a5c565b905082815260208101848484011115611ae257611ae1611a27565b5b611aed848285611aa6565b509392505050565b5f82601f830112611b0957611b0861144c565b5b8135611b19848260208601611ab4565b91505092915050565b5f5f5f5f60808587031215611b3a57611b39611228565b5b5f611b4787828801611a13565b9450506020611b58878288016112a9565b9350506040611b69878288016112a9565b925050606085013567ffffffffffffffff811115611b8a57611b8961122c565b5b611b9687828801611af5565b91505092959194509250565b7f496e76616c696420726563697069656e7420666f726d617400000000000000005f82015250565b5f611bd66018836113c6565b9150611be182611ba2565b602082019050919050565b5f6020820190508181035f830152611c0381611bca565b9050919050565b7f4e6f7420616e20617574686f72697a65642063757261746f7220666f722074685f8201527f6973207661756c74206f6e207468697320636861696e00000000000000000000602082015250565b5f611c646036836113c6565b9150611c6f82611c0a565b604082019050919050565b5f6020820190508181035f830152611c9181611c58565b905091905056fea26469706673582212206d46b546b15953e9d40d17dc5c6d3ad445d2d404dd3059e7750099f275b7117764736f6c634300081c0033",
662
+ deployedBytecode: "0x6080604052600436106100e0575f3560e01c806391db0b7e1161007e578063e49617e111610058578063e49617e1146102c1578063e60c3505146102f1578063f2fde38b14610321578063faebd78f1461034957610125565b806391db0b7e1461023d578063ce46e0461461026d578063e30c39781461029757610125565b8063715018a6116100ba578063715018a6146101b757806379ba5097146101cd57806388e5b2d9146101e35780638da5cb5b1461021357610125565b80630dbe124c146101295780634cf08ec41461016557806354fd4d501461018d57610125565b36610125576100ed610385565b610123576040517f1574f9f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b5f5ffd5b348015610134575f5ffd5b5061014f600480360381019061014a91906112bd565b61038c565b60405161015c919061130a565b60405180910390f35b348015610170575f5ffd5b5061018b60048036038101906101869190611358565b61039f565b005b348015610198575f5ffd5b506101a16104b1565b6040516101ae919061142c565b60405180910390f35b3480156101c2575f5ffd5b506101cb610554565b005b3480156101d8575f5ffd5b506101e1610567565b005b6101fd60048036038101906101f89190611502565b6105f5565b60405161020a919061158f565b60405180910390f35b34801561021e575f5ffd5b50610227610708565b604051610234919061130a565b60405180910390f35b61025760048036038101906102529190611502565b61072f565b604051610264919061158f565b60405180910390f35b348015610278575f5ffd5b50610281610385565b60405161028e919061158f565b60405180910390f35b3480156102a2575f5ffd5b506102ab610842565b6040516102b8919061130a565b60405180910390f35b6102db60048036038101906102d691906115cb565b61086a565b6040516102e8919061158f565b60405180910390f35b61030b600480360381019061030691906115cb565b610884565b604051610318919061158f565b60405180910390f35b34801561032c575f5ffd5b5061034760048036038101906103429190611612565b61089e565b005b348015610354575f5ffd5b5061036f600480360381019061036a919061163d565b61094a565b60405161037c919061158f565b60405180910390f35b5f5f905090565b5f610397838361097f565b905092915050565b6103a76109c3565b8060025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8581526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16838573ffffffffffffffffffffffffffffffffffffffff167fa52909b2529d0d02f49631bcdaa508c7a9fc2907f3c5f71b7f1dcb4da7d19016846040516104a3919061158f565b60405180910390a450505050565b60606104dc7f0000000000000000000000000000000000000000000000000000000000000000610a4a565b6105057f0000000000000000000000000000000000000000000000000000000000000000610a4a565b61052e7f0000000000000000000000000000000000000000000000000000000000000000610a4a565b60405160200161054093929190611711565b604051602081830303815290604052905090565b61055c6109c3565b6105655f610b14565b565b5f610570610b44565b90508073ffffffffffffffffffffffffffffffffffffffff16610591610842565b73ffffffffffffffffffffffffffffffffffffffff16146105e957806040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016105e0919061130a565b60405180910390fd5b6105f281610b14565b50565b5f6105fe610b4b565b5f858590509050838390508114610641576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f3490505f5f90505b828110156106f8575f86868381811061066657610665611757565b5b905060200201359050828111156106a9576040517f1101129400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106d78989848181106106bf576106be611757565b5b90506020028101906106d19190611790565b82610bd2565b6106e7575f945050505050610700565b80830392505080600101905061064a565b506001925050505b949350505050565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f610738610b4b565b5f85859050905083839050811461077b576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f3490505f5f90505b82811015610832575f8686838181106107a05761079f611757565b5b905060200201359050828111156107e3576040517f1101129400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108118989848181106107f9576107f8611757565b5b905060200281019061080b9190611790565b82610dc5565b610821575f94505050505061083a565b808303925050806001019050610784565b506001925050505b949350505050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f610873610b4b565b61087d8234610bd2565b9050919050565b5f61088d610b4b565b6108978234610dc5565b9050919050565b6108a66109c3565b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16610905610708565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6002602052825f5260405f20602052815f5260405f20602052805f5260405f205f92509250509054906101000a900460ff1681565b5f5f601960f81b5f60f81b858560405160200161099f94939291906118d8565b604051602081830303815290604052805190602001209050805f1c91505092915050565b6109cb610b44565b73ffffffffffffffffffffffffffffffffffffffff166109e9610708565b73ffffffffffffffffffffffffffffffffffffffff1614610a4857610a0c610b44565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610a3f919061130a565b60405180910390fd5b565b60605f6001610a588461100d565b0190505f8167ffffffffffffffff811115610a7657610a75611930565b5b6040519080825280601f01601f191660200182016040528015610aa85781602001600182028036833780820191505090505b5090505f82602083010190505b600115610b09578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610afe57610afd61195d565b5b0494505f8503610ab5575b819350505050919050565b60015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055610b418161115e565b50565b5f33905090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bd0576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f5f5f84806101200190610be6919061198a565b810190610bf39190611b22565b5050915091505f610c04838361097f565b90505f8373ffffffffffffffffffffffffffffffffffffffff168760c0016020810190610c319190611612565b73ffffffffffffffffffffffffffffffffffffffff161480610c9057508173ffffffffffffffffffffffffffffffffffffffff168760c0016020810190610c789190611612565b73ffffffffffffffffffffffffffffffffffffffff16145b905080610cd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc990611bec565b60405180910390fd5b60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8481526020019081526020015f205f8860e0016020810190610d329190611612565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16610db7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dae90611c7a565b60405180910390fd5b600194505050505092915050565b5f5f5f5f5f86806101200190610ddb919061198a565b810190610de89190611b22565b93509350935093505f610dfb858561097f565b9050838573ffffffffffffffffffffffffffffffffffffffff167fac7da86a3b31dd8dc95acb9592e9bc9b9a213923695627428be12fdbae04fe0883604051610e44919061130a565b60405180910390a35f8573ffffffffffffffffffffffffffffffffffffffff168960c0016020810190610e779190611612565b73ffffffffffffffffffffffffffffffffffffffff161480610ed657508173ffffffffffffffffffffffffffffffffffffffff168960c0016020810190610ebe9190611612565b73ffffffffffffffffffffffffffffffffffffffff16145b905080610f18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0f90611bec565b60405180910390fd5b60025f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8681526020019081526020015f205f8a60e0016020810190610f789190611612565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16610ffd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff490611c7a565b60405180910390fd5b6001965050505050505092915050565b5f5f5f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611069577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161105f5761105e61195d565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106110a6576d04ee2d6d415b85acef8100000000838161109c5761109b61195d565b5b0492506020810190505b662386f26fc1000083106110d557662386f26fc1000083816110cb576110ca61195d565b5b0492506010810190505b6305f5e10083106110fe576305f5e10083816110f4576110f361195d565b5b0492506008810190505b61271083106111235761271083816111195761111861195d565b5b0492506004810190505b60648310611146576064838161113c5761113b61195d565b5b0492506002810190505b600a8310611155576001810190505b80915050919050565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f604051905090565b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61125982611230565b9050919050565b6112698161124f565b8114611273575f5ffd5b50565b5f8135905061128481611260565b92915050565b5f819050919050565b61129c8161128a565b81146112a6575f5ffd5b50565b5f813590506112b781611293565b92915050565b5f5f604083850312156112d3576112d2611228565b5b5f6112e085828601611276565b92505060206112f1858286016112a9565b9150509250929050565b6113048161124f565b82525050565b5f60208201905061131d5f8301846112fb565b92915050565b5f8115159050919050565b61133781611323565b8114611341575f5ffd5b50565b5f813590506113528161132e565b92915050565b5f5f5f5f608085870312156113705761136f611228565b5b5f61137d87828801611276565b945050602061138e878288016112a9565b935050604061139f87828801611276565b92505060606113b087828801611344565b91505092959194509250565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6113fe826113bc565b61140881856113c6565b93506114188185602086016113d6565b611421816113e4565b840191505092915050565b5f6020820190508181035f83015261144481846113f4565b905092915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f84011261146d5761146c61144c565b5b8235905067ffffffffffffffff81111561148a57611489611450565b5b6020830191508360208202830111156114a6576114a5611454565b5b9250929050565b5f5f83601f8401126114c2576114c161144c565b5b8235905067ffffffffffffffff8111156114df576114de611450565b5b6020830191508360208202830111156114fb576114fa611454565b5b9250929050565b5f5f5f5f6040858703121561151a57611519611228565b5b5f85013567ffffffffffffffff8111156115375761153661122c565b5b61154387828801611458565b9450945050602085013567ffffffffffffffff8111156115665761156561122c565b5b611572878288016114ad565b925092505092959194509250565b61158981611323565b82525050565b5f6020820190506115a25f830184611580565b92915050565b5f5ffd5b5f61014082840312156115c2576115c16115a8565b5b81905092915050565b5f602082840312156115e0576115df611228565b5b5f82013567ffffffffffffffff8111156115fd576115fc61122c565b5b611609848285016115ac565b91505092915050565b5f6020828403121561162757611626611228565b5b5f61163484828501611276565b91505092915050565b5f5f5f6060848603121561165457611653611228565b5b5f61166186828701611276565b9350506020611672868287016112a9565b925050604061168386828701611276565b9150509250925092565b5f81905092915050565b5f6116a1826113bc565b6116ab818561168d565b93506116bb8185602086016113d6565b80840191505092915050565b7f2e000000000000000000000000000000000000000000000000000000000000005f82015250565b5f6116fb60018361168d565b9150611706826116c7565b600182019050919050565b5f61171c8286611697565b9150611727826116ef565b91506117338285611697565b915061173e826116ef565b915061174a8284611697565b9150819050949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f82356001610140038336030381126117ac576117ab611784565b5b80830191505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b5f819050919050565b6117fd6117f8826117b8565b6117e3565b82525050565b5f8160601b9050919050565b5f61181982611803565b9050919050565b5f61182a8261180f565b9050919050565b61184261183d8261124f565b611820565b82525050565b5f819050919050565b61186261185d8261128a565b611848565b82525050565b7f53544545525f4d554c54495f434841494e5f5641554c545f4944454e544946495f8201527f4552000000000000000000000000000000000000000000000000000000000000602082015250565b5f6118c260228361168d565b91506118cd82611868565b602282019050919050565b5f6118e382876117ec565b6001820191506118f382866117ec565b6001820191506119038285611831565b6014820191506119138284611851565b602082019150611922826118b6565b915081905095945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f5f833560016020038436030381126119a6576119a5611784565b5b80840192508235915067ffffffffffffffff8211156119c8576119c7611788565b5b6020830192506001820236038313156119e4576119e361178c565b5b509250929050565b5f6119f682611230565b9050919050565b611a06816119ec565b8114611a10575f5ffd5b50565b5f81359050611a21816119fd565b92915050565b5f5ffd5b611a34826113e4565b810181811067ffffffffffffffff82111715611a5357611a52611930565b5b80604052505050565b5f611a6561121f565b9050611a718282611a2b565b919050565b5f67ffffffffffffffff821115611a9057611a8f611930565b5b611a99826113e4565b9050602081019050919050565b828183375f83830152505050565b5f611ac6611ac184611a76565b611a5c565b905082815260208101848484011115611ae257611ae1611a27565b5b611aed848285611aa6565b509392505050565b5f82601f830112611b0957611b0861144c565b5b8135611b19848260208601611ab4565b91505092915050565b5f5f5f5f60808587031215611b3a57611b39611228565b5b5f611b4787828801611a13565b9450506020611b58878288016112a9565b9350506040611b69878288016112a9565b925050606085013567ffffffffffffffff811115611b8a57611b8961122c565b5b611b9687828801611af5565b91505092959194509250565b7f496e76616c696420726563697069656e7420666f726d617400000000000000005f82015250565b5f611bd66018836113c6565b9150611be182611ba2565b602082019050919050565b5f6020820190508181035f830152611c0381611bca565b9050919050565b7f4e6f7420616e20617574686f72697a65642063757261746f7220666f722074685f8201527f6973207661756c74206f6e207468697320636861696e00000000000000000000602082015250565b5f611c646036836113c6565b9150611c6f82611c0a565b604082019050919050565b5f6020820190508181035f830152611c9181611c58565b905091905056fea26469706673582212206d46b546b15953e9d40d17dc5c6d3ad445d2d404dd3059e7750099f275b7117764736f6c634300081c0033",
663
+ compiler: {
664
+ version: "0.8.28+commit.7893614a"
665
+ },
666
+ extractedAt: "2026-01-07T11:55:32.000Z",
667
+ sourceFile: "src/SteerAuthorityResolver.sol"
668
+ };
669
+
670
+ // src/StrategyStore.ts
5
671
  var AddressSchema = z.string().refine((addr) => ethers.isAddress(addr), {
6
672
  message: "Invalid Ethereum address"
7
673
  });
8
- var RESOLVER_ABI = [
9
- "function owner() view returns (address)",
10
- "function isCurator(address vault, address curator) view returns (bool)",
11
- "function setCurator(address vault, address curator, bool status) external"
12
- ];
674
+ var RESOLVER_ABI = SteerAuthorityResolver_default.abi;
13
675
  var REGISTRY_ABI = [
14
676
  "function totalVaultCount() view returns (uint256)",
15
677
  "function getVaultDetails(address _address) view returns (tuple(uint8 state, uint256 tokenId, uint256 vaultID, string payloadIpfs, address vaultAddress, string beaconName))"
16
678
  ];
679
+ var CHAINS = {
680
+ BASE_MAINNET: {
681
+ chainId: __default.chainId,
682
+ chainName: __default.chainName,
683
+ chain: base,
684
+ rpcUrl: __default.rpcUrl,
685
+ explorerUrl: __default.explorerUrl,
686
+ easAddress: __default.easAddress,
687
+ schemaRegistry: __default.schemaRegistry,
688
+ resolverAddress: __default.deployments.SteerAuthorityResolver.address,
689
+ schemaUID: __default.schema.uid
690
+ }
691
+ };
692
+ var CHAIN_CONFIGS = Object.values(CHAINS);
693
+ var getChainConfigByChainId = (chainId) => CHAIN_CONFIGS.find((chainConfig) => chainConfig.chainId === chainId);
694
+ var DOMAIN_SEPARATOR = "STEER_MULTI_CHAIN_VAULT_IDENTIFIER";
695
+ function computeVaultIdentifier(vault, chainId) {
696
+ const packed = encodePacked(
697
+ ["bytes1", "bytes1", "address", "uint256", "string"],
698
+ ["0x19", "0x00", vault, chainId, DOMAIN_SEPARATOR]
699
+ );
700
+ const hash = keccak256(packed);
701
+ return `0x${hash.slice(-40)}`;
702
+ }
17
703
  var StrategyStore = class _StrategyStore {
18
704
  static ARBITRUM_ONE_RESOLVER_ADDRESS = "0x6628d1Bf82F34de132d0e1c60DEB574C1352d5A7";
19
705
  static ARBITRUM_ONE_CROSSCHAIN_SCHEMA_UID = "0xf1a6a394d1f3dd832a15e5b750963d929812e2b74d2dcea68ddf9f75691f16bf";
@@ -28,6 +714,7 @@ var StrategyStore = class _StrategyStore {
28
714
  registry;
29
715
  resolverAddress;
30
716
  registryAddress;
717
+ chainId;
31
718
  constructor(config, providerOrSigner, overrides) {
32
719
  let resAddr;
33
720
  let regAddr;
@@ -36,6 +723,11 @@ var StrategyStore = class _StrategyStore {
36
723
  } else {
37
724
  resAddr = config.resolverAddress;
38
725
  regAddr = config.registryAddress;
726
+ this.chainId = config.chainId;
727
+ const chainConfig = config.chainId ? getChainConfigByChainId(config.chainId) : void 0;
728
+ if (!resAddr && chainConfig?.resolverAddress) {
729
+ resAddr = chainConfig.resolverAddress;
730
+ }
39
731
  if (!resAddr && config.chainId) {
40
732
  if (config.chainId === 42161) {
41
733
  resAddr = _StrategyStore.ARBITRUM_ONE_RESOLVER_ADDRESS;
@@ -60,6 +752,13 @@ var StrategyStore = class _StrategyStore {
60
752
  this.registry = overrides?.registry || new ethers.Contract(this.registryAddress, REGISTRY_ABI, providerOrSigner);
61
753
  }
62
754
  }
755
+ resolveChainId(chainId) {
756
+ const resolvedChainId = chainId ?? this.chainId;
757
+ if (resolvedChainId === void 0) {
758
+ throw new Error("chainId is required to perform this action");
759
+ }
760
+ return resolvedChainId;
761
+ }
63
762
  /**
64
763
  * Checks if an address is the top-level admin.
65
764
  * @param address The address to check.
@@ -70,56 +769,49 @@ var StrategyStore = class _StrategyStore {
70
769
  return owner.toLowerCase() === validatedAddress.toLowerCase();
71
770
  }
72
771
  /**
73
-
74
- * Checks if a curator is authorized for a specific vault.
75
-
76
- * @param vault The vault address.
77
-
78
- * @param curator The curator address.
79
-
80
- */
81
- async isCurator(vault, curator) {
772
+ * Checks if a curator is authorized for a specific vault.
773
+ * @param vault The vault address.
774
+ * @param curator The curator address.
775
+ * @param chainId The chain ID for authorization (defaults to config chainId).
776
+ */
777
+ async isCurator(vault, curator, chainId) {
82
778
  const validatedVault = AddressSchema.parse(vault);
83
779
  const validatedCurator = AddressSchema.parse(curator);
780
+ const resolvedChainId = this.resolveChainId(chainId);
84
781
  if (this.registry) {
85
782
  const details = await this.registry.getVaultDetails(validatedVault);
86
783
  if (details.vaultAddress === ethers.ZeroAddress || details.vaultAddress.toLowerCase() !== validatedVault.toLowerCase()) {
87
784
  throw new Error(`Address ${validatedVault} is not a valid Steer vault`);
88
785
  }
89
786
  }
90
- return await this.resolver.isCurator(validatedVault, validatedCurator);
787
+ return await this.resolver.isCurator(validatedVault, resolvedChainId, validatedCurator);
91
788
  }
92
789
  /**
93
-
94
-
95
-
96
- * Encodes a transaction to register or revoke a curator.
97
-
98
-
99
-
100
- * @param vault The vault address.
101
-
102
-
103
-
104
- * @param curator The curator address.
105
-
106
-
107
-
108
- * @param status The status to set (default: true).
109
-
110
-
111
-
112
- */
113
- async registerCuratorTx(vault, curator, status = true) {
790
+ * Encodes a transaction to register or revoke a curator.
791
+ * @param vault The vault address.
792
+ * @param curator The curator address.
793
+ * @param statusOrChainId The status to set (boolean) or chain ID if status is omitted.
794
+ * @param chainId The chain ID for authorization (defaults to config chainId).
795
+ */
796
+ async registerCuratorTx(vault, curator, statusOrChainId = true, chainId) {
114
797
  const validatedVault = AddressSchema.parse(vault);
115
798
  const validatedCurator = AddressSchema.parse(curator);
799
+ const resolvedStatus = typeof statusOrChainId === "boolean" ? statusOrChainId : true;
800
+ const resolvedChainId = this.resolveChainId(
801
+ typeof statusOrChainId === "boolean" ? chainId : statusOrChainId
802
+ );
116
803
  if (this.registry) {
117
804
  const details = await this.registry.getVaultDetails(validatedVault);
118
805
  if (details.vaultAddress === ethers.ZeroAddress || details.vaultAddress.toLowerCase() !== validatedVault.toLowerCase()) {
119
806
  throw new Error(`Address ${validatedVault} is not a valid Steer vault`);
120
807
  }
121
808
  }
122
- const data = this.resolver.interface.encodeFunctionData("setCurator", [validatedVault, validatedCurator, status]);
809
+ const data = this.resolver.interface.encodeFunctionData("setCurator", [
810
+ validatedVault,
811
+ resolvedChainId,
812
+ validatedCurator,
813
+ resolvedStatus
814
+ ]);
123
815
  return {
124
816
  to: this.resolverAddress,
125
817
  data
@@ -127,5 +819,7 @@ var StrategyStore = class _StrategyStore {
127
819
  }
128
820
  };
129
821
  export {
130
- StrategyStore
822
+ CHAINS,
823
+ StrategyStore,
824
+ computeVaultIdentifier
131
825
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steerprotocol/curator-tools",
3
- "version": "1.4.1",
3
+ "version": "1.6.0",
4
4
  "description": "Steer Protocol Curator Override Tools",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -22,7 +22,10 @@
22
22
  "test": "test"
23
23
  },
24
24
  "scripts": {
25
- "test": "jest",
25
+ "test": "npm run build && jest",
26
+ "test:ts": "jest",
27
+ "test:sol": "forge test",
28
+ "test:all": "npm run test:sol && npm run test",
26
29
  "build": "tsup src/index.ts --format esm --dts --clean",
27
30
  "prepublishOnly": "npm run build"
28
31
  },
@@ -32,6 +35,7 @@
32
35
  "dependencies": {
33
36
  "@steerprotocol/sdk": "^1.22.4",
34
37
  "ethers": "^6.16.0",
38
+ "viem": "^2.43.3",
35
39
  "zod": "^4.2.1"
36
40
  },
37
41
  "devDependencies": {
@@ -39,15 +43,15 @@
39
43
  "@semantic-release/git": "^10.0.1",
40
44
  "@semantic-release/github": "^12.0.2",
41
45
  "@semantic-release/npm": "^13.1.3",
42
- "@types/jest": "^30.0.0",
43
- "@types/node": "^25.0.3",
46
+ "@types/jest": "^29.5.12",
47
+ "@types/node": "^20.11.24",
44
48
  "@uniswap/sdk-core": "^7.10.0",
45
49
  "@uniswap/v3-sdk": "^3.27.0",
46
- "jest": "^30.2.0",
50
+ "jest": "^29.7.0",
47
51
  "semantic-release": "^25.0.2",
48
- "ts-jest": "^29.4.6",
52
+ "ts-jest": "^29.1.2",
49
53
  "ts-node": "^10.9.2",
50
54
  "tsup": "^8.5.1",
51
- "typescript": "^5.9.3"
55
+ "typescript": "^5.4.2"
52
56
  }
53
57
  }