@sentio/sdk 2.40.0-rc.5 → 2.40.0-rc.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.
Files changed (79) hide show
  1. package/lib/aptos/builtin/0x1.js +10 -10
  2. package/lib/aptos/builtin/0x3.js +11 -11
  3. package/lib/aptos/builtin/index.js +11 -11
  4. package/lib/aptos/codegen/index.js +3 -3
  5. package/lib/aptos/ext/index.js +10 -10
  6. package/lib/aptos/index.js +10 -10
  7. package/lib/chunk-2QEQTKQY.js +1050 -0
  8. package/lib/{chunk-Z7QWETBQ.js → chunk-3LE323R2.js} +2 -2
  9. package/lib/{chunk-QHHXY7LO.js → chunk-5XM56ENY.js} +5 -5
  10. package/lib/{chunk-RX5G4RN2.js → chunk-7NFMED3E.js} +2 -2
  11. package/lib/{chunk-KA5CLZU6.js → chunk-7NWX3CH7.js} +90 -53
  12. package/lib/{chunk-F2IZC2B6.js → chunk-EMF4HXFG.js} +5 -5
  13. package/lib/{chunk-VP6Y633M.js → chunk-GOWJIAB2.js} +2 -2
  14. package/lib/chunk-K5OSTLHI.js +916 -0
  15. package/lib/{chunk-WLLDVQFE.js → chunk-KO4GSZCM.js} +3 -3
  16. package/lib/chunk-KTAUVRJN.js +1910 -0
  17. package/lib/{chunk-2QVJGMW4.js → chunk-KVB555XD.js} +2 -2
  18. package/lib/{chunk-TDPQO2SX.js → chunk-LICAL3XW.js} +2 -2
  19. package/lib/{chunk-NBZRHB5V.js → chunk-O6QXDRGG.js} +5 -5
  20. package/lib/{chunk-6DDG76PU.js → chunk-P6T5WFAZ.js} +4 -4
  21. package/lib/chunk-QKJ5SWA2.js +861 -0
  22. package/lib/{chunk-VJTNBZMU.js → chunk-QTWMU7GQ.js} +1 -1
  23. package/lib/{chunk-OAIP7J4S.js → chunk-RXO7SOTL.js} +2757 -1157
  24. package/lib/{chunk-S727P6WP.js → chunk-SYEQKTIU.js} +1 -1
  25. package/lib/{chunk-7OBRGY7G.js → chunk-YNJXNOVA.js} +2 -2
  26. package/lib/{chunk-N4OQDWM2.js → chunk-YOLIZKGZ.js} +1 -1
  27. package/lib/{chunk-USETTWR7.js → chunk-Z5PQR6UE.js} +100 -54
  28. package/lib/core/index.js +3 -3
  29. package/lib/{eacaggregatorproxy-aed46d4a.d.ts → eacaggregatorproxy-cb8e39be.d.ts} +76 -24
  30. package/lib/{erc1155-80a76eb5.d.ts → erc1155-fb097c50.d.ts} +31 -9
  31. package/lib/{erc20-39aae019.d.ts → erc20-95ba7721.d.ts} +61 -19
  32. package/lib/{erc721-0a429bd4.d.ts → erc721-13bf7a61.d.ts} +49 -15
  33. package/lib/eth/builtin/eacaggregatorproxy.d.ts +1 -1
  34. package/lib/eth/builtin/eacaggregatorproxy.js +5 -5
  35. package/lib/eth/builtin/erc1155.d.ts +1 -1
  36. package/lib/eth/builtin/erc1155.js +5 -5
  37. package/lib/eth/builtin/erc20.d.ts +1 -1
  38. package/lib/eth/builtin/erc20.js +4 -4
  39. package/lib/eth/builtin/erc721.d.ts +1 -1
  40. package/lib/eth/builtin/erc721.js +4 -4
  41. package/lib/eth/builtin/index.d.ts +39 -15
  42. package/lib/eth/builtin/index.js +8 -8
  43. package/lib/eth/builtin/weth9.d.ts +1 -1
  44. package/lib/eth/builtin/weth9.js +5 -5
  45. package/lib/eth/codegen/index.js +130 -39
  46. package/lib/eth/index.d.ts +1 -0
  47. package/lib/eth/index.js +7 -4
  48. package/lib/fuel/index.js +4 -4
  49. package/lib/index.js +5 -3
  50. package/lib/move/index.js +4 -4
  51. package/lib/solana/builtin/index.js +4 -4
  52. package/lib/solana/index.js +4 -4
  53. package/lib/store/index.js +3 -3
  54. package/lib/sui/builtin/0x1.js +12 -12
  55. package/lib/sui/builtin/0x2.js +13 -13
  56. package/lib/sui/builtin/0x3.js +14 -14
  57. package/lib/sui/builtin/index.js +14 -14
  58. package/lib/sui/codegen/index.js +2 -2
  59. package/lib/sui/ext/index.js +10 -10
  60. package/lib/sui/index.js +11 -11
  61. package/lib/testing/index.js +14 -14
  62. package/lib/utils/index.js +7 -7
  63. package/lib/{weth9-08664cb7.d.ts → weth9-2b52cb06.d.ts} +40 -12
  64. package/package.json +1 -1
  65. package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +1446 -115
  66. package/src/eth/builtin/internal/erc1155-processor.ts +611 -34
  67. package/src/eth/builtin/internal/erc20-processor.ts +1182 -84
  68. package/src/eth/builtin/internal/erc20bytes-processor.ts +595 -45
  69. package/src/eth/builtin/internal/erc721-processor.ts +967 -64
  70. package/src/eth/builtin/internal/weth9-processor.ts +698 -55
  71. package/src/eth/codegen/file.ts +26 -3
  72. package/src/eth/codegen/function-calls.ts +93 -8
  73. package/src/eth/codegen/types.ts +22 -1
  74. package/src/eth/eth-plugin.ts +4 -4
  75. package/src/eth/index.ts +2 -0
  76. package/lib/chunk-76HTCT5F.js +0 -469
  77. package/lib/chunk-ERTIHPSD.js +0 -528
  78. package/lib/chunk-LWKILLQ6.js +0 -820
  79. package/lib/chunk-S36AAZOU.js +0 -417
