@varla/sdk 1.10.12 → 1.10.13

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OracleUpdaterRouter.d.ts","sourceRoot":"","sources":["../../../src/abi/full/OracleUpdaterRouter.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+eZ,CAAC"}
@@ -0,0 +1,496 @@
1
+ export const ORACLEUPDATERROUTER_ABI = [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "address",
6
+ "name": "authority",
7
+ "type": "address"
8
+ }
9
+ ],
10
+ "stateMutability": "nonpayable",
11
+ "type": "constructor"
12
+ },
13
+ {
14
+ "inputs": [
15
+ {
16
+ "internalType": "address",
17
+ "name": "authority",
18
+ "type": "address"
19
+ }
20
+ ],
21
+ "name": "AccessManagedInvalidAuthority",
22
+ "type": "error"
23
+ },
24
+ {
25
+ "inputs": [
26
+ {
27
+ "internalType": "address",
28
+ "name": "caller",
29
+ "type": "address"
30
+ },
31
+ {
32
+ "internalType": "uint32",
33
+ "name": "delay",
34
+ "type": "uint32"
35
+ }
36
+ ],
37
+ "name": "AccessManagedRequiredDelay",
38
+ "type": "error"
39
+ },
40
+ {
41
+ "inputs": [
42
+ {
43
+ "internalType": "address",
44
+ "name": "caller",
45
+ "type": "address"
46
+ }
47
+ ],
48
+ "name": "AccessManagedUnauthorized",
49
+ "type": "error"
50
+ },
51
+ {
52
+ "inputs": [],
53
+ "name": "ArrayLengthMismatch",
54
+ "type": "error"
55
+ },
56
+ {
57
+ "inputs": [
58
+ {
59
+ "internalType": "uint256",
60
+ "name": "expected",
61
+ "type": "uint256"
62
+ },
63
+ {
64
+ "internalType": "uint256",
65
+ "name": "got",
66
+ "type": "uint256"
67
+ }
68
+ ],
69
+ "name": "BadChainId",
70
+ "type": "error"
71
+ },
72
+ {
73
+ "inputs": [
74
+ {
75
+ "internalType": "uint256",
76
+ "name": "expected",
77
+ "type": "uint256"
78
+ },
79
+ {
80
+ "internalType": "uint256",
81
+ "name": "got",
82
+ "type": "uint256"
83
+ }
84
+ ],
85
+ "name": "BadNonce",
86
+ "type": "error"
87
+ },
88
+ {
89
+ "inputs": [],
90
+ "name": "ECDSAInvalidSignature",
91
+ "type": "error"
92
+ },
93
+ {
94
+ "inputs": [
95
+ {
96
+ "internalType": "uint256",
97
+ "name": "length",
98
+ "type": "uint256"
99
+ }
100
+ ],
101
+ "name": "ECDSAInvalidSignatureLength",
102
+ "type": "error"
103
+ },
104
+ {
105
+ "inputs": [
106
+ {
107
+ "internalType": "bytes32",
108
+ "name": "s",
109
+ "type": "bytes32"
110
+ }
111
+ ],
112
+ "name": "ECDSAInvalidSignatureS",
113
+ "type": "error"
114
+ },
115
+ {
116
+ "inputs": [
117
+ {
118
+ "internalType": "uint256",
119
+ "name": "deadline",
120
+ "type": "uint256"
121
+ }
122
+ ],
123
+ "name": "Expired",
124
+ "type": "error"
125
+ },
126
+ {
127
+ "inputs": [
128
+ {
129
+ "internalType": "address",
130
+ "name": "publisher",
131
+ "type": "address"
132
+ }
133
+ ],
134
+ "name": "InvalidPublisher",
135
+ "type": "error"
136
+ },
137
+ {
138
+ "inputs": [],
139
+ "name": "InvalidShortString",
140
+ "type": "error"
141
+ },
142
+ {
143
+ "inputs": [],
144
+ "name": "InvalidSignature",
145
+ "type": "error"
146
+ },
147
+ {
148
+ "inputs": [
149
+ {
150
+ "internalType": "string",
151
+ "name": "str",
152
+ "type": "string"
153
+ }
154
+ ],
155
+ "name": "StringTooLong",
156
+ "type": "error"
157
+ },
158
+ {
159
+ "anonymous": false,
160
+ "inputs": [
161
+ {
162
+ "indexed": false,
163
+ "internalType": "address",
164
+ "name": "authority",
165
+ "type": "address"
166
+ }
167
+ ],
168
+ "name": "AuthorityUpdated",
169
+ "type": "event"
170
+ },
171
+ {
172
+ "anonymous": false,
173
+ "inputs": [],
174
+ "name": "EIP712DomainChanged",
175
+ "type": "event"
176
+ },
177
+ {
178
+ "anonymous": false,
179
+ "inputs": [
180
+ {
181
+ "indexed": true,
182
+ "internalType": "address",
183
+ "name": "publisher",
184
+ "type": "address"
185
+ },
186
+ {
187
+ "indexed": false,
188
+ "internalType": "bool",
189
+ "name": "allowed",
190
+ "type": "bool"
191
+ }
192
+ ],
193
+ "name": "PublisherSet",
194
+ "type": "event"
195
+ },
196
+ {
197
+ "anonymous": false,
198
+ "inputs": [
199
+ {
200
+ "indexed": true,
201
+ "internalType": "address",
202
+ "name": "oracle",
203
+ "type": "address"
204
+ },
205
+ {
206
+ "indexed": true,
207
+ "internalType": "address",
208
+ "name": "publisher",
209
+ "type": "address"
210
+ },
211
+ {
212
+ "indexed": false,
213
+ "internalType": "uint256",
214
+ "name": "nonce",
215
+ "type": "uint256"
216
+ },
217
+ {
218
+ "indexed": false,
219
+ "internalType": "uint256",
220
+ "name": "count",
221
+ "type": "uint256"
222
+ }
223
+ ],
224
+ "name": "UpdateForwarded",
225
+ "type": "event"
226
+ },
227
+ {
228
+ "inputs": [],
229
+ "name": "authority",
230
+ "outputs": [
231
+ {
232
+ "internalType": "address",
233
+ "name": "",
234
+ "type": "address"
235
+ }
236
+ ],
237
+ "stateMutability": "view",
238
+ "type": "function"
239
+ },
240
+ {
241
+ "inputs": [],
242
+ "name": "eip712Domain",
243
+ "outputs": [
244
+ {
245
+ "internalType": "bytes1",
246
+ "name": "fields",
247
+ "type": "bytes1"
248
+ },
249
+ {
250
+ "internalType": "string",
251
+ "name": "name",
252
+ "type": "string"
253
+ },
254
+ {
255
+ "internalType": "string",
256
+ "name": "version",
257
+ "type": "string"
258
+ },
259
+ {
260
+ "internalType": "uint256",
261
+ "name": "chainId",
262
+ "type": "uint256"
263
+ },
264
+ {
265
+ "internalType": "address",
266
+ "name": "verifyingContract",
267
+ "type": "address"
268
+ },
269
+ {
270
+ "internalType": "bytes32",
271
+ "name": "salt",
272
+ "type": "bytes32"
273
+ },
274
+ {
275
+ "internalType": "uint256[]",
276
+ "name": "extensions",
277
+ "type": "uint256[]"
278
+ }
279
+ ],
280
+ "stateMutability": "view",
281
+ "type": "function"
282
+ },
283
+ {
284
+ "inputs": [
285
+ {
286
+ "components": [
287
+ {
288
+ "internalType": "address",
289
+ "name": "oracle",
290
+ "type": "address"
291
+ },
292
+ {
293
+ "internalType": "uint256",
294
+ "name": "chainId",
295
+ "type": "uint256"
296
+ },
297
+ {
298
+ "internalType": "address",
299
+ "name": "publisher",
300
+ "type": "address"
301
+ },
302
+ {
303
+ "internalType": "uint256",
304
+ "name": "nonce",
305
+ "type": "uint256"
306
+ },
307
+ {
308
+ "internalType": "uint256",
309
+ "name": "deadline",
310
+ "type": "uint256"
311
+ },
312
+ {
313
+ "internalType": "uint256[]",
314
+ "name": "positionIds",
315
+ "type": "uint256[]"
316
+ },
317
+ {
318
+ "internalType": "uint256[]",
319
+ "name": "priceList",
320
+ "type": "uint256[]"
321
+ },
322
+ {
323
+ "internalType": "uint256[]",
324
+ "name": "twapList",
325
+ "type": "uint256[]"
326
+ },
327
+ {
328
+ "internalType": "uint256[]",
329
+ "name": "liquidityList",
330
+ "type": "uint256[]"
331
+ }
332
+ ],
333
+ "internalType": "struct OracleUpdaterRouter.Update",
334
+ "name": "u",
335
+ "type": "tuple"
336
+ }
337
+ ],
338
+ "name": "hashUpdate",
339
+ "outputs": [
340
+ {
341
+ "internalType": "bytes32",
342
+ "name": "",
343
+ "type": "bytes32"
344
+ }
345
+ ],
346
+ "stateMutability": "view",
347
+ "type": "function"
348
+ },
349
+ {
350
+ "inputs": [],
351
+ "name": "isConsumingScheduledOp",
352
+ "outputs": [
353
+ {
354
+ "internalType": "bytes4",
355
+ "name": "",
356
+ "type": "bytes4"
357
+ }
358
+ ],
359
+ "stateMutability": "view",
360
+ "type": "function"
361
+ },
362
+ {
363
+ "inputs": [
364
+ {
365
+ "internalType": "address",
366
+ "name": "",
367
+ "type": "address"
368
+ }
369
+ ],
370
+ "name": "isPublisher",
371
+ "outputs": [
372
+ {
373
+ "internalType": "bool",
374
+ "name": "",
375
+ "type": "bool"
376
+ }
377
+ ],
378
+ "stateMutability": "view",
379
+ "type": "function"
380
+ },
381
+ {
382
+ "inputs": [
383
+ {
384
+ "internalType": "address",
385
+ "name": "",
386
+ "type": "address"
387
+ }
388
+ ],
389
+ "name": "nonces",
390
+ "outputs": [
391
+ {
392
+ "internalType": "uint256",
393
+ "name": "",
394
+ "type": "uint256"
395
+ }
396
+ ],
397
+ "stateMutability": "view",
398
+ "type": "function"
399
+ },
400
+ {
401
+ "inputs": [
402
+ {
403
+ "internalType": "address",
404
+ "name": "newAuthority",
405
+ "type": "address"
406
+ }
407
+ ],
408
+ "name": "setAuthority",
409
+ "outputs": [],
410
+ "stateMutability": "nonpayable",
411
+ "type": "function"
412
+ },
413
+ {
414
+ "inputs": [
415
+ {
416
+ "internalType": "address",
417
+ "name": "publisher",
418
+ "type": "address"
419
+ },
420
+ {
421
+ "internalType": "bool",
422
+ "name": "allowed",
423
+ "type": "bool"
424
+ }
425
+ ],
426
+ "name": "setPublisher",
427
+ "outputs": [],
428
+ "stateMutability": "nonpayable",
429
+ "type": "function"
430
+ },
431
+ {
432
+ "inputs": [
433
+ {
434
+ "components": [
435
+ {
436
+ "internalType": "address",
437
+ "name": "oracle",
438
+ "type": "address"
439
+ },
440
+ {
441
+ "internalType": "uint256",
442
+ "name": "chainId",
443
+ "type": "uint256"
444
+ },
445
+ {
446
+ "internalType": "address",
447
+ "name": "publisher",
448
+ "type": "address"
449
+ },
450
+ {
451
+ "internalType": "uint256",
452
+ "name": "nonce",
453
+ "type": "uint256"
454
+ },
455
+ {
456
+ "internalType": "uint256",
457
+ "name": "deadline",
458
+ "type": "uint256"
459
+ },
460
+ {
461
+ "internalType": "uint256[]",
462
+ "name": "positionIds",
463
+ "type": "uint256[]"
464
+ },
465
+ {
466
+ "internalType": "uint256[]",
467
+ "name": "priceList",
468
+ "type": "uint256[]"
469
+ },
470
+ {
471
+ "internalType": "uint256[]",
472
+ "name": "twapList",
473
+ "type": "uint256[]"
474
+ },
475
+ {
476
+ "internalType": "uint256[]",
477
+ "name": "liquidityList",
478
+ "type": "uint256[]"
479
+ }
480
+ ],
481
+ "internalType": "struct OracleUpdaterRouter.Update",
482
+ "name": "u",
483
+ "type": "tuple"
484
+ },
485
+ {
486
+ "internalType": "bytes",
487
+ "name": "sig",
488
+ "type": "bytes"
489
+ }
490
+ ],
491
+ "name": "updatePricesWithSig",
492
+ "outputs": [],
493
+ "stateMutability": "nonpayable",
494
+ "type": "function"
495
+ }
496
+ ];
@@ -1,4 +1,5 @@
1
1
  export { VARLAACCESSMANAGER_ABI } from "./full/VarlaAccessManager.js";