@@ -0,0 +1,1910 @@
1
+ import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
+ import {
3
+ BaseProcessor,
4
+ BaseProcessorTemplate,
5
+ BoundContractView,
6
+ ContractView,
7
+ DummyProvider,
8
+ EACAggregatorProxy__factory,
9
+ Interface,
10
+ addContractByABI,
11
+ addProcessor,
12
+ getContractByABI,
13
+ getProcessor,
14
+ getProvider,
15
+ import_chain,
16
+ transformEtherError
17
+ } from "./chunk-RXO7SOTL.js";
18
+ import {
19
+ makeEthCallKey
20
+ } from "./chunk-Z5PQR6UE.js";
21
+ import {
22
+ __export,
23
+ __publicField
24
+ } from "./chunk-AXRHIURD.js";
25
+
26
+ // src/eth/builtin/eacaggregatorproxy.ts
27
+ var eacaggregatorproxy_exports = {};
28
+ __export(eacaggregatorproxy_exports, {
29
+ EACAggregatorProxyBoundContractView: () => EACAggregatorProxyBoundContractView,
30
+ EACAggregatorProxyContractView: () => EACAggregatorProxyContractView,
31
+ EACAggregatorProxyProcessor: () => EACAggregatorProxyProcessor,
32
+ EACAggregatorProxyProcessorTemplate: () => EACAggregatorProxyProcessorTemplate,
33
+ EACAggregatorProxy__factory: () => EACAggregatorProxy__factory,
34
+ getEACAggregatorProxyContract: () => getEACAggregatorProxyContract,
35
+ getEACAggregatorProxyContractOnContext: () => getEACAggregatorProxyContractOnContext,
36
+ mockAnswerUpdatedLog: () => mockAnswerUpdatedLog,
37
+ mockNewRoundLog: () => mockNewRoundLog,
38
+ mockOwnershipTransferRequestedLog: () => mockOwnershipTransferRequestedLog,
39
+ mockOwnershipTransferredLog: () => mockOwnershipTransferredLog
40
+ });
41
+
42
+ // src/eth/builtin/internal/eacaggregatorproxy-processor.ts
43
+ var templateContract = EACAggregatorProxy__factory.connect(
44
+ "0x0",
45
+ DummyProvider
46
+ );
47
+ var EACAggregatorProxyContractView = class extends ContractView {
48
+ constructor(contract) {
49
+ super(contract);
50
+ this.callStatic.contract = contract;
51
+ }
52
+ async accessController(overrides, preparedData, ethCallContext) {
53
+ try {
54
+ if (preparedData?.ethCallResults && ethCallContext) {
55
+ const iface = new Interface([
56
+ "function accessController() view returns (address)"
57
+ ]);
58
+ const calldata = iface.encodeFunctionData("accessController", []);
59
+ const key = makeEthCallKey({
60
+ context: ethCallContext,
61
+ calldata
62
+ });
63
+ const ret = preparedData.ethCallResults[key];
64
+ if (ret) {
65
+ const result = iface.decodeFunctionResult("accessController", ret).toArray();
66
+ return result.length == 1 ? result[0] : result;
67
+ }
68
+ }
69
+ return await this.contract.getFunction("accessController()")(
70
+ overrides || {}
71
+ );
72
+ } catch (e) {
73
+ const stack = new Error().stack;
74
+ throw transformEtherError(e, void 0, stack);
75
+ }
76
+ }
77
+ async aggregator(overrides, preparedData, ethCallContext) {
78
+ try {
79
+ if (preparedData?.ethCallResults && ethCallContext) {
80
+ const iface = new Interface([
81
+ "function aggregator() view returns (address)"
82
+ ]);
83
+ const calldata = iface.encodeFunctionData("aggregator", []);
84
+ const key = makeEthCallKey({
85
+ context: ethCallContext,
86
+ calldata
87
+ });
88
+ const ret = preparedData.ethCallResults[key];
89
+ if (ret) {
90
+ const result = iface.decodeFunctionResult("aggregator", ret).toArray();
91
+ return result.length == 1 ? result[0] : result;
92
+ }
93
+ }
94
+ return await this.contract.getFunction("aggregator()")(overrides || {});
95
+ } catch (e) {
96
+ const stack = new Error().stack;
97
+ throw transformEtherError(e, void 0, stack);
98
+ }
99
+ }
100
+ async decimals(overrides, preparedData, ethCallContext) {
101
+ try {
102
+ if (preparedData?.ethCallResults && ethCallContext) {
103
+ const iface = new Interface([
104
+ "function decimals() view returns (uint8)"
105
+ ]);
106
+ const calldata = iface.encodeFunctionData("decimals", []);
107
+ const key = makeEthCallKey({
108
+ context: ethCallContext,
109
+ calldata
110
+ });
111
+ const ret = preparedData.ethCallResults[key];
112
+ if (ret) {
113
+ const result = iface.decodeFunctionResult("decimals", ret).toArray();
114
+ return result.length == 1 ? result[0] : result;
115
+ }
116
+ }
117
+ return await this.contract.getFunction("decimals()")(overrides || {});
118
+ } catch (e) {
119
+ const stack = new Error().stack;
120
+ throw transformEtherError(e, void 0, stack);
121
+ }
122
+ }
123
+ async description(overrides, preparedData, ethCallContext) {
124
+ try {
125
+ if (preparedData?.ethCallResults && ethCallContext) {
126
+ const iface = new Interface([
127
+ "function description() view returns (string)"
128
+ ]);
129
+ const calldata = iface.encodeFunctionData("description", []);
130
+ const key = makeEthCallKey({
131
+ context: ethCallContext,
132
+ calldata
133
+ });
134
+ const ret = preparedData.ethCallResults[key];
135
+ if (ret) {
136
+ const result = iface.decodeFunctionResult("description", ret).toArray();
137
+ return result.length == 1 ? result[0] : result;
138
+ }
139
+ }
140
+ return await this.contract.getFunction("description()")(overrides || {});
141
+ } catch (e) {
142
+ const stack = new Error().stack;
143
+ throw transformEtherError(e, void 0, stack);
144
+ }
145
+ }
146
+ async getAnswer(_roundId, overrides, preparedData, ethCallContext) {
147
+ try {
148
+ if (preparedData?.ethCallResults && ethCallContext) {
149
+ const iface = new Interface([
150
+ "function getAnswer(uint256) view returns (int256)"
151
+ ]);
152
+ const calldata = iface.encodeFunctionData("getAnswer", [_roundId]);
153
+ const key = makeEthCallKey({
154
+ context: ethCallContext,
155
+ calldata
156
+ });
157
+ const ret = preparedData.ethCallResults[key];
158
+ if (ret) {
159
+ const result = iface.decodeFunctionResult("getAnswer", ret).toArray();
160
+ return result.length == 1 ? result[0] : result;
161
+ }
162
+ }
163
+ return await this.contract.getFunction("getAnswer(uint256)")(
164
+ _roundId,
165
+ overrides || {}
166
+ );
167
+ } catch (e) {
168
+ const stack = new Error().stack;
169
+ throw transformEtherError(e, void 0, stack);
170
+ }
171
+ }
172
+ async getRoundData(_roundId, overrides, preparedData, ethCallContext) {
173
+ try {
174
+ if (preparedData?.ethCallResults && ethCallContext) {
175
+ const iface = new Interface([
176
+ "function getRoundData(uint80) view returns (uint80,int256,uint256,uint256,uint80)"
177
+ ]);
178
+ const calldata = iface.encodeFunctionData("getRoundData", [_roundId]);
179
+ const key = makeEthCallKey({
180
+ context: ethCallContext,
181
+ calldata
182
+ });
183
+ const ret = preparedData.ethCallResults[key];
184
+ if (ret) {
185
+ const result = iface.decodeFunctionResult("getRoundData", ret).toArray();
186
+ return result.length == 1 ? result[0] : result;
187
+ }
188
+ }
189
+ return await this.contract.getFunction("getRoundData(uint80)")(
190
+ _roundId,
191
+ overrides || {}
192
+ );
193
+ } catch (e) {
194
+ const stack = new Error().stack;
195
+ throw transformEtherError(e, void 0, stack);
196
+ }
197
+ }
198
+ async getTimestamp(_roundId, overrides, preparedData, ethCallContext) {
199
+ try {
200
+ if (preparedData?.ethCallResults && ethCallContext) {
201
+ const iface = new Interface([
202
+ "function getTimestamp(uint256) view returns (uint256)"
203
+ ]);
204
+ const calldata = iface.encodeFunctionData("getTimestamp", [_roundId]);
205
+ const key = makeEthCallKey({
206
+ context: ethCallContext,
207
+ calldata
208
+ });
209
+ const ret = preparedData.ethCallResults[key];
210
+ if (ret) {
211
+ const result = iface.decodeFunctionResult("getTimestamp", ret).toArray();
212
+ return result.length == 1 ? result[0] : result;
213
+ }
214
+ }
215
+ return await this.contract.getFunction("getTimestamp(uint256)")(
216
+ _roundId,
217
+ overrides || {}
218
+ );
219
+ } catch (e) {
220
+ const stack = new Error().stack;
221
+ throw transformEtherError(e, void 0, stack);
222
+ }
223
+ }
224
+ async latestAnswer(overrides, preparedData, ethCallContext) {
225
+ try {
226
+ if (preparedData?.ethCallResults && ethCallContext) {
227
+ const iface = new Interface([
228
+ "function latestAnswer() view returns (int256)"
229
+ ]);
230
+ const calldata = iface.encodeFunctionData("latestAnswer", []);
231
+ const key = makeEthCallKey({
232
+ context: ethCallContext,
233
+ calldata
234
+ });
235
+ const ret = preparedData.ethCallResults[key];
236
+ if (ret) {
237
+ const result = iface.decodeFunctionResult("latestAnswer", ret).toArray();
238
+ return result.length == 1 ? result[0] : result;
239
+ }
240
+ }
241
+ return await this.contract.getFunction("latestAnswer()")(overrides || {});
242
+ } catch (e) {
243
+ const stack = new Error().stack;
244
+ throw transformEtherError(e, void 0, stack);
245
+ }
246
+ }
247
+ async latestRound(overrides, preparedData, ethCallContext) {
248
+ try {
249
+ if (preparedData?.ethCallResults && ethCallContext) {
250
+ const iface = new Interface([
251
+ "function latestRound() view returns (uint256)"
252
+ ]);
253
+ const calldata = iface.encodeFunctionData("latestRound", []);
254
+ const key = makeEthCallKey({
255
+ context: ethCallContext,
256
+ calldata
257
+ });
258
+ const ret = preparedData.ethCallResults[key];
259
+ if (ret) {
260
+ const result = iface.decodeFunctionResult("latestRound", ret).toArray();
261
+ return result.length == 1 ? result[0] : result;
262
+ }
263
+ }
264
+ return await this.contract.getFunction("latestRound()")(overrides || {});
265
+ } catch (e) {
266
+ const stack = new Error().stack;
267
+ throw transformEtherError(e, void 0, stack);
268
+ }
269
+ }
270
+ async latestRoundData(overrides, preparedData, ethCallContext) {
271
+ try {
272
+ if (preparedData?.ethCallResults && ethCallContext) {
273
+ const iface = new Interface([
274
+ "function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)"
275
+ ]);
276
+ const calldata = iface.encodeFunctionData("latestRoundData", []);
277
+ const key = makeEthCallKey({
278
+ context: ethCallContext,
279
+ calldata
280
+ });
281
+ const ret = preparedData.ethCallResults[key];
282
+ if (ret) {
283
+ const result = iface.decodeFunctionResult("latestRoundData", ret).toArray();
284
+ return result.length == 1 ? result[0] : result;
285
+ }
286
+ }
287
+ return await this.contract.getFunction("latestRoundData()")(
288
+ overrides || {}
289
+ );
290
+ } catch (e) {
291
+ const stack = new Error().stack;
292
+ throw transformEtherError(e, void 0, stack);
293
+ }
294
+ }
295
+ async latestTimestamp(overrides, preparedData, ethCallContext) {
296
+ try {
297
+ if (preparedData?.ethCallResults && ethCallContext) {
298
+ const iface = new Interface([
299
+ "function latestTimestamp() view returns (uint256)"
300
+ ]);
301
+ const calldata = iface.encodeFunctionData("latestTimestamp", []);
302
+ const key = makeEthCallKey({
303
+ context: ethCallContext,
304
+ calldata
305
+ });
306
+ const ret = preparedData.ethCallResults[key];
307
+ if (ret) {
308
+ const result = iface.decodeFunctionResult("latestTimestamp", ret).toArray();
309
+ return result.length == 1 ? result[0] : result;
310
+ }
311
+ }
312
+ return await this.contract.getFunction("latestTimestamp()")(
313
+ overrides || {}
314
+ );
315
+ } catch (e) {
316
+ const stack = new Error().stack;
317
+ throw transformEtherError(e, void 0, stack);
318
+ }
319
+ }
320
+ async owner(overrides, preparedData, ethCallContext) {
321
+ try {
322
+ if (preparedData?.ethCallResults && ethCallContext) {
323
+ const iface = new Interface([
324
+ "function owner() view returns (address)"
325
+ ]);
326
+ const calldata = iface.encodeFunctionData("owner", []);
327
+ const key = makeEthCallKey({
328
+ context: ethCallContext,
329
+ calldata
330
+ });
331
+ const ret = preparedData.ethCallResults[key];
332
+ if (ret) {
333
+ const result = iface.decodeFunctionResult("owner", ret).toArray();
334
+ return result.length == 1 ? result[0] : result;
335
+ }
336
+ }
337
+ return await this.contract.getFunction("owner()")(overrides || {});
338
+ } catch (e) {
339
+ const stack = new Error().stack;
340
+ throw transformEtherError(e, void 0, stack);
341
+ }
342
+ }
343
+ async phaseAggregators(arg0, overrides, preparedData, ethCallContext) {
344
+ try {
345
+ if (preparedData?.ethCallResults && ethCallContext) {
346
+ const iface = new Interface([
347
+ "function phaseAggregators(uint16) view returns (address)"
348
+ ]);
349
+ const calldata = iface.encodeFunctionData("phaseAggregators", [arg0]);
350
+ const key = makeEthCallKey({
351
+ context: ethCallContext,
352
+ calldata
353
+ });
354
+ const ret = preparedData.ethCallResults[key];
355
+ if (ret) {
356
+ const result = iface.decodeFunctionResult("phaseAggregators", ret).toArray();
357
+ return result.length == 1 ? result[0] : result;
358
+ }
359
+ }
360
+ return await this.contract.getFunction("phaseAggregators(uint16)")(
361
+ arg0,
362
+ overrides || {}
363
+ );
364
+ } catch (e) {
365
+ const stack = new Error().stack;
366
+ throw transformEtherError(e, void 0, stack);
367
+ }
368
+ }
369
+ async phaseId(overrides, preparedData, ethCallContext) {
370
+ try {
371
+ if (preparedData?.ethCallResults && ethCallContext) {
372
+ const iface = new Interface([
373
+ "function phaseId() view returns (uint16)"
374
+ ]);
375
+ const calldata = iface.encodeFunctionData("phaseId", []);
376
+ const key = makeEthCallKey({
377
+ context: ethCallContext,
378
+ calldata
379
+ });
380
+ const ret = preparedData.ethCallResults[key];
381
+ if (ret) {
382
+ const result = iface.decodeFunctionResult("phaseId", ret).toArray();
383
+ return result.length == 1 ? result[0] : result;
384
+ }
385
+ }
386
+ return await this.contract.getFunction("phaseId()")(overrides || {});
387
+ } catch (e) {
388
+ const stack = new Error().stack;
389
+ throw transformEtherError(e, void 0, stack);
390
+ }
391
+ }
392
+ async proposedAggregator(overrides, preparedData, ethCallContext) {
393
+ try {
394
+ if (preparedData?.ethCallResults && ethCallContext) {
395
+ const iface = new Interface([
396
+ "function proposedAggregator() view returns (address)"
397
+ ]);
398
+ const calldata = iface.encodeFunctionData("proposedAggregator", []);
399
+ const key = makeEthCallKey({
400
+ context: ethCallContext,
401
+ calldata
402
+ });
403
+ const ret = preparedData.ethCallResults[key];
404
+ if (ret) {
405
+ const result = iface.decodeFunctionResult("proposedAggregator", ret).toArray();
406
+ return result.length == 1 ? result[0] : result;
407
+ }
408
+ }
409
+ return await this.contract.getFunction("proposedAggregator()")(
410
+ overrides || {}
411
+ );
412
+ } catch (e) {
413
+ const stack = new Error().stack;
414
+ throw transformEtherError(e, void 0, stack);
415
+ }
416
+ }
417
+ async proposedGetRoundData(_roundId, overrides, preparedData, ethCallContext) {
418
+ try {
419
+ if (preparedData?.ethCallResults && ethCallContext) {
420
+ const iface = new Interface([
421
+ "function proposedGetRoundData(uint80) view returns (uint80,int256,uint256,uint256,uint80)"
422
+ ]);
423
+ const calldata = iface.encodeFunctionData("proposedGetRoundData", [
424
+ _roundId
425
+ ]);
426
+ const key = makeEthCallKey({
427
+ context: ethCallContext,
428
+ calldata
429
+ });
430
+ const ret = preparedData.ethCallResults[key];
431
+ if (ret) {
432
+ const result = iface.decodeFunctionResult("proposedGetRoundData", ret).toArray();
433
+ return result.length == 1 ? result[0] : result;
434
+ }
435
+ }
436
+ return await this.contract.getFunction("proposedGetRoundData(uint80)")(
437
+ _roundId,
438
+ overrides || {}
439
+ );
440
+ } catch (e) {
441
+ const stack = new Error().stack;
442
+ throw transformEtherError(e, void 0, stack);
443
+ }
444
+ }
445
+ async proposedLatestRoundData(overrides, preparedData, ethCallContext) {
446
+ try {
447
+ if (preparedData?.ethCallResults && ethCallContext) {
448
+ const iface = new Interface([
449
+ "function proposedLatestRoundData() view returns (uint80,int256,uint256,uint256,uint80)"
450
+ ]);
451
+ const calldata = iface.encodeFunctionData(
452
+ "proposedLatestRoundData",
453
+ []
454
+ );
455
+ const key = makeEthCallKey({
456
+ context: ethCallContext,
457
+ calldata
458
+ });
459
+ const ret = preparedData.ethCallResults[key];
460
+ if (ret) {
461
+ const result = iface.decodeFunctionResult("proposedLatestRoundData", ret).toArray();
462
+ return result.length == 1 ? result[0] : result;
463
+ }
464
+ }
465
+ return await this.contract.getFunction("proposedLatestRoundData()")(
466
+ overrides || {}
467
+ );
468
+ } catch (e) {
469
+ const stack = new Error().stack;
470
+ throw transformEtherError(e, void 0, stack);
471
+ }
472
+ }
473
+ async version(overrides, preparedData, ethCallContext) {
474
+ try {
475
+ if (preparedData?.ethCallResults && ethCallContext) {
476
+ const iface = new Interface([
477
+ "function version() view returns (uint256)"
478
+ ]);
479
+ const calldata = iface.encodeFunctionData("version", []);
480
+ const key = makeEthCallKey({
481
+ context: ethCallContext,
482
+ calldata
483
+ });
484
+ const ret = preparedData.ethCallResults[key];
485
+ if (ret) {
486
+ const result = iface.decodeFunctionResult("version", ret).toArray();
487
+ return result.length == 1 ? result[0] : result;
488
+ }
489
+ }
490
+ return await this.contract.getFunction("version()")(overrides || {});
491
+ } catch (e) {
492
+ const stack = new Error().stack;
493
+ throw transformEtherError(e, void 0, stack);
494
+ }
495
+ }
496
+ callStatic = {
497
+ contract: this.contract,
498
+ async acceptOwnership(overrides, preparedData, ethCallContext) {
499
+ try {
500
+ if (preparedData?.ethCallResults && ethCallContext) {
501
+ const iface = new Interface([
502
+ "function acceptOwnership() nonpayable returns ()"
503
+ ]);
504
+ const calldata = iface.encodeFunctionData("acceptOwnership", []);
505
+ const key = makeEthCallKey({
506
+ context: ethCallContext,
507
+ calldata
508
+ });
509
+ const ret = preparedData.ethCallResults[key];
510
+ if (ret) {
511
+ const result = iface.decodeFunctionResult("acceptOwnership", ret).toArray();
512
+ return result.length == 1 ? result[0] : result;
513
+ }
514
+ }
515
+ return await this.contract.getFunction("acceptOwnership()").staticCall(overrides || {});
516
+ } catch (e) {
517
+ const stack = new Error().stack;
518
+ throw transformEtherError(e, void 0, stack);
519
+ }
520
+ },
521
+ async confirmAggregator(_aggregator, overrides, preparedData, ethCallContext) {
522
+ try {
523
+ if (preparedData?.ethCallResults && ethCallContext) {
524
+ const iface = new Interface([
525
+ "function confirmAggregator(address) nonpayable returns ()"
526
+ ]);
527
+ const calldata = iface.encodeFunctionData("confirmAggregator", [
528
+ _aggregator
529
+ ]);
530
+ const key = makeEthCallKey({
531
+ context: ethCallContext,
532
+ calldata
533
+ });
534
+ const ret = preparedData.ethCallResults[key];
535
+ if (ret) {
536
+ const result = iface.decodeFunctionResult("confirmAggregator", ret).toArray();
537
+ return result.length == 1 ? result[0] : result;
538
+ }
539
+ }
540
+ return await this.contract.getFunction("confirmAggregator(address)").staticCall(_aggregator, overrides || {});
541
+ } catch (e) {
542
+ const stack = new Error().stack;
543
+ throw transformEtherError(e, void 0, stack);
544
+ }
545
+ },
546
+ async proposeAggregator(_aggregator, overrides, preparedData, ethCallContext) {
547
+ try {
548
+ if (preparedData?.ethCallResults && ethCallContext) {
549
+ const iface = new Interface([
550
+ "function proposeAggregator(address) nonpayable returns ()"
551
+ ]);
552
+ const calldata = iface.encodeFunctionData("proposeAggregator", [
553
+ _aggregator
554
+ ]);
555
+ const key = makeEthCallKey({
556
+ context: ethCallContext,
557
+ calldata
558
+ });
559
+ const ret = preparedData.ethCallResults[key];
560
+ if (ret) {
561
+ const result = iface.decodeFunctionResult("proposeAggregator", ret).toArray();
562
+ return result.length == 1 ? result[0] : result;
563
+ }
564
+ }
565
+ return await this.contract.getFunction("proposeAggregator(address)").staticCall(_aggregator, overrides || {});
566
+ } catch (e) {
567
+ const stack = new Error().stack;
568
+ throw transformEtherError(e, void 0, stack);
569
+ }
570
+ },
571
+ async setController(_accessController, overrides, preparedData, ethCallContext) {
572
+ try {
573
+ if (preparedData?.ethCallResults && ethCallContext) {
574
+ const iface = new Interface([
575
+ "function setController(address) nonpayable returns ()"
576
+ ]);
577
+ const calldata = iface.encodeFunctionData("setController", [
578
+ _accessController
579
+ ]);
580
+ const key = makeEthCallKey({
581
+ context: ethCallContext,
582
+ calldata
583
+ });
584
+ const ret = preparedData.ethCallResults[key];
585
+ if (ret) {
586
+ const result = iface.decodeFunctionResult("setController", ret).toArray();
587
+ return result.length == 1 ? result[0] : result;
588
+ }
589
+ }
590
+ return await this.contract.getFunction("setController(address)").staticCall(_accessController, overrides || {});
591
+ } catch (e) {
592
+ const stack = new Error().stack;
593
+ throw transformEtherError(e, void 0, stack);
594
+ }
595
+ },
596
+ async transferOwnership(_to, overrides, preparedData, ethCallContext) {
597
+ try {
598
+ if (preparedData?.ethCallResults && ethCallContext) {
599
+ const iface = new Interface([
600
+ "function transferOwnership(address) nonpayable returns ()"
601
+ ]);
602
+ const calldata = iface.encodeFunctionData("transferOwnership", [_to]);
603
+ const key = makeEthCallKey({
604
+ context: ethCallContext,
605
+ calldata
606
+ });
607
+ const ret = preparedData.ethCallResults[key];
608
+ if (ret) {
609
+ const result = iface.decodeFunctionResult("transferOwnership", ret).toArray();
610
+ return result.length == 1 ? result[0] : result;
611
+ }
612
+ }
613
+ return await this.contract.getFunction("transferOwnership(address)").staticCall(_to, overrides || {});
614
+ } catch (e) {
615
+ const stack = new Error().stack;
616
+ throw transformEtherError(e, void 0, stack);
617
+ }
618
+ }
619
+ };
620
+ encodeCall = {
621
+ acceptOwnership(ethCallContext) {
622
+ try {
623
+ const iface = new Interface(["function acceptOwnership()"]);
624
+ const calldata = iface.encodeFunctionData("acceptOwnership", []);
625
+ return {
626
+ context: ethCallContext,
627
+ calldata
628
+ };
629
+ } catch (e) {
630
+ const stack = new Error().stack;
631
+ throw transformEtherError(e, void 0, stack);
632
+ }
633
+ },
634
+ accessController(ethCallContext) {
635
+ try {
636
+ const iface = new Interface(["function accessController()"]);
637
+ const calldata = iface.encodeFunctionData("accessController", []);
638
+ return {
639
+ context: ethCallContext,
640
+ calldata
641
+ };
642
+ } catch (e) {
643
+ const stack = new Error().stack;
644
+ throw transformEtherError(e, void 0, stack);
645
+ }
646
+ },
647
+ aggregator(ethCallContext) {
648
+ try {
649
+ const iface = new Interface(["function aggregator()"]);
650
+ const calldata = iface.encodeFunctionData("aggregator", []);
651
+ return {
652
+ context: ethCallContext,
653
+ calldata
654
+ };
655
+ } catch (e) {
656
+ const stack = new Error().stack;
657
+ throw transformEtherError(e, void 0, stack);
658
+ }
659
+ },
660
+ confirmAggregator(_aggregator, ethCallContext) {
661
+ try {
662
+ const iface = new Interface(["function confirmAggregator(address)"]);
663
+ const calldata = iface.encodeFunctionData("confirmAggregator", [
664
+ _aggregator
665
+ ]);
666
+ return {
667
+ context: ethCallContext,
668
+ calldata
669
+ };
670
+ } catch (e) {
671
+ const stack = new Error().stack;
672
+ throw transformEtherError(e, void 0, stack);
673
+ }
674
+ },
675
+ decimals(ethCallContext) {
676
+ try {
677
+ const iface = new Interface(["function decimals()"]);
678
+ const calldata = iface.encodeFunctionData("decimals", []);
679
+ return {
680
+ context: ethCallContext,
681
+ calldata
682
+ };
683
+ } catch (e) {
684
+ const stack = new Error().stack;
685
+ throw transformEtherError(e, void 0, stack);
686
+ }
687
+ },
688
+ description(ethCallContext) {
689
+ try {
690
+ const iface = new Interface(["function description()"]);
691
+ const calldata = iface.encodeFunctionData("description", []);
692
+ return {
693
+ context: ethCallContext,
694
+ calldata
695
+ };
696
+ } catch (e) {
697
+ const stack = new Error().stack;
698
+ throw transformEtherError(e, void 0, stack);
699
+ }
700
+ },
701
+ getAnswer(_roundId, ethCallContext) {
702
+ try {
703
+ const iface = new Interface(["function getAnswer(uint256)"]);
704
+ const calldata = iface.encodeFunctionData("getAnswer", [_roundId]);
705
+ return {
706
+ context: ethCallContext,
707
+ calldata
708
+ };
709
+ } catch (e) {
710
+ const stack = new Error().stack;
711
+ throw transformEtherError(e, void 0, stack);
712
+ }
713
+ },
714
+ getRoundData(_roundId, ethCallContext) {
715
+ try {
716
+ const iface = new Interface(["function getRoundData(uint80)"]);
717
+ const calldata = iface.encodeFunctionData("getRoundData", [_roundId]);
718
+ return {
719
+ context: ethCallContext,
720
+ calldata
721
+ };
722
+ } catch (e) {
723
+ const stack = new Error().stack;
724
+ throw transformEtherError(e, void 0, stack);
725
+ }
726
+ },
727
+ getTimestamp(_roundId, ethCallContext) {
728
+ try {
729
+ const iface = new Interface(["function getTimestamp(uint256)"]);
730
+ const calldata = iface.encodeFunctionData("getTimestamp", [_roundId]);
731
+ return {
732
+ context: ethCallContext,
733
+ calldata
734
+ };
735
+ } catch (e) {
736
+ const stack = new Error().stack;
737
+ throw transformEtherError(e, void 0, stack);
738
+ }
739
+ },
740
+ latestAnswer(ethCallContext) {
741
+ try {
742
+ const iface = new Interface(["function latestAnswer()"]);
743
+ const calldata = iface.encodeFunctionData("latestAnswer", []);
744
+ return {
745
+ context: ethCallContext,
746
+ calldata
747
+ };
748
+ } catch (e) {
749
+ const stack = new Error().stack;
750
+ throw transformEtherError(e, void 0, stack);
751
+ }
752
+ },
753
+ latestRound(ethCallContext) {
754
+ try {
755
+ const iface = new Interface(["function latestRound()"]);
756
+ const calldata = iface.encodeFunctionData("latestRound", []);
757
+ return {
758
+ context: ethCallContext,
759
+ calldata
760
+ };
761
+ } catch (e) {
762
+ const stack = new Error().stack;
763
+ throw transformEtherError(e, void 0, stack);
764
+ }
765
+ },
766
+ latestRoundData(ethCallContext) {
767
+ try {
768
+ const iface = new Interface(["function latestRoundData()"]);
769
+ const calldata = iface.encodeFunctionData("latestRoundData", []);
770
+ return {
771
+ context: ethCallContext,
772
+ calldata
773
+ };
774
+ } catch (e) {
775
+ const stack = new Error().stack;
776
+ throw transformEtherError(e, void 0, stack);
777
+ }
778
+ },
779
+ latestTimestamp(ethCallContext) {
780
+ try {
781
+ const iface = new Interface(["function latestTimestamp()"]);
782
+ const calldata = iface.encodeFunctionData("latestTimestamp", []);
783
+ return {
784
+ context: ethCallContext,
785
+ calldata
786
+ };
787
+ } catch (e) {
788
+ const stack = new Error().stack;
789
+ throw transformEtherError(e, void 0, stack);
790
+ }
791
+ },
792
+ owner(ethCallContext) {
793
+ try {
794
+ const iface = new Interface(["function owner()"]);
795
+ const calldata = iface.encodeFunctionData("owner", []);
796
+ return {
797
+ context: ethCallContext,
798
+ calldata
799
+ };
800
+ } catch (e) {
801
+ const stack = new Error().stack;
802
+ throw transformEtherError(e, void 0, stack);
803
+ }
804
+ },
805
+ phaseAggregators(arg0, ethCallContext) {
806
+ try {
807
+ const iface = new Interface(["function phaseAggregators(uint16)"]);
808
+ const calldata = iface.encodeFunctionData("phaseAggregators", [arg0]);
809
+ return {
810
+ context: ethCallContext,
811
+ calldata
812
+ };
813
+ } catch (e) {
814
+ const stack = new Error().stack;
815
+ throw transformEtherError(e, void 0, stack);
816
+ }
817
+ },
818
+ phaseId(ethCallContext) {
819
+ try {
820
+ const iface = new Interface(["function phaseId()"]);
821
+ const calldata = iface.encodeFunctionData("phaseId", []);
822
+ return {
823
+ context: ethCallContext,
824
+ calldata
825
+ };
826
+ } catch (e) {
827
+ const stack = new Error().stack;
828
+ throw transformEtherError(e, void 0, stack);
829
+ }
830
+ },
831
+ proposeAggregator(_aggregator, ethCallContext) {
832
+ try {
833
+ const iface = new Interface(["function proposeAggregator(address)"]);
834
+ const calldata = iface.encodeFunctionData("proposeAggregator", [
835
+ _aggregator
836
+ ]);
837
+ return {
838
+ context: ethCallContext,
839
+ calldata
840
+ };
841
+ } catch (e) {
842
+ const stack = new Error().stack;
843
+ throw transformEtherError(e, void 0, stack);
844
+ }
845
+ },
846
+ proposedAggregator(ethCallContext) {
847
+ try {
848
+ const iface = new Interface(["function proposedAggregator()"]);
849
+ const calldata = iface.encodeFunctionData("proposedAggregator", []);
850
+ return {
851
+ context: ethCallContext,
852
+ calldata
853
+ };
854
+ } catch (e) {
855
+ const stack = new Error().stack;
856
+ throw transformEtherError(e, void 0, stack);
857
+ }
858
+ },
859
+ proposedGetRoundData(_roundId, ethCallContext) {
860
+ try {
861
+ const iface = new Interface(["function proposedGetRoundData(uint80)"]);
862
+ const calldata = iface.encodeFunctionData("proposedGetRoundData", [
863
+ _roundId
864
+ ]);
865
+ return {
866
+ context: ethCallContext,
867
+ calldata
868
+ };
869
+ } catch (e) {
870
+ const stack = new Error().stack;
871
+ throw transformEtherError(e, void 0, stack);
872
+ }
873
+ },
874
+ proposedLatestRoundData(ethCallContext) {
875
+ try {
876
+ const iface = new Interface(["function proposedLatestRoundData()"]);
877
+ const calldata = iface.encodeFunctionData(
878
+ "proposedLatestRoundData",
879
+ []
880
+ );
881
+ return {
882
+ context: ethCallContext,
883
+ calldata
884
+ };
885
+ } catch (e) {
886
+ const stack = new Error().stack;
887
+ throw transformEtherError(e, void 0, stack);
888
+ }
889
+ },
890
+ setController(_accessController, ethCallContext) {
891
+ try {
892
+ const iface = new Interface(["function setController(address)"]);
893
+ const calldata = iface.encodeFunctionData("setController", [
894
+ _accessController
895
+ ]);
896
+ return {
897
+ context: ethCallContext,
898
+ calldata
899
+ };
900
+ } catch (e) {
901
+ const stack = new Error().stack;
902
+ throw transformEtherError(e, void 0, stack);
903
+ }
904
+ },
905
+ transferOwnership(_to, ethCallContext) {
906
+ try {
907
+ const iface = new Interface(["function transferOwnership(address)"]);
908
+ const calldata = iface.encodeFunctionData("transferOwnership", [_to]);
909
+ return {
910
+ context: ethCallContext,
911
+ calldata
912
+ };
913
+ } catch (e) {
914
+ const stack = new Error().stack;
915
+ throw transformEtherError(e, void 0, stack);
916
+ }
917
+ },
918
+ version(ethCallContext) {
919
+ try {
920
+ const iface = new Interface(["function version()"]);
921
+ const calldata = iface.encodeFunctionData("version", []);
922
+ return {
923
+ context: ethCallContext,
924
+ calldata
925
+ };
926
+ } catch (e) {
927
+ const stack = new Error().stack;
928
+ throw transformEtherError(e, void 0, stack);
929
+ }
930
+ }
931
+ };
932
+ };
933
+ var EACAggregatorProxyBoundContractView = class extends BoundContractView {
934
+ async accessController(overrides) {
935
+ const ethCallContext = {
936
+ chainId: this.context.chainId,
937
+ blockTag: this.context.blockNumber.toString(16),
938
+ address: this.context.address
939
+ };
940
+ return await this.view.accessController(
941
+ {
942
+ blockTag: this.context.blockNumber,
943
+ ...overrides
944
+ },
945
+ this.context.preparedData,
946
+ ethCallContext
947
+ );
948
+ }
949
+ async aggregator(overrides) {
950
+ const ethCallContext = {
951
+ chainId: this.context.chainId,
952
+ blockTag: this.context.blockNumber.toString(16),
953
+ address: this.context.address
954
+ };
955
+ return await this.view.aggregator(
956
+ {
957
+ blockTag: this.context.blockNumber,
958
+ ...overrides
959
+ },
960
+ this.context.preparedData,
961
+ ethCallContext
962
+ );
963
+ }
964
+ async decimals(overrides) {
965
+ const ethCallContext = {
966
+ chainId: this.context.chainId,
967
+ blockTag: this.context.blockNumber.toString(16),
968
+ address: this.context.address
969
+ };
970
+ return await this.view.decimals(
971
+ {
972
+ blockTag: this.context.blockNumber,
973
+ ...overrides
974
+ },
975
+ this.context.preparedData,
976
+ ethCallContext
977
+ );
978
+ }
979
+ async description(overrides) {
980
+ const ethCallContext = {
981
+ chainId: this.context.chainId,
982
+ blockTag: this.context.blockNumber.toString(16),
983
+ address: this.context.address
984
+ };
985
+ return await this.view.description(
986
+ {
987
+ blockTag: this.context.blockNumber,
988
+ ...overrides
989
+ },
990
+ this.context.preparedData,
991
+ ethCallContext
992
+ );
993
+ }
994
+ async getAnswer(_roundId, overrides) {
995
+ const ethCallContext = {
996
+ chainId: this.context.chainId,
997
+ blockTag: this.context.blockNumber.toString(16),
998
+ address: this.context.address
999
+ };
1000
+ return await this.view.getAnswer(
1001
+ _roundId,
1002
+ {
1003
+ blockTag: this.context.blockNumber,
1004
+ ...overrides
1005
+ },
1006
+ this.context.preparedData,
1007
+ ethCallContext
1008
+ );
1009
+ }
1010
+ async getRoundData(_roundId, overrides) {
1011
+ const ethCallContext = {
1012
+ chainId: this.context.chainId,
1013
+ blockTag: this.context.blockNumber.toString(16),
1014
+ address: this.context.address
1015
+ };
1016
+ return await this.view.getRoundData(
1017
+ _roundId,
1018
+ {
1019
+ blockTag: this.context.blockNumber,
1020
+ ...overrides
1021
+ },
1022
+ this.context.preparedData,
1023
+ ethCallContext
1024
+ );
1025
+ }
1026
+ async getTimestamp(_roundId, overrides) {
1027
+ const ethCallContext = {
1028
+ chainId: this.context.chainId,
1029
+ blockTag: this.context.blockNumber.toString(16),
1030
+ address: this.context.address
1031
+ };
1032
+ return await this.view.getTimestamp(
1033
+ _roundId,
1034
+ {
1035
+ blockTag: this.context.blockNumber,
1036
+ ...overrides
1037
+ },
1038
+ this.context.preparedData,
1039
+ ethCallContext
1040
+ );
1041
+ }
1042
+ async latestAnswer(overrides) {
1043
+ const ethCallContext = {
1044
+ chainId: this.context.chainId,
1045
+ blockTag: this.context.blockNumber.toString(16),
1046
+ address: this.context.address
1047
+ };
1048
+ return await this.view.latestAnswer(
1049
+ {
1050
+ blockTag: this.context.blockNumber,
1051
+ ...overrides
1052
+ },
1053
+ this.context.preparedData,
1054
+ ethCallContext
1055
+ );
1056
+ }
1057
+ async latestRound(overrides) {
1058
+ const ethCallContext = {
1059
+ chainId: this.context.chainId,
1060
+ blockTag: this.context.blockNumber.toString(16),
1061
+ address: this.context.address
1062
+ };
1063
+ return await this.view.latestRound(
1064
+ {
1065
+ blockTag: this.context.blockNumber,
1066
+ ...overrides
1067
+ },
1068
+ this.context.preparedData,
1069
+ ethCallContext
1070
+ );
1071
+ }
1072
+ async latestRoundData(overrides) {
1073
+ const ethCallContext = {
1074
+ chainId: this.context.chainId,
1075
+ blockTag: this.context.blockNumber.toString(16),
1076
+ address: this.context.address
1077
+ };
1078
+ return await this.view.latestRoundData(
1079
+ {
1080
+ blockTag: this.context.blockNumber,
1081
+ ...overrides
1082
+ },
1083
+ this.context.preparedData,
1084
+ ethCallContext
1085
+ );
1086
+ }
1087
+ async latestTimestamp(overrides) {
1088
+ const ethCallContext = {
1089
+ chainId: this.context.chainId,
1090
+ blockTag: this.context.blockNumber.toString(16),
1091
+ address: this.context.address
1092
+ };
1093
+ return await this.view.latestTimestamp(
1094
+ {
1095
+ blockTag: this.context.blockNumber,
1096
+ ...overrides
1097
+ },
1098
+ this.context.preparedData,
1099
+ ethCallContext
1100
+ );
1101
+ }
1102
+ async owner(overrides) {
1103
+ const ethCallContext = {
1104
+ chainId: this.context.chainId,
1105
+ blockTag: this.context.blockNumber.toString(16),
1106
+ address: this.context.address
1107
+ };
1108
+ return await this.view.owner(
1109
+ {
1110
+ blockTag: this.context.blockNumber,
1111
+ ...overrides
1112
+ },
1113
+ this.context.preparedData,
1114
+ ethCallContext
1115
+ );
1116
+ }
1117
+ async phaseAggregators(arg0, overrides) {
1118
+ const ethCallContext = {
1119
+ chainId: this.context.chainId,
1120
+ blockTag: this.context.blockNumber.toString(16),
1121
+ address: this.context.address
1122
+ };
1123
+ return await this.view.phaseAggregators(
1124
+ arg0,
1125
+ {
1126
+ blockTag: this.context.blockNumber,
1127
+ ...overrides
1128
+ },
1129
+ this.context.preparedData,
1130
+ ethCallContext
1131
+ );
1132
+ }
1133
+ async phaseId(overrides) {
1134
+ const ethCallContext = {
1135
+ chainId: this.context.chainId,
1136
+ blockTag: this.context.blockNumber.toString(16),
1137
+ address: this.context.address
1138
+ };
1139
+ return await this.view.phaseId(
1140
+ {
1141
+ blockTag: this.context.blockNumber,
1142
+ ...overrides
1143
+ },
1144
+ this.context.preparedData,
1145
+ ethCallContext
1146
+ );
1147
+ }
1148
+ async proposedAggregator(overrides) {
1149
+ const ethCallContext = {
1150
+ chainId: this.context.chainId,
1151
+ blockTag: this.context.blockNumber.toString(16),
1152
+ address: this.context.address
1153
+ };
1154
+ return await this.view.proposedAggregator(
1155
+ {
1156
+ blockTag: this.context.blockNumber,
1157
+ ...overrides
1158
+ },
1159
+ this.context.preparedData,
1160
+ ethCallContext
1161
+ );
1162
+ }
1163
+ async proposedGetRoundData(_roundId, overrides) {
1164
+ const ethCallContext = {
1165
+ chainId: this.context.chainId,
1166
+ blockTag: this.context.blockNumber.toString(16),
1167
+ address: this.context.address
1168
+ };
1169
+ return await this.view.proposedGetRoundData(
1170
+ _roundId,
1171
+ {
1172
+ blockTag: this.context.blockNumber,
1173
+ ...overrides
1174
+ },
1175
+ this.context.preparedData,
1176
+ ethCallContext
1177
+ );
1178
+ }
1179
+ async proposedLatestRoundData(overrides) {
1180
+ const ethCallContext = {
1181
+ chainId: this.context.chainId,
1182
+ blockTag: this.context.blockNumber.toString(16),
1183
+ address: this.context.address
1184
+ };
1185
+ return await this.view.proposedLatestRoundData(
1186
+ {
1187
+ blockTag: this.context.blockNumber,
1188
+ ...overrides
1189
+ },
1190
+ this.context.preparedData,
1191
+ ethCallContext
1192
+ );
1193
+ }
1194
+ async version(overrides) {
1195
+ const ethCallContext = {
1196
+ chainId: this.context.chainId,
1197
+ blockTag: this.context.blockNumber.toString(16),
1198
+ address: this.context.address
1199
+ };
1200
+ return await this.view.version(
1201
+ {
1202
+ blockTag: this.context.blockNumber,
1203
+ ...overrides
1204
+ },
1205
+ this.context.preparedData,
1206
+ ethCallContext
1207
+ );
1208
+ }
1209
+ callStatic = {
1210
+ view: this.view,
1211
+ context: this.context,
1212
+ async acceptOwnership(overrides) {
1213
+ const ethCallContext = {
1214
+ chainId: this.context.chainId,
1215
+ blockTag: this.context.blockNumber.toString(16),
1216
+ address: this.context.address
1217
+ };
1218
+ return await this.view.callStatic.acceptOwnership(
1219
+ {
1220
+ blockTag: this.context.blockNumber,
1221
+ ...overrides
1222
+ },
1223
+ this.context.preparedData,
1224
+ ethCallContext
1225
+ );
1226
+ },
1227
+ async confirmAggregator(_aggregator, overrides) {
1228
+ const ethCallContext = {
1229
+ chainId: this.context.chainId,
1230
+ blockTag: this.context.blockNumber.toString(16),
1231
+ address: this.context.address
1232
+ };
1233
+ return await this.view.callStatic.confirmAggregator(
1234
+ _aggregator,
1235
+ {
1236
+ blockTag: this.context.blockNumber,
1237
+ ...overrides
1238
+ },
1239
+ this.context.preparedData,
1240
+ ethCallContext
1241
+ );
1242
+ },
1243
+ async proposeAggregator(_aggregator, overrides) {
1244
+ const ethCallContext = {
1245
+ chainId: this.context.chainId,
1246
+ blockTag: this.context.blockNumber.toString(16),
1247
+ address: this.context.address
1248
+ };
1249
+ return await this.view.callStatic.proposeAggregator(
1250
+ _aggregator,
1251
+ {
1252
+ blockTag: this.context.blockNumber,
1253
+ ...overrides
1254
+ },
1255
+ this.context.preparedData,
1256
+ ethCallContext
1257
+ );
1258
+ },
1259
+ async setController(_accessController, overrides) {
1260
+ const ethCallContext = {
1261
+ chainId: this.context.chainId,
1262
+ blockTag: this.context.blockNumber.toString(16),
1263
+ address: this.context.address
1264
+ };
1265
+ return await this.view.callStatic.setController(
1266
+ _accessController,
1267
+ {
1268
+ blockTag: this.context.blockNumber,
1269
+ ...overrides
1270
+ },
1271
+ this.context.preparedData,
1272
+ ethCallContext
1273
+ );
1274
+ },
1275
+ async transferOwnership(_to, overrides) {
1276
+ const ethCallContext = {
1277
+ chainId: this.context.chainId,
1278
+ blockTag: this.context.blockNumber.toString(16),
1279
+ address: this.context.address
1280
+ };
1281
+ return await this.view.callStatic.transferOwnership(
1282
+ _to,
1283
+ {
1284
+ blockTag: this.context.blockNumber,
1285
+ ...overrides
1286
+ },
1287
+ this.context.preparedData,
1288
+ ethCallContext
1289
+ );
1290
+ }
1291
+ };
1292
+ encodeCall = {
1293
+ view: this.view,
1294
+ context: this.context,
1295
+ acceptOwnership(overrides) {
1296
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1297
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1298
+ const address = this.context.address;
1299
+ return this.view.encodeCall.acceptOwnership({
1300
+ chainId,
1301
+ address,
1302
+ blockTag
1303
+ });
1304
+ },
1305
+ accessController(overrides) {
1306
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1307
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1308
+ const address = this.context.address;
1309
+ return this.view.encodeCall.accessController({
1310
+ chainId,
1311
+ address,
1312
+ blockTag
1313
+ });
1314
+ },
1315
+ aggregator(overrides) {
1316
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1317
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1318
+ const address = this.context.address;
1319
+ return this.view.encodeCall.aggregator({ chainId, address, blockTag });
1320
+ },
1321
+ confirmAggregator(_aggregator, overrides) {
1322
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1323
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1324
+ const address = this.context.address;
1325
+ return this.view.encodeCall.confirmAggregator(_aggregator, {
1326
+ chainId,
1327
+ address,
1328
+ blockTag
1329
+ });
1330
+ },
1331
+ decimals(overrides) {
1332
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1333
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1334
+ const address = this.context.address;
1335
+ return this.view.encodeCall.decimals({ chainId, address, blockTag });
1336
+ },
1337
+ description(overrides) {
1338
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1339
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1340
+ const address = this.context.address;
1341
+ return this.view.encodeCall.description({ chainId, address, blockTag });
1342
+ },
1343
+ getAnswer(_roundId, overrides) {
1344
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1345
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1346
+ const address = this.context.address;
1347
+ return this.view.encodeCall.getAnswer(_roundId, {
1348
+ chainId,
1349
+ address,
1350
+ blockTag
1351
+ });
1352
+ },
1353
+ getRoundData(_roundId, overrides) {
1354
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1355
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1356
+ const address = this.context.address;
1357
+ return this.view.encodeCall.getRoundData(_roundId, {
1358
+ chainId,
1359
+ address,
1360
+ blockTag
1361
+ });
1362
+ },
1363
+ getTimestamp(_roundId, overrides) {
1364
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1365
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1366
+ const address = this.context.address;
1367
+ return this.view.encodeCall.getTimestamp(_roundId, {
1368
+ chainId,
1369
+ address,
1370
+ blockTag
1371
+ });
1372
+ },
1373
+ latestAnswer(overrides) {
1374
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1375
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1376
+ const address = this.context.address;
1377
+ return this.view.encodeCall.latestAnswer({ chainId, address, blockTag });
1378
+ },
1379
+ latestRound(overrides) {
1380
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1381
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1382
+ const address = this.context.address;
1383
+ return this.view.encodeCall.latestRound({ chainId, address, blockTag });
1384
+ },
1385
+ latestRoundData(overrides) {
1386
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1387
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1388
+ const address = this.context.address;
1389
+ return this.view.encodeCall.latestRoundData({
1390
+ chainId,
1391
+ address,
1392
+ blockTag
1393
+ });
1394
+ },
1395
+ latestTimestamp(overrides) {
1396
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1397
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1398
+ const address = this.context.address;
1399
+ return this.view.encodeCall.latestTimestamp({
1400
+ chainId,
1401
+ address,
1402
+ blockTag
1403
+ });
1404
+ },
1405
+ owner(overrides) {
1406
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1407
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1408
+ const address = this.context.address;
1409
+ return this.view.encodeCall.owner({ chainId, address, blockTag });
1410
+ },
1411
+ phaseAggregators(arg0, overrides) {
1412
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1413
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1414
+ const address = this.context.address;
1415
+ return this.view.encodeCall.phaseAggregators(arg0, {
1416
+ chainId,
1417
+ address,
1418
+ blockTag
1419
+ });
1420
+ },
1421
+ phaseId(overrides) {
1422
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1423
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1424
+ const address = this.context.address;
1425
+ return this.view.encodeCall.phaseId({ chainId, address, blockTag });
1426
+ },
1427
+ proposeAggregator(_aggregator, overrides) {
1428
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1429
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1430
+ const address = this.context.address;
1431
+ return this.view.encodeCall.proposeAggregator(_aggregator, {
1432
+ chainId,
1433
+ address,
1434
+ blockTag
1435
+ });
1436
+ },
1437
+ proposedAggregator(overrides) {
1438
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1439
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1440
+ const address = this.context.address;
1441
+ return this.view.encodeCall.proposedAggregator({
1442
+ chainId,
1443
+ address,
1444
+ blockTag
1445
+ });
1446
+ },
1447
+ proposedGetRoundData(_roundId, overrides) {
1448
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1449
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1450
+ const address = this.context.address;
1451
+ return this.view.encodeCall.proposedGetRoundData(_roundId, {
1452
+ chainId,
1453
+ address,
1454
+ blockTag
1455
+ });
1456
+ },
1457
+ proposedLatestRoundData(overrides) {
1458
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1459
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1460
+ const address = this.context.address;
1461
+ return this.view.encodeCall.proposedLatestRoundData({
1462
+ chainId,
1463
+ address,
1464
+ blockTag
1465
+ });
1466
+ },
1467
+ setController(_accessController, overrides) {
1468
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1469
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1470
+ const address = this.context.address;
1471
+ return this.view.encodeCall.setController(_accessController, {
1472
+ chainId,
1473
+ address,
1474
+ blockTag
1475
+ });
1476
+ },
1477
+ transferOwnership(_to, overrides) {
1478
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1479
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1480
+ const address = this.context.address;
1481
+ return this.view.encodeCall.transferOwnership(_to, {
1482
+ chainId,
1483
+ address,
1484
+ blockTag
1485
+ });
1486
+ },
1487
+ version(overrides) {
1488
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1489
+ const blockTag = overrides?.blockTag?.toString() ?? this.context.blockNumber.toString(16);
1490
+ const address = this.context.address;
1491
+ return this.view.encodeCall.version({ chainId, address, blockTag });
1492
+ }
1493
+ };
1494
+ };
1495
+ var _EACAggregatorProxyProcessor = class extends BaseProcessor {
1496
+ onEventAnswerUpdated(handler, filter, fetchConfig, preprocessHandler) {
1497
+ if (!filter) {
1498
+ filter = templateContract.filters["AnswerUpdated(int256,uint256,uint256)"](null, null, null);
1499
+ }
1500
+ return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
1501
+ }
1502
+ onEventNewRound(handler, filter, fetchConfig, preprocessHandler) {
1503
+ if (!filter) {
1504
+ filter = templateContract.filters["NewRound(uint256,address,uint256)"](
1505
+ null,
1506
+ null,
1507
+ null
1508
+ );
1509
+ }
1510
+ return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
1511
+ }
1512
+ onEventOwnershipTransferRequested(handler, filter, fetchConfig, preprocessHandler) {
1513
+ if (!filter) {
1514
+ filter = templateContract.filters["OwnershipTransferRequested(address,address)"](null, null);
1515
+ }
1516
+ return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
1517
+ }
1518
+ onEventOwnershipTransferred(handler, filter, fetchConfig, preprocessHandler) {
1519
+ if (!filter) {
1520
+ filter = templateContract.filters["OwnershipTransferred(address,address)"](null, null);
1521
+ }
1522
+ return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
1523
+ }
1524
+ onCallAcceptOwnership(handler, fetchConfig, preprocessHandler) {
1525
+ return super.onEthTrace(
1526
+ "0x79ba5097",
1527
+ handler,
1528
+ fetchConfig,
1529
+ preprocessHandler
1530
+ );
1531
+ }
1532
+ onCallAccessController(handler, fetchConfig, preprocessHandler) {
1533
+ return super.onEthTrace(
1534
+ "0xbc43cbaf",
1535
+ handler,
1536
+ fetchConfig,
1537
+ preprocessHandler
1538
+ );
1539
+ }
1540
+ onCallAggregator(handler, fetchConfig, preprocessHandler) {
1541
+ return super.onEthTrace(
1542
+ "0x245a7bfc",
1543
+ handler,
1544
+ fetchConfig,
1545
+ preprocessHandler
1546
+ );
1547
+ }
1548
+ onCallConfirmAggregator(handler, fetchConfig, preprocessHandler) {
1549
+ return super.onEthTrace(
1550
+ "0xa928c096",
1551
+ handler,
1552
+ fetchConfig,
1553
+ preprocessHandler
1554
+ );
1555
+ }
1556
+ onCallDecimals(handler, fetchConfig, preprocessHandler) {
1557
+ return super.onEthTrace(
1558
+ "0x313ce567",
1559
+ handler,
1560
+ fetchConfig,
1561
+ preprocessHandler
1562
+ );
1563
+ }
1564
+ onCallDescription(handler, fetchConfig, preprocessHandler) {
1565
+ return super.onEthTrace(
1566
+ "0x7284e416",
1567
+ handler,
1568
+ fetchConfig,
1569
+ preprocessHandler
1570
+ );
1571
+ }
1572
+ onCallGetAnswer(handler, fetchConfig, preprocessHandler) {
1573
+ return super.onEthTrace(
1574
+ "0xb5ab58dc",
1575
+ handler,
1576
+ fetchConfig,
1577
+ preprocessHandler
1578
+ );
1579
+ }
1580
+ onCallGetRoundData(handler, fetchConfig, preprocessHandler) {
1581
+ return super.onEthTrace(
1582
+ "0x9a6fc8f5",
1583
+ handler,
1584
+ fetchConfig,
1585
+ preprocessHandler
1586
+ );
1587
+ }
1588
+ onCallGetTimestamp(handler, fetchConfig, preprocessHandler) {
1589
+ return super.onEthTrace(
1590
+ "0xb633620c",
1591
+ handler,
1592
+ fetchConfig,
1593
+ preprocessHandler
1594
+ );
1595
+ }
1596
+ onCallLatestAnswer(handler, fetchConfig, preprocessHandler) {
1597
+ return super.onEthTrace(
1598
+ "0x50d25bcd",
1599
+ handler,
1600
+ fetchConfig,
1601
+ preprocessHandler
1602
+ );
1603
+ }
1604
+ onCallLatestRound(handler, fetchConfig, preprocessHandler) {
1605
+ return super.onEthTrace(
1606
+ "0x668a0f02",
1607
+ handler,
1608
+ fetchConfig,
1609
+ preprocessHandler
1610
+ );
1611
+ }
1612
+ onCallLatestRoundData(handler, fetchConfig, preprocessHandler) {
1613
+ return super.onEthTrace(
1614
+ "0xfeaf968c",
1615
+ handler,
1616
+ fetchConfig,
1617
+ preprocessHandler
1618
+ );
1619
+ }
1620
+ onCallLatestTimestamp(handler, fetchConfig, preprocessHandler) {
1621
+ return super.onEthTrace(
1622
+ "0x8205bf6a",
1623
+ handler,
1624
+ fetchConfig,
1625
+ preprocessHandler
1626
+ );
1627
+ }
1628
+ onCallOwner(handler, fetchConfig, preprocessHandler) {
1629
+ return super.onEthTrace(
1630
+ "0x8da5cb5b",
1631
+ handler,
1632
+ fetchConfig,
1633
+ preprocessHandler
1634
+ );
1635
+ }
1636
+ onCallPhaseAggregators(handler, fetchConfig, preprocessHandler) {
1637
+ return super.onEthTrace(
1638
+ "0xc1597304",
1639
+ handler,
1640
+ fetchConfig,
1641
+ preprocessHandler
1642
+ );
1643
+ }
1644
+ onCallPhaseId(handler, fetchConfig, preprocessHandler) {
1645
+ return super.onEthTrace(
1646
+ "0x58303b10",
1647
+ handler,
1648
+ fetchConfig,
1649
+ preprocessHandler
1650
+ );
1651
+ }
1652
+ onCallProposeAggregator(handler, fetchConfig, preprocessHandler) {
1653
+ return super.onEthTrace(
1654
+ "0xf8a2abd3",
1655
+ handler,
1656
+ fetchConfig,
1657
+ preprocessHandler
1658
+ );
1659
+ }
1660
+ onCallProposedAggregator(handler, fetchConfig, preprocessHandler) {
1661
+ return super.onEthTrace(
1662
+ "0xe8c4be30",
1663
+ handler,
1664
+ fetchConfig,
1665
+ preprocessHandler
1666
+ );
1667
+ }
1668
+ onCallProposedGetRoundData(handler, fetchConfig, preprocessHandler) {
1669
+ return super.onEthTrace(
1670
+ "0x6001ac53",
1671
+ handler,
1672
+ fetchConfig,
1673
+ preprocessHandler
1674
+ );
1675
+ }
1676
+ onCallProposedLatestRoundData(handler, fetchConfig, preprocessHandler) {
1677
+ return super.onEthTrace(
1678
+ "0x8f6b4d91",
1679
+ handler,
1680
+ fetchConfig,
1681
+ preprocessHandler
1682
+ );
1683
+ }
1684
+ onCallSetController(handler, fetchConfig, preprocessHandler) {
1685
+ return super.onEthTrace(
1686
+ "0x92eefe9b",
1687
+ handler,
1688
+ fetchConfig,
1689
+ preprocessHandler
1690
+ );
1691
+ }
1692
+ onCallTransferOwnership(handler, fetchConfig, preprocessHandler) {
1693
+ return super.onEthTrace(
1694
+ "0xf2fde38b",
1695
+ handler,
1696
+ fetchConfig,
1697
+ preprocessHandler
1698
+ );
1699
+ }
1700
+ onCallVersion(handler, fetchConfig, preprocessHandler) {
1701
+ return super.onEthTrace(
1702
+ "0x54fd4d50",
1703
+ handler,
1704
+ fetchConfig,
1705
+ preprocessHandler
1706
+ );
1707
+ }
1708
+ CreateBoundContractView() {
1709
+ const view = getEACAggregatorProxyContract(
1710
+ this.config.network,
1711
+ this.config.address
1712
+ );
1713
+ return new EACAggregatorProxyBoundContractView(this.config.address, view);
1714
+ }
1715
+ static bind(options) {
1716
+ if (!options.name) {
1717
+ options.name = "EACAggregatorProxy";
1718
+ }
1719
+ let processor = getProcessor(options);
1720
+ if (!processor) {
1721
+ processor = new _EACAggregatorProxyProcessor(options);
1722
+ addProcessor(options, processor);
1723
+ }
1724
+ return processor;
1725
+ }
1726
+ };
1727
+ var EACAggregatorProxyProcessor = _EACAggregatorProxyProcessor;
1728
+ __publicField(EACAggregatorProxyProcessor, "filters", {
1729
+ AnswerUpdated(current, roundId, updatedAt) {
1730
+ return templateContract.filters["AnswerUpdated(int256,uint256,uint256)"](
1731
+ current,
1732
+ roundId,
1733
+ updatedAt
1734
+ );
1735
+ },
1736
+ NewRound(roundId, startedBy, startedAt) {
1737
+ return templateContract.filters["NewRound(uint256,address,uint256)"](
1738
+ roundId,
1739
+ startedBy,
1740
+ startedAt
1741
+ );
1742
+ },
1743
+ OwnershipTransferRequested(from, to) {
1744
+ return templateContract.filters["OwnershipTransferRequested(address,address)"](from, to);
1745
+ },
1746
+ OwnershipTransferred(from, to) {
1747
+ return templateContract.filters["OwnershipTransferred(address,address)"](
1748
+ from,
1749
+ to
1750
+ );
1751
+ }
1752
+ });
1753
+ var EACAggregatorProxyProcessorTemplate = class extends BaseProcessorTemplate {
1754
+ bindInternal(options) {
1755
+ if (!options.name) {
1756
+ options.name = "EACAggregatorProxy";
1757
+ }
1758
+ let processor = getProcessor(options);
1759
+ if (!processor) {
1760
+ processor = new EACAggregatorProxyProcessor(options);
1761
+ addProcessor(options, processor);
1762
+ }
1763
+ return processor;
1764
+ }
1765
+ onEventAnswerUpdated(handler, filter, fetchConfig, preprocessHandler) {
1766
+ if (!filter) {
1767
+ filter = templateContract.filters["AnswerUpdated(int256,uint256,uint256)"](null, null, null);
1768
+ }
1769
+ return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
1770
+ }
1771
+ onEventNewRound(handler, filter, fetchConfig, preprocessHandler) {
1772
+ if (!filter) {
1773
+ filter = templateContract.filters["NewRound(uint256,address,uint256)"](
1774
+ null,
1775
+ null,
1776
+ null
1777
+ );
1778
+ }
1779
+ return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
1780
+ }
1781
+ onEventOwnershipTransferRequested(handler, filter, fetchConfig, preprocessHandler) {
1782
+ if (!filter) {
1783
+ filter = templateContract.filters["OwnershipTransferRequested(address,address)"](null, null);
1784
+ }
1785
+ return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
1786
+ }
1787
+ onEventOwnershipTransferred(handler, filter, fetchConfig, preprocessHandler) {
1788
+ if (!filter) {
1789
+ filter = templateContract.filters["OwnershipTransferred(address,address)"](null, null);
1790
+ }
1791
+ return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
1792
+ }
1793
+ };
1794
+ function getEACAggregatorProxyContract(chainId, address) {
1795
+ let contract = getContractByABI(
1796
+ "EACAggregatorProxy",
1797
+ address,
1798
+ chainId
1799
+ );
1800
+ if (!contract) {
1801
+ const rawContract = EACAggregatorProxy__factory.connect(
1802
+ address,
1803
+ getProvider(chainId)
1804
+ );
1805
+ contract = new EACAggregatorProxyContractView(rawContract);
1806
+ addContractByABI("EACAggregatorProxy", address, chainId, contract);
1807
+ }
1808
+ return contract;
1809
+ }
1810
+ function getEACAggregatorProxyContractOnContext(context, address) {
1811
+ const view = getEACAggregatorProxyContract(context.getChainId(), address);
1812
+ const boundView = new EACAggregatorProxyBoundContractView(address, view);
1813
+ boundView.context = context;
1814
+ if (boundView.callStatic) {
1815
+ boundView.callStatic.context = context;
1816
+ }
1817
+ return boundView;
1818
+ }
1819
+
1820
+ // src/eth/builtin/internal/eacaggregatorproxy-test-utils.ts
1821
+ var mockField = {
1822
+ blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
1823
+ blockNumber: 0,
1824
+ logIndex: 0,
1825
+ removed: false,
1826
+ transactionHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
1827
+ transactionIndex: 0
1828
+ };
1829
+ function mockAnswerUpdatedLog(contractAddress, event) {
1830
+ const contract = getEACAggregatorProxyContract(
1831
+ import_chain.EthChainId.ETHEREUM,
1832
+ contractAddress
1833
+ );
1834
+ const encodedLog = contract.rawContract.interface.encodeEventLog(
1835
+ "AnswerUpdated(int256,uint256,uint256)",
1836
+ [event.current, event.roundId, event.updatedAt]
1837
+ );
1838
+ return {
1839
+ ...mockField,
1840
+ index: 0,
1841
+ address: contractAddress,
1842
+ data: encodedLog.data,
1843
+ topics: encodedLog.topics
1844
+ };
1845
+ }
1846
+ function mockNewRoundLog(contractAddress, event) {
1847
+ const contract = getEACAggregatorProxyContract(
1848
+ import_chain.EthChainId.ETHEREUM,
1849
+ contractAddress
1850
+ );
1851
+ const encodedLog = contract.rawContract.interface.encodeEventLog(
1852
+ "NewRound(uint256,address,uint256)",
1853
+ [event.roundId, event.startedBy, event.startedAt]
1854
+ );
1855
+ return {
1856
+ ...mockField,
1857
+ index: 0,
1858
+ address: contractAddress,
1859
+ data: encodedLog.data,
1860
+ topics: encodedLog.topics
1861
+ };
1862
+ }
1863
+ function mockOwnershipTransferRequestedLog(contractAddress, event) {
1864
+ const contract = getEACAggregatorProxyContract(
1865
+ import_chain.EthChainId.ETHEREUM,
1866
+ contractAddress
1867
+ );
1868
+ const encodedLog = contract.rawContract.interface.encodeEventLog(
1869
+ "OwnershipTransferRequested(address,address)",
1870
+ [event.from, event.to]
1871
+ );
1872
+ return {
1873
+ ...mockField,
1874
+ index: 0,
1875
+ address: contractAddress,
1876
+ data: encodedLog.data,
1877
+ topics: encodedLog.topics
1878
+ };
1879
+ }
1880
+ function mockOwnershipTransferredLog(contractAddress, event) {
1881
+ const contract = getEACAggregatorProxyContract(
1882
+ import_chain.EthChainId.ETHEREUM,
1883
+ contractAddress
1884
+ );
1885
+ const encodedLog = contract.rawContract.interface.encodeEventLog(
1886
+ "OwnershipTransferred(address,address)",
1887
+ [event.from, event.to]
1888
+ );
1889
+ return {
1890
+ ...mockField,
1891
+ index: 0,
1892
+ address: contractAddress,
1893
+ data: encodedLog.data,
1894
+ topics: encodedLog.topics
1895
+ };
1896
+ }
1897
+
1898
+ export {
1899
+ EACAggregatorProxyContractView,
1900
+ EACAggregatorProxyBoundContractView,
1901
+ EACAggregatorProxyProcessor,
1902
+ EACAggregatorProxyProcessorTemplate,
1903
+ getEACAggregatorProxyContract,
1904
+ getEACAggregatorProxyContractOnContext,
1905
+ mockAnswerUpdatedLog,
1906
+ mockNewRoundLog,
1907
+ mockOwnershipTransferRequestedLog,
1908
+ mockOwnershipTransferredLog,
1909
+ eacaggregatorproxy_exports
1910
+ };