2
+ export { ORACLEUPDATERROUTER_ABI } from "./full/OracleUpdaterRouter.js";
2
3
  export { VARLAORACLE_ABI } from "./full/VarlaOracle.js";
3
4
  export { VARLACORE_ABI } from "./full/VarlaCore.js";
4
5
  export { VARLAPOOL_ABI } from "./full/VarlaPool.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/abi/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;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AAClG,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC"}
package/dist/abi/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // Auto-generated by varla-protocol/scripts/export-abi.ts
2
2
  // Do not edit manually.
3
3
  export { VARLAACCESSMANAGER_ABI } from "./full/VarlaAccessManager.js";
4
+ export { ORACLEUPDATERROUTER_ABI } from "./full/OracleUpdaterRouter.js";
4
5
  export { VARLAORACLE_ABI } from "./full/VarlaOracle.js";
5
6
  export { VARLACORE_ABI } from "./full/VarlaCore.js";
6
7
  export { VARLAPOOL_ABI } from "./full/VarlaPool.js";
@@ -133,4 +133,11 @@ export declare function prepareStrategySetRateParams(params: {
133
133
  account: Address;
134
134
  params: StrategyRateParams;
135
135
  }): Promise<SimulatedTx>;
136
+ export declare function prepareOracleUpdaterRouterSetPublisher(params: {
137
+ publicClient: Pick<PublicClient, "simulateContract">;
138
+ routerAddress: Address;
139
+ account: Address;
140
+ publisher: Address;
141
+ allowed: boolean;
142
+ }): Promise<SimulatedTx>;
136
143
  //# sourceMappingURL=admin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/actions/admin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAGlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAU/C,wBAAsB,8BAA8B,CAAC,MAAM,EAAE;IAC3D,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;IACrD,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,WAAW,CAAC,CAQvB;AAED,wBAAsB,+BAA+B,CAAC,MAAM,EAAE;IAC5D,YAAY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YAAY,EAAE,kBAAkB,CAAC,CAAC;IACrD,eAAe,EAAE,OAAO,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,kBAAkB,CAAC;CAC5B,GAAG,OAAO,CAAC,WAAW,CAAC,CAQvB;AAMD,wBAAsB,sCAAsC,CAAC,MAAM,EAAE;IACnE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;IACrD,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB,GAAG,OAAO,CAAC,WAAW,CAAC,CAQvB"}
@@ -192,3 +192,15 @@ export async function prepareStrategySetRateParams(params) {
192
192
  account: params.account,
193
193
  }));
194
194
  }
195
+ // -----------------
196
+ // OracleUpdaterRouter admin
197
+ // -----------------
198
+ export async function prepareOracleUpdaterRouterSetPublisher(params) {
199
+ return (await params.publicClient.simulateContract({
200
+ address: params.routerAddress,
201
+ abi: abis.ORACLEUPDATERROUTER_ABI,
202
+ functionName: "setPublisher",
203
+ args: [params.publisher, params.allowed],
204
+ account: params.account,
205
+ }));
206
+ }
@@ -1,6 +1,7 @@
1
1
  export * from "./tx.js";
2
2
  export * from "./utils.js";
3
3
  export * from "./oracle.js";
4
+ export * from "./oracleUpdaterRouter.js";
4
5
  export * from "./core.js";
5
6
  export * from "./pool.js";
6
7
  export * from "./liquidator.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAEA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAEA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
@@ -2,6 +2,7 @@
2
2
  export * from "./tx.js";
3
3
  export * from "./utils.js";
4
4
  export * from "./oracle.js";
5
+ export * from "./oracleUpdaterRouter.js";
5
6
  export * from "./core.js";
6
7
  export * from "./pool.js";
7
8
  export * from "./liquidator.js";
@@ -0,0 +1,84 @@
1
+ import type { Address, Hash } from "viem";
2
+ /**
3
+ * EIP-712 payload builder for OracleUpdaterRouter.
4
+ *
5
+ * Router contract name/version are fixed by the solidity constructor:
6
+ * - name: VarlaOracleUpdaterRouter
7
+ * - version: 1
8
+ */
9
+ export declare const ORACLE_UPDATER_ROUTER_EIP712: {
10
+ readonly name: "VarlaOracleUpdaterRouter";
11
+ readonly version: "1";
12
+ };
13
+ export type OracleUpdaterRouterUpdate = {
14
+ oracle: Address;
15
+ chainId: bigint;
16
+ publisher: Address;
17
+ nonce: bigint;
18
+ deadline: bigint;
19
+ positionIds: readonly bigint[];
20
+ priceList: readonly bigint[];
21
+ twapList: readonly bigint[];
22
+ liquidityList: readonly bigint[];
23
+ };
24
+ export declare const ORACLE_UPDATER_ROUTER_TYPES: {
25
+ readonly Update: readonly [{
26
+ readonly name: "oracle";
27
+ readonly type: "address";
28
+ }, {
29
+ readonly name: "chainId";
30
+ readonly type: "uint256";
31
+ }, {
32
+ readonly name: "publisher";
33
+ readonly type: "address";
34
+ }, {
35
+ readonly name: "nonce";
36
+ readonly type: "uint256";
37
+ }, {
38
+ readonly name: "deadline";
39
+ readonly type: "uint256";
40
+ }, {
41
+ readonly name: "positionIdsHash";
42
+ readonly type: "bytes32";
43
+ }, {
44
+ readonly name: "priceListHash";
45
+ readonly type: "bytes32";
46
+ }, {
47
+ readonly name: "twapListHash";
48
+ readonly type: "bytes32";
49
+ }, {
50
+ readonly name: "liquidityListHash";
51
+ readonly type: "bytes32";
52
+ }];
53
+ };
54
+ /**
55
+ * Convert an update with dynamic arrays into the typed-data "message" shape expected by the router.
56
+ */
57
+ export declare function toOracleUpdaterRouterTypedMessage(u: OracleUpdaterRouterUpdate): {
58
+ readonly oracle: `0x${string}`;
59
+ readonly chainId: bigint;
60
+ readonly publisher: `0x${string}`;
61
+ readonly nonce: bigint;
62
+ readonly deadline: bigint;
63
+ readonly positionIdsHash: `0x${string}`;
64
+ readonly priceListHash: `0x${string}`;
65
+ readonly twapListHash: `0x${string}`;
66
+ readonly liquidityListHash: `0x${string}`;
67
+ };
68
+ export declare function signOracleUpdaterRouterUpdate(params: {
69
+ walletClient: {
70
+ signTypedData: (args: any) => Promise<Hash>;
71
+ };
72
+ routerAddress: Address;
73
+ update: OracleUpdaterRouterUpdate;
74
+ }): Promise<Hash>;
75
+ export declare function prepareOracleUpdaterRouterUpdatePricesWithSig(params: {
76
+ publicClient: {
77
+ simulateContract: (args: any) => Promise<any>;
78
+ };
79
+ routerAddress: Address;
80
+ account: Address;
81
+ update: OracleUpdaterRouterUpdate;
82
+ signature: Hash;
83
+ }): Promise<any>;
84
+ //# sourceMappingURL=oracleUpdaterRouter.d.ts.map