@sentio/sdk 2.40.0-rc.3 → 2.40.0-rc.31

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 (147) hide show
  1. package/lib/aptos/aptos-processor.d.ts +1 -1
  2. package/lib/aptos/aptos-processor.d.ts.map +1 -1
  3. package/lib/aptos/aptos-processor.js +1 -1
  4. package/lib/aptos/aptos-processor.js.map +1 -1
  5. package/lib/aptos/context.d.ts +2 -2
  6. package/lib/aptos/context.d.ts.map +1 -1
  7. package/lib/aptos/context.js +1 -1
  8. package/lib/aptos/ext/aptos-dex.d.ts +1 -1
  9. package/lib/aptos/ext/aptos-dex.d.ts.map +1 -1
  10. package/lib/aptos/ext/aptos-dex.js +1 -1
  11. package/lib/aptos/ext/aptos-dex.js.map +1 -1
  12. package/lib/aptos/ext/coin-event.d.ts +1 -1
  13. package/lib/aptos/ext/coin-event.d.ts.map +1 -1
  14. package/lib/aptos/ext/coin.js +2 -2
  15. package/lib/aptos/ext/coin.js.map +1 -1
  16. package/lib/eth/account-processor.d.ts +21 -7
  17. package/lib/eth/account-processor.d.ts.map +1 -1
  18. package/lib/eth/account-processor.js +2 -2
  19. package/lib/eth/account-processor.js.map +1 -1
  20. package/lib/eth/base-processor-template.d.ts +24 -8
  21. package/lib/eth/base-processor-template.d.ts.map +1 -1
  22. package/lib/eth/base-processor-template.js.map +1 -1
  23. package/lib/eth/base-processor.d.ts +30 -10
  24. package/lib/eth/base-processor.d.ts.map +1 -1
  25. package/lib/eth/base-processor.js +6 -6
  26. package/lib/eth/base-processor.js.map +1 -1
  27. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts +100 -31
  28. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts.map +1 -1
  29. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js +1295 -46
  30. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
  31. package/lib/eth/builtin/internal/erc1155-processor.d.ts +55 -16
  32. package/lib/eth/builtin/internal/erc1155-processor.d.ts.map +1 -1
  33. package/lib/eth/builtin/internal/erc1155-processor.js +510 -16
  34. package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
  35. package/lib/eth/builtin/internal/erc20-processor.d.ts +79 -24
  36. package/lib/eth/builtin/internal/erc20-processor.d.ts.map +1 -1
  37. package/lib/eth/builtin/internal/erc20-processor.js +1039 -36
  38. package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
  39. package/lib/eth/builtin/internal/erc20bytes-processor.d.ts +46 -13
  40. package/lib/eth/builtin/internal/erc20bytes-processor.d.ts.map +1 -1
  41. package/lib/eth/builtin/internal/erc20bytes-processor.js +512 -18
  42. package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
  43. package/lib/eth/builtin/internal/erc721-processor.d.ts +67 -20
  44. package/lib/eth/builtin/internal/erc721-processor.d.ts.map +1 -1
  45. package/lib/eth/builtin/internal/erc721-processor.js +826 -28
  46. package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
  47. package/lib/eth/builtin/internal/weth9-processor.d.ts +64 -19
  48. package/lib/eth/builtin/internal/weth9-processor.d.ts.map +1 -1
  49. package/lib/eth/builtin/internal/weth9-processor.js +607 -22
  50. package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
  51. package/lib/eth/codegen/event-handler.js +1 -1
  52. package/lib/eth/codegen/file.d.ts.map +1 -1
  53. package/lib/eth/codegen/file.js +21 -3
  54. package/lib/eth/codegen/file.js.map +1 -1
  55. package/lib/eth/codegen/function-calls.d.ts +4 -0
  56. package/lib/eth/codegen/function-calls.d.ts.map +1 -1
  57. package/lib/eth/codegen/function-calls.js +83 -5
  58. package/lib/eth/codegen/function-calls.js.map +1 -1
  59. package/lib/eth/codegen/types.d.ts +1 -0
  60. package/lib/eth/codegen/types.d.ts.map +1 -1
  61. package/lib/eth/codegen/types.js +13 -0
  62. package/lib/eth/codegen/types.js.map +1 -1
  63. package/lib/eth/context.d.ts +4 -0
  64. package/lib/eth/context.d.ts.map +1 -1
  65. package/lib/eth/context.js +4 -0
  66. package/lib/eth/context.js.map +1 -1
  67. package/lib/eth/eth-plugin.d.ts +27 -9
  68. package/lib/eth/eth-plugin.d.ts.map +1 -1
  69. package/lib/eth/eth-plugin.js +20 -17
  70. package/lib/eth/eth-plugin.js.map +1 -1
  71. package/lib/eth/eth.d.ts.map +1 -1
  72. package/lib/eth/eth.js +1 -1
  73. package/lib/eth/eth.js.map +1 -1
  74. package/lib/eth/generic-processor.js +1 -1
  75. package/lib/eth/generic-processor.js.map +1 -1
  76. package/lib/eth/generic-processor.test.js.map +1 -1
  77. package/lib/eth/index.d.ts +2 -1
  78. package/lib/eth/index.d.ts.map +1 -1
  79. package/lib/eth/index.js +2 -1
  80. package/lib/eth/index.js.map +1 -1
  81. package/lib/solana/builtin/spl-token-processor.d.ts +1 -1
  82. package/lib/solana/builtin/spl-token-processor.d.ts.map +1 -1
  83. package/lib/solana/builtin/spl-token-processor.js +1 -1
  84. package/lib/solana/builtin/spl-token-processor.js.map +1 -1
  85. package/lib/solana/solana-context.d.ts +1 -1
  86. package/lib/solana/solana-context.js +2 -2
  87. package/lib/store/cache.d.ts +14 -0
  88. package/lib/store/cache.d.ts.map +1 -0
  89. package/lib/store/cache.js +35 -0
  90. package/lib/store/cache.js.map +1 -0
  91. package/lib/store/store.d.ts +2 -3
  92. package/lib/store/store.d.ts.map +1 -1
  93. package/lib/store/store.js +34 -9
  94. package/lib/store/store.js.map +1 -1
  95. package/lib/sui/context.d.ts +1 -1
  96. package/lib/sui/context.d.ts.map +1 -1
  97. package/lib/sui/sui-processor.d.ts +1 -1
  98. package/lib/sui/sui-processor.d.ts.map +1 -1
  99. package/lib/sui/sui-processor.js +1 -1
  100. package/lib/sui/sui-processor.js.map +1 -1
  101. package/lib/testing/aptos-facet.d.ts +1 -1
  102. package/lib/testing/aptos-facet.js +2 -2
  103. package/lib/testing/sui-facet.js +1 -1
  104. package/lib/utils/dex-price.d.ts +1 -0
  105. package/lib/utils/dex-price.d.ts.map +1 -1
  106. package/lib/utils/dex-price.js +13 -2
  107. package/lib/utils/dex-price.js.map +1 -1
  108. package/package.json +8 -7
  109. package/src/aptos/aptos-processor.ts +1 -1
  110. package/src/aptos/context.ts +2 -2
  111. package/src/aptos/ext/aptos-dex.ts +1 -1
  112. package/src/aptos/ext/coin-event.ts +1 -1
  113. package/src/aptos/ext/coin.ts +2 -2
  114. package/src/eth/account-processor.ts +28 -12
  115. package/src/eth/base-processor-template.ts +16 -8
  116. package/src/eth/base-processor.ts +25 -16
  117. package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +1643 -123
  118. package/src/eth/builtin/internal/erc1155-processor.ts +724 -42
  119. package/src/eth/builtin/internal/erc20-processor.ts +1368 -90
  120. package/src/eth/builtin/internal/erc20bytes-processor.ts +685 -49
  121. package/src/eth/builtin/internal/erc721-processor.ts +1116 -70
  122. package/src/eth/builtin/internal/weth9-processor.ts +798 -63
  123. package/src/eth/codegen/event-handler.ts +1 -1
  124. package/src/eth/codegen/file.ts +26 -3
  125. package/src/eth/codegen/function-calls.ts +101 -8
  126. package/src/eth/codegen/types.ts +22 -1
  127. package/src/eth/context.ts +7 -0
  128. package/src/eth/eth-plugin.ts +34 -26
  129. package/src/eth/eth.ts +1 -2
  130. package/src/eth/generic-processor.ts +1 -1
  131. package/src/eth/index.ts +5 -1
  132. package/src/solana/builtin/spl-token-processor.ts +1 -1
  133. package/src/solana/solana-context.ts +2 -2
  134. package/src/store/cache.ts +46 -0
  135. package/src/store/store.ts +40 -22
  136. package/src/sui/context.ts +1 -1
  137. package/src/sui/sui-processor.ts +1 -1
  138. package/src/testing/aptos-facet.ts +2 -2
  139. package/src/testing/sui-facet.ts +1 -1
  140. package/src/utils/dex-price.ts +15 -2
  141. package/lib/eth/provider.d.ts +0 -5
  142. package/lib/eth/provider.d.ts.map +0 -1
  143. package/lib/eth/provider.js +0 -134
  144. package/lib/eth/provider.js.map +0 -1
  145. package/lib/utils/chainlink-oracles-sepolia.csv +0 -19
  146. package/lib/utils/chainlink-oracles.csv +0 -217
  147. package/src/eth/provider.ts +0 -163
@@ -1,7 +1,7 @@
1
1
  /* Autogenerated file. Do not edit manually. */
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
- import { BigNumberish, Overrides } from "ethers";
4
+ import { BigNumberish, Overrides, Interface } from "ethers";
5
5
  import {
6
6
  addContractByABI,
7
7
  getContractByABI,
@@ -21,7 +21,9 @@ import {
21
21
  EthContext,
22
22
  EthFetchConfig,
23
23
  PreprocessResult,
24
+ makeEthCallKey,
24
25
  } from "@sentio/sdk/eth";
26
+ import { EthCallParam, EthCallContext, PreparedData } from "@sentio/protos";
25
27
 
26
28
  import { EACAggregatorProxy__factory } from "./index.js";
27
29
  import {
@@ -197,8 +199,32 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
197
199
  this.callStatic.contract = contract;
198
200
  }
199
201
 
200
- async accessController(overrides?: Overrides): Promise<string> {
202
+ async accessController(
203
+ overrides?: Overrides,
204
+ preparedData?: PreparedData,
205
+ ethCallContext?: EthCallContext
206
+ ): Promise<string> {
201
207
  try {
208
+ if (preparedData?.ethCallResults && ethCallContext) {
209
+ const iface = new Interface([
210
+ "function accessController() view returns (address)",
211
+ ]);
212
+ const calldata = iface.encodeFunctionData("accessController", []);
213
+ const key = makeEthCallKey({
214
+ context: ethCallContext,
215
+ calldata,
216
+ });
217
+ console.debug("looking up eth call key:", key);
218
+ const ret = preparedData.ethCallResults[key];
219
+ if (ret) {
220
+ console.debug("prepared eth call found:", key);
221
+ const result = iface
222
+ .decodeFunctionResult("accessController", ret)
223
+ .toArray();
224
+ return result.length == 1 ? result[0] : result;
225
+ }
226
+ console.debug("missing eth call key:", "accessController", key);
227
+ }
202
228
  return await this.contract.getFunction("accessController()")(
203
229
  overrides || {}
204
230
  );
@@ -208,8 +234,32 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
208
234
  }
209
235
  }
210
236
 
211
- async aggregator(overrides?: Overrides): Promise<string> {
237
+ async aggregator(
238
+ overrides?: Overrides,
239
+ preparedData?: PreparedData,
240
+ ethCallContext?: EthCallContext
241
+ ): Promise<string> {
212
242
  try {
243
+ if (preparedData?.ethCallResults && ethCallContext) {
244
+ const iface = new Interface([
245
+ "function aggregator() view returns (address)",
246
+ ]);
247
+ const calldata = iface.encodeFunctionData("aggregator", []);
248
+ const key = makeEthCallKey({
249
+ context: ethCallContext,
250
+ calldata,
251
+ });
252
+ console.debug("looking up eth call key:", key);
253
+ const ret = preparedData.ethCallResults[key];
254
+ if (ret) {
255
+ console.debug("prepared eth call found:", key);
256
+ const result = iface
257
+ .decodeFunctionResult("aggregator", ret)
258
+ .toArray();
259
+ return result.length == 1 ? result[0] : result;
260
+ }
261
+ console.debug("missing eth call key:", "aggregator", key);
262
+ }
213
263
  return await this.contract.getFunction("aggregator()")(overrides || {});
214
264
  } catch (e) {
215
265
  const stack = new Error().stack;
@@ -217,8 +267,30 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
217
267
  }
218
268
  }
219
269
 
220
- async decimals(overrides?: Overrides): Promise<bigint> {
270
+ async decimals(
271
+ overrides?: Overrides,
272
+ preparedData?: PreparedData,
273
+ ethCallContext?: EthCallContext
274
+ ): Promise<bigint> {
221
275
  try {
276
+ if (preparedData?.ethCallResults && ethCallContext) {
277
+ const iface = new Interface([
278
+ "function decimals() view returns (uint8)",
279
+ ]);
280
+ const calldata = iface.encodeFunctionData("decimals", []);
281
+ const key = makeEthCallKey({
282
+ context: ethCallContext,
283
+ calldata,
284
+ });
285
+ console.debug("looking up eth call key:", key);
286
+ const ret = preparedData.ethCallResults[key];
287
+ if (ret) {
288
+ console.debug("prepared eth call found:", key);
289
+ const result = iface.decodeFunctionResult("decimals", ret).toArray();
290
+ return result.length == 1 ? result[0] : result;
291
+ }
292
+ console.debug("missing eth call key:", "decimals", key);
293
+ }
222
294
  return await this.contract.getFunction("decimals()")(overrides || {});
223
295
  } catch (e) {
224
296
  const stack = new Error().stack;
@@ -226,8 +298,32 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
226
298
  }
227
299
  }
228
300
 
229
- async description(overrides?: Overrides): Promise<string> {
301
+ async description(
302
+ overrides?: Overrides,
303
+ preparedData?: PreparedData,
304
+ ethCallContext?: EthCallContext
305
+ ): Promise<string> {
230
306
  try {
307
+ if (preparedData?.ethCallResults && ethCallContext) {
308
+ const iface = new Interface([
309
+ "function description() view returns (string)",
310
+ ]);
311
+ const calldata = iface.encodeFunctionData("description", []);
312
+ const key = makeEthCallKey({
313
+ context: ethCallContext,
314
+ calldata,
315
+ });
316
+ console.debug("looking up eth call key:", key);
317
+ const ret = preparedData.ethCallResults[key];
318
+ if (ret) {
319
+ console.debug("prepared eth call found:", key);
320
+ const result = iface
321
+ .decodeFunctionResult("description", ret)
322
+ .toArray();
323
+ return result.length == 1 ? result[0] : result;
324
+ }
325
+ console.debug("missing eth call key:", "description", key);
326
+ }
231
327
  return await this.contract.getFunction("description()")(overrides || {});
232
328
  } catch (e) {
233
329
  const stack = new Error().stack;
@@ -237,9 +333,29 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
237
333
 
238
334
  async getAnswer(
239
335
  _roundId: BigNumberish,
240
- overrides?: Overrides
336
+ overrides?: Overrides,
337
+ preparedData?: PreparedData,
338
+ ethCallContext?: EthCallContext
241
339
  ): Promise<bigint> {
242
340
  try {
341
+ if (preparedData?.ethCallResults && ethCallContext) {
342
+ const iface = new Interface([
343
+ "function getAnswer(uint256) view returns (int256)",
344
+ ]);
345
+ const calldata = iface.encodeFunctionData("getAnswer", [_roundId]);
346
+ const key = makeEthCallKey({
347
+ context: ethCallContext,
348
+ calldata,
349
+ });
350
+ console.debug("looking up eth call key:", key);
351
+ const ret = preparedData.ethCallResults[key];
352
+ if (ret) {
353
+ console.debug("prepared eth call found:", key);
354
+ const result = iface.decodeFunctionResult("getAnswer", ret).toArray();
355
+ return result.length == 1 ? result[0] : result;
356
+ }
357
+ console.debug("missing eth call key:", "getAnswer", _roundId, key);
358
+ }
243
359
  return await this.contract.getFunction("getAnswer(uint256)")(
244
360
  _roundId,
245
361
  overrides || {}
@@ -252,7 +368,9 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
252
368
 
253
369
  async getRoundData(
254
370
  _roundId: BigNumberish,
255
- overrides?: Overrides
371
+ overrides?: Overrides,
372
+ preparedData?: PreparedData,
373
+ ethCallContext?: EthCallContext
256
374
  ): Promise<
257
375
  [bigint, bigint, bigint, bigint, bigint] & {
258
376
  roundId: bigint;
@@ -263,6 +381,26 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
263
381
  }
264
382
  > {
265
383
  try {
384
+ if (preparedData?.ethCallResults && ethCallContext) {
385
+ const iface = new Interface([
386
+ "function getRoundData(uint80) view returns (uint80,int256,uint256,uint256,uint80)",
387
+ ]);
388
+ const calldata = iface.encodeFunctionData("getRoundData", [_roundId]);
389
+ const key = makeEthCallKey({
390
+ context: ethCallContext,
391
+ calldata,
392
+ });
393
+ console.debug("looking up eth call key:", key);
394
+ const ret = preparedData.ethCallResults[key];
395
+ if (ret) {
396
+ console.debug("prepared eth call found:", key);
397
+ const result = iface
398
+ .decodeFunctionResult("getRoundData", ret)
399
+ .toArray();
400
+ return result.length == 1 ? result[0] : result;
401
+ }
402
+ console.debug("missing eth call key:", "getRoundData", _roundId, key);
403
+ }
266
404
  return await this.contract.getFunction("getRoundData(uint80)")(
267
405
  _roundId,
268
406
  overrides || {}
@@ -275,9 +413,31 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
275
413
 
276
414
  async getTimestamp(
277
415
  _roundId: BigNumberish,
278
- overrides?: Overrides
416
+ overrides?: Overrides,
417
+ preparedData?: PreparedData,
418
+ ethCallContext?: EthCallContext
279
419
  ): Promise<bigint> {
280
420
  try {
421
+ if (preparedData?.ethCallResults && ethCallContext) {
422
+ const iface = new Interface([
423
+ "function getTimestamp(uint256) view returns (uint256)",
424
+ ]);
425
+ const calldata = iface.encodeFunctionData("getTimestamp", [_roundId]);
426
+ const key = makeEthCallKey({
427
+ context: ethCallContext,
428
+ calldata,
429
+ });
430
+ console.debug("looking up eth call key:", key);
431
+ const ret = preparedData.ethCallResults[key];
432
+ if (ret) {
433
+ console.debug("prepared eth call found:", key);
434
+ const result = iface
435
+ .decodeFunctionResult("getTimestamp", ret)
436
+ .toArray();
437
+ return result.length == 1 ? result[0] : result;
438
+ }
439
+ console.debug("missing eth call key:", "getTimestamp", _roundId, key);
440
+ }
281
441
  return await this.contract.getFunction("getTimestamp(uint256)")(
282
442
  _roundId,
283
443
  overrides || {}
@@ -288,8 +448,32 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
288
448
  }
289
449
  }
290
450
 
291
- async latestAnswer(overrides?: Overrides): Promise<bigint> {
451
+ async latestAnswer(
452
+ overrides?: Overrides,
453
+ preparedData?: PreparedData,
454
+ ethCallContext?: EthCallContext
455
+ ): Promise<bigint> {
292
456
  try {
457
+ if (preparedData?.ethCallResults && ethCallContext) {
458
+ const iface = new Interface([
459
+ "function latestAnswer() view returns (int256)",
460
+ ]);
461
+ const calldata = iface.encodeFunctionData("latestAnswer", []);
462
+ const key = makeEthCallKey({
463
+ context: ethCallContext,
464
+ calldata,
465
+ });
466
+ console.debug("looking up eth call key:", key);
467
+ const ret = preparedData.ethCallResults[key];
468
+ if (ret) {
469
+ console.debug("prepared eth call found:", key);
470
+ const result = iface
471
+ .decodeFunctionResult("latestAnswer", ret)
472
+ .toArray();
473
+ return result.length == 1 ? result[0] : result;
474
+ }
475
+ console.debug("missing eth call key:", "latestAnswer", key);
476
+ }
293
477
  return await this.contract.getFunction("latestAnswer()")(overrides || {});
294
478
  } catch (e) {
295
479
  const stack = new Error().stack;
@@ -297,8 +481,32 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
297
481
  }
298
482
  }
299
483
 
300
- async latestRound(overrides?: Overrides): Promise<bigint> {
484
+ async latestRound(
485
+ overrides?: Overrides,
486
+ preparedData?: PreparedData,
487
+ ethCallContext?: EthCallContext
488
+ ): Promise<bigint> {
301
489
  try {
490
+ if (preparedData?.ethCallResults && ethCallContext) {
491
+ const iface = new Interface([
492
+ "function latestRound() view returns (uint256)",
493
+ ]);
494
+ const calldata = iface.encodeFunctionData("latestRound", []);
495
+ const key = makeEthCallKey({
496
+ context: ethCallContext,
497
+ calldata,
498
+ });
499
+ console.debug("looking up eth call key:", key);
500
+ const ret = preparedData.ethCallResults[key];
501
+ if (ret) {
502
+ console.debug("prepared eth call found:", key);
503
+ const result = iface
504
+ .decodeFunctionResult("latestRound", ret)
505
+ .toArray();
506
+ return result.length == 1 ? result[0] : result;
507
+ }
508
+ console.debug("missing eth call key:", "latestRound", key);
509
+ }
302
510
  return await this.contract.getFunction("latestRound()")(overrides || {});
303
511
  } catch (e) {
304
512
  const stack = new Error().stack;
@@ -307,7 +515,9 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
307
515
  }
308
516
 
309
517
  async latestRoundData(
310
- overrides?: Overrides
518
+ overrides?: Overrides,
519
+ preparedData?: PreparedData,
520
+ ethCallContext?: EthCallContext
311
521
  ): Promise<
312
522
  [bigint, bigint, bigint, bigint, bigint] & {
313
523
  roundId: bigint;
@@ -318,6 +528,26 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
318
528
  }
319
529
  > {
320
530
  try {
531
+ if (preparedData?.ethCallResults && ethCallContext) {
532
+ const iface = new Interface([
533
+ "function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)",
534
+ ]);
535
+ const calldata = iface.encodeFunctionData("latestRoundData", []);
536
+ const key = makeEthCallKey({
537
+ context: ethCallContext,
538
+ calldata,
539
+ });
540
+ console.debug("looking up eth call key:", key);
541
+ const ret = preparedData.ethCallResults[key];
542
+ if (ret) {
543
+ console.debug("prepared eth call found:", key);
544
+ const result = iface
545
+ .decodeFunctionResult("latestRoundData", ret)
546
+ .toArray();
547
+ return result.length == 1 ? result[0] : result;
548
+ }
549
+ console.debug("missing eth call key:", "latestRoundData", key);
550
+ }
321
551
  return await this.contract.getFunction("latestRoundData()")(
322
552
  overrides || {}
323
553
  );
@@ -327,8 +557,32 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
327
557
  }
328
558
  }
329
559
 
330
- async latestTimestamp(overrides?: Overrides): Promise<bigint> {
560
+ async latestTimestamp(
561
+ overrides?: Overrides,
562
+ preparedData?: PreparedData,
563
+ ethCallContext?: EthCallContext
564
+ ): Promise<bigint> {
331
565
  try {
566
+ if (preparedData?.ethCallResults && ethCallContext) {
567
+ const iface = new Interface([
568
+ "function latestTimestamp() view returns (uint256)",
569
+ ]);
570
+ const calldata = iface.encodeFunctionData("latestTimestamp", []);
571
+ const key = makeEthCallKey({
572
+ context: ethCallContext,
573
+ calldata,
574
+ });
575
+ console.debug("looking up eth call key:", key);
576
+ const ret = preparedData.ethCallResults[key];
577
+ if (ret) {
578
+ console.debug("prepared eth call found:", key);
579
+ const result = iface
580
+ .decodeFunctionResult("latestTimestamp", ret)
581
+ .toArray();
582
+ return result.length == 1 ? result[0] : result;
583
+ }
584
+ console.debug("missing eth call key:", "latestTimestamp", key);
585
+ }
332
586
  return await this.contract.getFunction("latestTimestamp()")(
333
587
  overrides || {}
334
588
  );
@@ -338,8 +592,30 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
338
592
  }
339
593
  }
340
594
 
341
- async owner(overrides?: Overrides): Promise<string> {
595
+ async owner(
596
+ overrides?: Overrides,
597
+ preparedData?: PreparedData,
598
+ ethCallContext?: EthCallContext
599
+ ): Promise<string> {
342
600
  try {
601
+ if (preparedData?.ethCallResults && ethCallContext) {
602
+ const iface = new Interface([
603
+ "function owner() view returns (address)",
604
+ ]);
605
+ const calldata = iface.encodeFunctionData("owner", []);
606
+ const key = makeEthCallKey({
607
+ context: ethCallContext,
608
+ calldata,
609
+ });
610
+ console.debug("looking up eth call key:", key);
611
+ const ret = preparedData.ethCallResults[key];
612
+ if (ret) {
613
+ console.debug("prepared eth call found:", key);
614
+ const result = iface.decodeFunctionResult("owner", ret).toArray();
615
+ return result.length == 1 ? result[0] : result;
616
+ }
617
+ console.debug("missing eth call key:", "owner", key);
618
+ }
343
619
  return await this.contract.getFunction("owner()")(overrides || {});
344
620
  } catch (e) {
345
621
  const stack = new Error().stack;
@@ -349,9 +625,31 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
349
625
 
350
626
  async phaseAggregators(
351
627
  arg0: BigNumberish,
352
- overrides?: Overrides
628
+ overrides?: Overrides,
629
+ preparedData?: PreparedData,
630
+ ethCallContext?: EthCallContext
353
631
  ): Promise<string> {
354
632
  try {
633
+ if (preparedData?.ethCallResults && ethCallContext) {
634
+ const iface = new Interface([
635
+ "function phaseAggregators(uint16) view returns (address)",
636
+ ]);
637
+ const calldata = iface.encodeFunctionData("phaseAggregators", [arg0]);
638
+ const key = makeEthCallKey({
639
+ context: ethCallContext,
640
+ calldata,
641
+ });
642
+ console.debug("looking up eth call key:", key);
643
+ const ret = preparedData.ethCallResults[key];
644
+ if (ret) {
645
+ console.debug("prepared eth call found:", key);
646
+ const result = iface
647
+ .decodeFunctionResult("phaseAggregators", ret)
648
+ .toArray();
649
+ return result.length == 1 ? result[0] : result;
650
+ }
651
+ console.debug("missing eth call key:", "phaseAggregators", arg0, key);
652
+ }
355
653
  return await this.contract.getFunction("phaseAggregators(uint16)")(
356
654
  arg0,
357
655
  overrides || {}
@@ -362,8 +660,30 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
362
660
  }
363
661
  }
364
662
 
365
- async phaseId(overrides?: Overrides): Promise<bigint> {
663
+ async phaseId(
664
+ overrides?: Overrides,
665
+ preparedData?: PreparedData,
666
+ ethCallContext?: EthCallContext
667
+ ): Promise<bigint> {
366
668
  try {
669
+ if (preparedData?.ethCallResults && ethCallContext) {
670
+ const iface = new Interface([
671
+ "function phaseId() view returns (uint16)",
672
+ ]);
673
+ const calldata = iface.encodeFunctionData("phaseId", []);
674
+ const key = makeEthCallKey({
675
+ context: ethCallContext,
676
+ calldata,
677
+ });
678
+ console.debug("looking up eth call key:", key);
679
+ const ret = preparedData.ethCallResults[key];
680
+ if (ret) {
681
+ console.debug("prepared eth call found:", key);
682
+ const result = iface.decodeFunctionResult("phaseId", ret).toArray();
683
+ return result.length == 1 ? result[0] : result;
684
+ }
685
+ console.debug("missing eth call key:", "phaseId", key);
686
+ }
367
687
  return await this.contract.getFunction("phaseId()")(overrides || {});
368
688
  } catch (e) {
369
689
  const stack = new Error().stack;
@@ -371,8 +691,32 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
371
691
  }
372
692
  }
373
693
 
374
- async proposedAggregator(overrides?: Overrides): Promise<string> {
694
+ async proposedAggregator(
695
+ overrides?: Overrides,
696
+ preparedData?: PreparedData,
697
+ ethCallContext?: EthCallContext
698
+ ): Promise<string> {
375
699
  try {
700
+ if (preparedData?.ethCallResults && ethCallContext) {
701
+ const iface = new Interface([
702
+ "function proposedAggregator() view returns (address)",
703
+ ]);
704
+ const calldata = iface.encodeFunctionData("proposedAggregator", []);
705
+ const key = makeEthCallKey({
706
+ context: ethCallContext,
707
+ calldata,
708
+ });
709
+ console.debug("looking up eth call key:", key);
710
+ const ret = preparedData.ethCallResults[key];
711
+ if (ret) {
712
+ console.debug("prepared eth call found:", key);
713
+ const result = iface
714
+ .decodeFunctionResult("proposedAggregator", ret)
715
+ .toArray();
716
+ return result.length == 1 ? result[0] : result;
717
+ }
718
+ console.debug("missing eth call key:", "proposedAggregator", key);
719
+ }
376
720
  return await this.contract.getFunction("proposedAggregator()")(
377
721
  overrides || {}
378
722
  );
@@ -384,7 +728,9 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
384
728
 
385
729
  async proposedGetRoundData(
386
730
  _roundId: BigNumberish,
387
- overrides?: Overrides
731
+ overrides?: Overrides,
732
+ preparedData?: PreparedData,
733
+ ethCallContext?: EthCallContext
388
734
  ): Promise<
389
735
  [bigint, bigint, bigint, bigint, bigint] & {
390
736
  roundId: bigint;
@@ -395,6 +741,33 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
395
741
  }
396
742
  > {
397
743
  try {
744
+ if (preparedData?.ethCallResults && ethCallContext) {
745
+ const iface = new Interface([
746
+ "function proposedGetRoundData(uint80) view returns (uint80,int256,uint256,uint256,uint80)",
747
+ ]);
748
+ const calldata = iface.encodeFunctionData("proposedGetRoundData", [
749
+ _roundId,
750
+ ]);
751
+ const key = makeEthCallKey({
752
+ context: ethCallContext,
753
+ calldata,
754
+ });
755
+ console.debug("looking up eth call key:", key);
756
+ const ret = preparedData.ethCallResults[key];
757
+ if (ret) {
758
+ console.debug("prepared eth call found:", key);
759
+ const result = iface
760
+ .decodeFunctionResult("proposedGetRoundData", ret)
761
+ .toArray();
762
+ return result.length == 1 ? result[0] : result;
763
+ }
764
+ console.debug(
765
+ "missing eth call key:",
766
+ "proposedGetRoundData",
767
+ _roundId,
768
+ key
769
+ );
770
+ }
398
771
  return await this.contract.getFunction("proposedGetRoundData(uint80)")(
399
772
  _roundId,
400
773
  overrides || {}
@@ -406,7 +779,9 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
406
779
  }
407
780
 
408
781
  async proposedLatestRoundData(
409
- overrides?: Overrides
782
+ overrides?: Overrides,
783
+ preparedData?: PreparedData,
784
+ ethCallContext?: EthCallContext
410
785
  ): Promise<
411
786
  [bigint, bigint, bigint, bigint, bigint] & {
412
787
  roundId: bigint;
@@ -417,6 +792,29 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
417
792
  }
418
793
  > {
419
794
  try {
795
+ if (preparedData?.ethCallResults && ethCallContext) {
796
+ const iface = new Interface([
797
+ "function proposedLatestRoundData() view returns (uint80,int256,uint256,uint256,uint80)",
798
+ ]);
799
+ const calldata = iface.encodeFunctionData(
800
+ "proposedLatestRoundData",
801
+ []
802
+ );
803
+ const key = makeEthCallKey({
804
+ context: ethCallContext,
805
+ calldata,
806
+ });
807
+ console.debug("looking up eth call key:", key);
808
+ const ret = preparedData.ethCallResults[key];
809
+ if (ret) {
810
+ console.debug("prepared eth call found:", key);
811
+ const result = iface
812
+ .decodeFunctionResult("proposedLatestRoundData", ret)
813
+ .toArray();
814
+ return result.length == 1 ? result[0] : result;
815
+ }
816
+ console.debug("missing eth call key:", "proposedLatestRoundData", key);
817
+ }
420
818
  return await this.contract.getFunction("proposedLatestRoundData()")(
421
819
  overrides || {}
422
820
  );
@@ -426,8 +824,30 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
426
824
  }
427
825
  }
428
826
 
429
- async version(overrides?: Overrides): Promise<bigint> {
827
+ async version(
828
+ overrides?: Overrides,
829
+ preparedData?: PreparedData,
830
+ ethCallContext?: EthCallContext
831
+ ): Promise<bigint> {
430
832
  try {
833
+ if (preparedData?.ethCallResults && ethCallContext) {
834
+ const iface = new Interface([
835
+ "function version() view returns (uint256)",
836
+ ]);
837
+ const calldata = iface.encodeFunctionData("version", []);
838
+ const key = makeEthCallKey({
839
+ context: ethCallContext,
840
+ calldata,
841
+ });
842
+ console.debug("looking up eth call key:", key);
843
+ const ret = preparedData.ethCallResults[key];
844
+ if (ret) {
845
+ console.debug("prepared eth call found:", key);
846
+ const result = iface.decodeFunctionResult("version", ret).toArray();
847
+ return result.length == 1 ? result[0] : result;
848
+ }
849
+ console.debug("missing eth call key:", "version", key);
850
+ }
431
851
  return await this.contract.getFunction("version()")(overrides || {});
432
852
  } catch (e) {
433
853
  const stack = new Error().stack;
@@ -438,8 +858,32 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
438
858
  callStatic = {
439
859
  contract: this.contract,
440
860
 
441
- async acceptOwnership(overrides?: Overrides): Promise<void> {
861
+ async acceptOwnership(
862
+ overrides?: Overrides,
863
+ preparedData?: PreparedData,
864
+ ethCallContext?: EthCallContext
865
+ ): Promise<void> {
442
866
  try {
867
+ if (preparedData?.ethCallResults && ethCallContext) {
868
+ const iface = new Interface([
869
+ "function acceptOwnership() nonpayable returns ()",
870
+ ]);
871
+ const calldata = iface.encodeFunctionData("acceptOwnership", []);
872
+ const key = makeEthCallKey({
873
+ context: ethCallContext,
874
+ calldata,
875
+ });
876
+ console.debug("looking up eth call key:", key);
877
+ const ret = preparedData.ethCallResults[key];
878
+ if (ret) {
879
+ console.debug("prepared eth call found:", key);
880
+ const result = iface
881
+ .decodeFunctionResult("acceptOwnership", ret)
882
+ .toArray();
883
+ return result.length == 1 ? result[0] : result;
884
+ }
885
+ console.debug("missing eth call key:", "acceptOwnership", key);
886
+ }
443
887
  return await this.contract
444
888
  .getFunction("acceptOwnership()")
445
889
  .staticCall(overrides || {});
@@ -450,9 +894,38 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
450
894
  },
451
895
  async confirmAggregator(
452
896
  _aggregator: string,
453
- overrides?: Overrides
897
+ overrides?: Overrides,
898
+ preparedData?: PreparedData,
899
+ ethCallContext?: EthCallContext
454
900
  ): Promise<void> {
455
901
  try {
902
+ if (preparedData?.ethCallResults && ethCallContext) {
903
+ const iface = new Interface([
904
+ "function confirmAggregator(address) nonpayable returns ()",
905
+ ]);
906
+ const calldata = iface.encodeFunctionData("confirmAggregator", [
907
+ _aggregator,
908
+ ]);
909
+ const key = makeEthCallKey({
910
+ context: ethCallContext,
911
+ calldata,
912
+ });
913
+ console.debug("looking up eth call key:", key);
914
+ const ret = preparedData.ethCallResults[key];
915
+ if (ret) {
916
+ console.debug("prepared eth call found:", key);
917
+ const result = iface
918
+ .decodeFunctionResult("confirmAggregator", ret)
919
+ .toArray();
920
+ return result.length == 1 ? result[0] : result;
921
+ }
922
+ console.debug(
923
+ "missing eth call key:",
924
+ "confirmAggregator",
925
+ _aggregator,
926
+ key
927
+ );
928
+ }
456
929
  return await this.contract
457
930
  .getFunction("confirmAggregator(address)")
458
931
  .staticCall(_aggregator, overrides || {});
@@ -463,9 +936,38 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
463
936
  },
464
937
  async proposeAggregator(
465
938
  _aggregator: string,
466
- overrides?: Overrides
939
+ overrides?: Overrides,
940
+ preparedData?: PreparedData,
941
+ ethCallContext?: EthCallContext
467
942
  ): Promise<void> {
468
943
  try {
944
+ if (preparedData?.ethCallResults && ethCallContext) {
945
+ const iface = new Interface([
946
+ "function proposeAggregator(address) nonpayable returns ()",
947
+ ]);
948
+ const calldata = iface.encodeFunctionData("proposeAggregator", [
949
+ _aggregator,
950
+ ]);
951
+ const key = makeEthCallKey({
952
+ context: ethCallContext,
953
+ calldata,
954
+ });
955
+ console.debug("looking up eth call key:", key);
956
+ const ret = preparedData.ethCallResults[key];
957
+ if (ret) {
958
+ console.debug("prepared eth call found:", key);
959
+ const result = iface
960
+ .decodeFunctionResult("proposeAggregator", ret)
961
+ .toArray();
962
+ return result.length == 1 ? result[0] : result;
963
+ }
964
+ console.debug(
965
+ "missing eth call key:",
966
+ "proposeAggregator",
967
+ _aggregator,
968
+ key
969
+ );
970
+ }
469
971
  return await this.contract
470
972
  .getFunction("proposeAggregator(address)")
471
973
  .staticCall(_aggregator, overrides || {});
@@ -476,9 +978,38 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
476
978
  },
477
979
  async setController(
478
980
  _accessController: string,
479
- overrides?: Overrides
981
+ overrides?: Overrides,
982
+ preparedData?: PreparedData,
983
+ ethCallContext?: EthCallContext
480
984
  ): Promise<void> {
481
985
  try {
986
+ if (preparedData?.ethCallResults && ethCallContext) {
987
+ const iface = new Interface([
988
+ "function setController(address) nonpayable returns ()",
989
+ ]);
990
+ const calldata = iface.encodeFunctionData("setController", [
991
+ _accessController,
992
+ ]);
993
+ const key = makeEthCallKey({
994
+ context: ethCallContext,
995
+ calldata,
996
+ });
997
+ console.debug("looking up eth call key:", key);
998
+ const ret = preparedData.ethCallResults[key];
999
+ if (ret) {
1000
+ console.debug("prepared eth call found:", key);
1001
+ const result = iface
1002
+ .decodeFunctionResult("setController", ret)
1003
+ .toArray();
1004
+ return result.length == 1 ? result[0] : result;
1005
+ }
1006
+ console.debug(
1007
+ "missing eth call key:",
1008
+ "setController",
1009
+ _accessController,
1010
+ key
1011
+ );
1012
+ }
482
1013
  return await this.contract
483
1014
  .getFunction("setController(address)")
484
1015
  .staticCall(_accessController, overrides || {});
@@ -487,8 +1018,33 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
487
1018
  throw transformEtherError(e, undefined, stack);
488
1019
  }
489
1020
  },
490
- async transferOwnership(_to: string, overrides?: Overrides): Promise<void> {
1021
+ async transferOwnership(
1022
+ _to: string,
1023
+ overrides?: Overrides,
1024
+ preparedData?: PreparedData,
1025
+ ethCallContext?: EthCallContext
1026
+ ): Promise<void> {
491
1027
  try {
1028
+ if (preparedData?.ethCallResults && ethCallContext) {
1029
+ const iface = new Interface([
1030
+ "function transferOwnership(address) nonpayable returns ()",
1031
+ ]);
1032
+ const calldata = iface.encodeFunctionData("transferOwnership", [_to]);
1033
+ const key = makeEthCallKey({
1034
+ context: ethCallContext,
1035
+ calldata,
1036
+ });
1037
+ console.debug("looking up eth call key:", key);
1038
+ const ret = preparedData.ethCallResults[key];
1039
+ if (ret) {
1040
+ console.debug("prepared eth call found:", key);
1041
+ const result = iface
1042
+ .decodeFunctionResult("transferOwnership", ret)
1043
+ .toArray();
1044
+ return result.length == 1 ? result[0] : result;
1045
+ }
1046
+ console.debug("missing eth call key:", "transferOwnership", _to, key);
1047
+ }
492
1048
  return await this.contract
493
1049
  .getFunction("transferOwnership(address)")
494
1050
  .staticCall(_to, overrides || {});
@@ -498,6 +1054,346 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
498
1054
  }
499
1055
  },
500
1056
  };
1057
+
1058
+ encodeCall = {
1059
+ acceptOwnership(ethCallContext: EthCallContext): EthCallParam {
1060
+ try {
1061
+ const iface = new Interface(["function acceptOwnership()"]);
1062
+ const calldata = iface.encodeFunctionData("acceptOwnership", []);
1063
+ return {
1064
+ context: ethCallContext,
1065
+ calldata,
1066
+ };
1067
+ } catch (e) {
1068
+ const stack = new Error().stack;
1069
+ throw transformEtherError(e, undefined, stack);
1070
+ }
1071
+ },
1072
+ accessController(ethCallContext: EthCallContext): EthCallParam {
1073
+ try {
1074
+ const iface = new Interface(["function accessController()"]);
1075
+ const calldata = iface.encodeFunctionData("accessController", []);
1076
+ return {
1077
+ context: ethCallContext,
1078
+ calldata,
1079
+ };
1080
+ } catch (e) {
1081
+ const stack = new Error().stack;
1082
+ throw transformEtherError(e, undefined, stack);
1083
+ }
1084
+ },
1085
+ aggregator(ethCallContext: EthCallContext): EthCallParam {
1086
+ try {
1087
+ const iface = new Interface(["function aggregator()"]);
1088
+ const calldata = iface.encodeFunctionData("aggregator", []);
1089
+ return {
1090
+ context: ethCallContext,
1091
+ calldata,
1092
+ };
1093
+ } catch (e) {
1094
+ const stack = new Error().stack;
1095
+ throw transformEtherError(e, undefined, stack);
1096
+ }
1097
+ },
1098
+ confirmAggregator(
1099
+ _aggregator: string,
1100
+ ethCallContext: EthCallContext
1101
+ ): EthCallParam {
1102
+ try {
1103
+ const iface = new Interface(["function confirmAggregator(address)"]);
1104
+ const calldata = iface.encodeFunctionData("confirmAggregator", [
1105
+ _aggregator,
1106
+ ]);
1107
+ return {
1108
+ context: ethCallContext,
1109
+ calldata,
1110
+ };
1111
+ } catch (e) {
1112
+ const stack = new Error().stack;
1113
+ throw transformEtherError(e, undefined, stack);
1114
+ }
1115
+ },
1116
+ decimals(ethCallContext: EthCallContext): EthCallParam {
1117
+ try {
1118
+ const iface = new Interface(["function decimals()"]);
1119
+ const calldata = iface.encodeFunctionData("decimals", []);
1120
+ return {
1121
+ context: ethCallContext,
1122
+ calldata,
1123
+ };
1124
+ } catch (e) {
1125
+ const stack = new Error().stack;
1126
+ throw transformEtherError(e, undefined, stack);
1127
+ }
1128
+ },
1129
+ description(ethCallContext: EthCallContext): EthCallParam {
1130
+ try {
1131
+ const iface = new Interface(["function description()"]);
1132
+ const calldata = iface.encodeFunctionData("description", []);
1133
+ return {
1134
+ context: ethCallContext,
1135
+ calldata,
1136
+ };
1137
+ } catch (e) {
1138
+ const stack = new Error().stack;
1139
+ throw transformEtherError(e, undefined, stack);
1140
+ }
1141
+ },
1142
+ getAnswer(
1143
+ _roundId: BigNumberish,
1144
+ ethCallContext: EthCallContext
1145
+ ): EthCallParam {
1146
+ try {
1147
+ const iface = new Interface(["function getAnswer(uint256)"]);
1148
+ const calldata = iface.encodeFunctionData("getAnswer", [_roundId]);
1149
+ return {
1150
+ context: ethCallContext,
1151
+ calldata,
1152
+ };
1153
+ } catch (e) {
1154
+ const stack = new Error().stack;
1155
+ throw transformEtherError(e, undefined, stack);
1156
+ }
1157
+ },
1158
+ getRoundData(
1159
+ _roundId: BigNumberish,
1160
+ ethCallContext: EthCallContext
1161
+ ): EthCallParam {
1162
+ try {
1163
+ const iface = new Interface(["function getRoundData(uint80)"]);
1164
+ const calldata = iface.encodeFunctionData("getRoundData", [_roundId]);
1165
+ return {
1166
+ context: ethCallContext,
1167
+ calldata,
1168
+ };
1169
+ } catch (e) {
1170
+ const stack = new Error().stack;
1171
+ throw transformEtherError(e, undefined, stack);
1172
+ }
1173
+ },
1174
+ getTimestamp(
1175
+ _roundId: BigNumberish,
1176
+ ethCallContext: EthCallContext
1177
+ ): EthCallParam {
1178
+ try {
1179
+ const iface = new Interface(["function getTimestamp(uint256)"]);
1180
+ const calldata = iface.encodeFunctionData("getTimestamp", [_roundId]);
1181
+ return {
1182
+ context: ethCallContext,
1183
+ calldata,
1184
+ };
1185
+ } catch (e) {
1186
+ const stack = new Error().stack;
1187
+ throw transformEtherError(e, undefined, stack);
1188
+ }
1189
+ },
1190
+ latestAnswer(ethCallContext: EthCallContext): EthCallParam {
1191
+ try {
1192
+ const iface = new Interface(["function latestAnswer()"]);
1193
+ const calldata = iface.encodeFunctionData("latestAnswer", []);
1194
+ return {
1195
+ context: ethCallContext,
1196
+ calldata,
1197
+ };
1198
+ } catch (e) {
1199
+ const stack = new Error().stack;
1200
+ throw transformEtherError(e, undefined, stack);
1201
+ }
1202
+ },
1203
+ latestRound(ethCallContext: EthCallContext): EthCallParam {
1204
+ try {
1205
+ const iface = new Interface(["function latestRound()"]);
1206
+ const calldata = iface.encodeFunctionData("latestRound", []);
1207
+ return {
1208
+ context: ethCallContext,
1209
+ calldata,
1210
+ };
1211
+ } catch (e) {
1212
+ const stack = new Error().stack;
1213
+ throw transformEtherError(e, undefined, stack);
1214
+ }
1215
+ },
1216
+ latestRoundData(ethCallContext: EthCallContext): EthCallParam {
1217
+ try {
1218
+ const iface = new Interface(["function latestRoundData()"]);
1219
+ const calldata = iface.encodeFunctionData("latestRoundData", []);
1220
+ return {
1221
+ context: ethCallContext,
1222
+ calldata,
1223
+ };
1224
+ } catch (e) {
1225
+ const stack = new Error().stack;
1226
+ throw transformEtherError(e, undefined, stack);
1227
+ }
1228
+ },
1229
+ latestTimestamp(ethCallContext: EthCallContext): EthCallParam {
1230
+ try {
1231
+ const iface = new Interface(["function latestTimestamp()"]);
1232
+ const calldata = iface.encodeFunctionData("latestTimestamp", []);
1233
+ return {
1234
+ context: ethCallContext,
1235
+ calldata,
1236
+ };
1237
+ } catch (e) {
1238
+ const stack = new Error().stack;
1239
+ throw transformEtherError(e, undefined, stack);
1240
+ }
1241
+ },
1242
+ owner(ethCallContext: EthCallContext): EthCallParam {
1243
+ try {
1244
+ const iface = new Interface(["function owner()"]);
1245
+ const calldata = iface.encodeFunctionData("owner", []);
1246
+ return {
1247
+ context: ethCallContext,
1248
+ calldata,
1249
+ };
1250
+ } catch (e) {
1251
+ const stack = new Error().stack;
1252
+ throw transformEtherError(e, undefined, stack);
1253
+ }
1254
+ },
1255
+ phaseAggregators(
1256
+ arg0: BigNumberish,
1257
+ ethCallContext: EthCallContext
1258
+ ): EthCallParam {
1259
+ try {
1260
+ const iface = new Interface(["function phaseAggregators(uint16)"]);
1261
+ const calldata = iface.encodeFunctionData("phaseAggregators", [arg0]);
1262
+ return {
1263
+ context: ethCallContext,
1264
+ calldata,
1265
+ };
1266
+ } catch (e) {
1267
+ const stack = new Error().stack;
1268
+ throw transformEtherError(e, undefined, stack);
1269
+ }
1270
+ },
1271
+ phaseId(ethCallContext: EthCallContext): EthCallParam {
1272
+ try {
1273
+ const iface = new Interface(["function phaseId()"]);
1274
+ const calldata = iface.encodeFunctionData("phaseId", []);
1275
+ return {
1276
+ context: ethCallContext,
1277
+ calldata,
1278
+ };
1279
+ } catch (e) {
1280
+ const stack = new Error().stack;
1281
+ throw transformEtherError(e, undefined, stack);
1282
+ }
1283
+ },
1284
+ proposeAggregator(
1285
+ _aggregator: string,
1286
+ ethCallContext: EthCallContext
1287
+ ): EthCallParam {
1288
+ try {
1289
+ const iface = new Interface(["function proposeAggregator(address)"]);
1290
+ const calldata = iface.encodeFunctionData("proposeAggregator", [
1291
+ _aggregator,
1292
+ ]);
1293
+ return {
1294
+ context: ethCallContext,
1295
+ calldata,
1296
+ };
1297
+ } catch (e) {
1298
+ const stack = new Error().stack;
1299
+ throw transformEtherError(e, undefined, stack);
1300
+ }
1301
+ },
1302
+ proposedAggregator(ethCallContext: EthCallContext): EthCallParam {
1303
+ try {
1304
+ const iface = new Interface(["function proposedAggregator()"]);
1305
+ const calldata = iface.encodeFunctionData("proposedAggregator", []);
1306
+ return {
1307
+ context: ethCallContext,
1308
+ calldata,
1309
+ };
1310
+ } catch (e) {
1311
+ const stack = new Error().stack;
1312
+ throw transformEtherError(e, undefined, stack);
1313
+ }
1314
+ },
1315
+ proposedGetRoundData(
1316
+ _roundId: BigNumberish,
1317
+ ethCallContext: EthCallContext
1318
+ ): EthCallParam {
1319
+ try {
1320
+ const iface = new Interface(["function proposedGetRoundData(uint80)"]);
1321
+ const calldata = iface.encodeFunctionData("proposedGetRoundData", [
1322
+ _roundId,
1323
+ ]);
1324
+ return {
1325
+ context: ethCallContext,
1326
+ calldata,
1327
+ };
1328
+ } catch (e) {
1329
+ const stack = new Error().stack;
1330
+ throw transformEtherError(e, undefined, stack);
1331
+ }
1332
+ },
1333
+ proposedLatestRoundData(ethCallContext: EthCallContext): EthCallParam {
1334
+ try {
1335
+ const iface = new Interface(["function proposedLatestRoundData()"]);
1336
+ const calldata = iface.encodeFunctionData(
1337
+ "proposedLatestRoundData",
1338
+ []
1339
+ );
1340
+ return {
1341
+ context: ethCallContext,
1342
+ calldata,
1343
+ };
1344
+ } catch (e) {
1345
+ const stack = new Error().stack;
1346
+ throw transformEtherError(e, undefined, stack);
1347
+ }
1348
+ },
1349
+ setController(
1350
+ _accessController: string,
1351
+ ethCallContext: EthCallContext
1352
+ ): EthCallParam {
1353
+ try {
1354
+ const iface = new Interface(["function setController(address)"]);
1355
+ const calldata = iface.encodeFunctionData("setController", [
1356
+ _accessController,
1357
+ ]);
1358
+ return {
1359
+ context: ethCallContext,
1360
+ calldata,
1361
+ };
1362
+ } catch (e) {
1363
+ const stack = new Error().stack;
1364
+ throw transformEtherError(e, undefined, stack);
1365
+ }
1366
+ },
1367
+ transferOwnership(
1368
+ _to: string,
1369
+ ethCallContext: EthCallContext
1370
+ ): EthCallParam {
1371
+ try {
1372
+ const iface = new Interface(["function transferOwnership(address)"]);
1373
+ const calldata = iface.encodeFunctionData("transferOwnership", [_to]);
1374
+ return {
1375
+ context: ethCallContext,
1376
+ calldata,
1377
+ };
1378
+ } catch (e) {
1379
+ const stack = new Error().stack;
1380
+ throw transformEtherError(e, undefined, stack);
1381
+ }
1382
+ },
1383
+ version(ethCallContext: EthCallContext): EthCallParam {
1384
+ try {
1385
+ const iface = new Interface(["function version()"]);
1386
+ const calldata = iface.encodeFunctionData("version", []);
1387
+ return {
1388
+ context: ethCallContext,
1389
+ calldata,
1390
+ };
1391
+ } catch (e) {
1392
+ const stack = new Error().stack;
1393
+ throw transformEtherError(e, undefined, stack);
1394
+ }
1395
+ },
1396
+ };
501
1397
  }
502
1398
 
503
1399
  export class EACAggregatorProxyBoundContractView extends BoundContractView<
@@ -505,41 +1401,87 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
505
1401
  EACAggregatorProxyContractView
506
1402
  > {
507
1403
  async accessController(overrides?: Overrides): Promise<string> {
508
- return await this.view.accessController({
509
- blockTag: this.context.blockNumber,
510
- ...overrides,
511
- });
1404
+ const ethCallContext = {
1405
+ chainId: this.context.chainId,
1406
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1407
+ address: this.context.address,
1408
+ };
1409
+ return await this.view.accessController(
1410
+ {
1411
+ blockTag: this.context.blockNumber,
1412
+ ...overrides,
1413
+ },
1414
+ this.context.preparedData,
1415
+ ethCallContext
1416
+ );
512
1417
  }
513
1418
 
514
1419
  async aggregator(overrides?: Overrides): Promise<string> {
515
- return await this.view.aggregator({
516
- blockTag: this.context.blockNumber,
517
- ...overrides,
518
- });
1420
+ const ethCallContext = {
1421
+ chainId: this.context.chainId,
1422
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1423
+ address: this.context.address,
1424
+ };
1425
+ return await this.view.aggregator(
1426
+ {
1427
+ blockTag: this.context.blockNumber,
1428
+ ...overrides,
1429
+ },
1430
+ this.context.preparedData,
1431
+ ethCallContext
1432
+ );
519
1433
  }
520
1434
 
521
1435
  async decimals(overrides?: Overrides): Promise<bigint> {
522
- return await this.view.decimals({
523
- blockTag: this.context.blockNumber,
524
- ...overrides,
525
- });
1436
+ const ethCallContext = {
1437
+ chainId: this.context.chainId,
1438
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1439
+ address: this.context.address,
1440
+ };
1441
+ return await this.view.decimals(
1442
+ {
1443
+ blockTag: this.context.blockNumber,
1444
+ ...overrides,
1445
+ },
1446
+ this.context.preparedData,
1447
+ ethCallContext
1448
+ );
526
1449
  }
527
1450
 
528
1451
  async description(overrides?: Overrides): Promise<string> {
529
- return await this.view.description({
530
- blockTag: this.context.blockNumber,
531
- ...overrides,
532
- });
1452
+ const ethCallContext = {
1453
+ chainId: this.context.chainId,
1454
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1455
+ address: this.context.address,
1456
+ };
1457
+ return await this.view.description(
1458
+ {
1459
+ blockTag: this.context.blockNumber,
1460
+ ...overrides,
1461
+ },
1462
+ this.context.preparedData,
1463
+ ethCallContext
1464
+ );
533
1465
  }
534
1466
 
535
1467
  async getAnswer(
536
1468
  _roundId: BigNumberish,
537
1469
  overrides?: Overrides
538
1470
  ): Promise<bigint> {
539
- return await this.view.getAnswer(_roundId, {
540
- blockTag: this.context.blockNumber,
541
- ...overrides,
542
- });
1471
+ const ethCallContext = {
1472
+ chainId: this.context.chainId,
1473
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1474
+ address: this.context.address,
1475
+ };
1476
+ return await this.view.getAnswer(
1477
+ _roundId,
1478
+ {
1479
+ blockTag: this.context.blockNumber,
1480
+ ...overrides,
1481
+ },
1482
+ this.context.preparedData,
1483
+ ethCallContext
1484
+ );
543
1485
  }
544
1486
 
545
1487
  async getRoundData(
@@ -554,34 +1496,72 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
554
1496
  answeredInRound: bigint;
555
1497
  }
556
1498
  > {
557
- return await this.view.getRoundData(_roundId, {
558
- blockTag: this.context.blockNumber,
559
- ...overrides,
560
- });
1499
+ const ethCallContext = {
1500
+ chainId: this.context.chainId,
1501
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1502
+ address: this.context.address,
1503
+ };
1504
+ return await this.view.getRoundData(
1505
+ _roundId,
1506
+ {
1507
+ blockTag: this.context.blockNumber,
1508
+ ...overrides,
1509
+ },
1510
+ this.context.preparedData,
1511
+ ethCallContext
1512
+ );
561
1513
  }
562
1514
 
563
1515
  async getTimestamp(
564
1516
  _roundId: BigNumberish,
565
1517
  overrides?: Overrides
566
1518
  ): Promise<bigint> {
567
- return await this.view.getTimestamp(_roundId, {
568
- blockTag: this.context.blockNumber,
569
- ...overrides,
570
- });
1519
+ const ethCallContext = {
1520
+ chainId: this.context.chainId,
1521
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1522
+ address: this.context.address,
1523
+ };
1524
+ return await this.view.getTimestamp(
1525
+ _roundId,
1526
+ {
1527
+ blockTag: this.context.blockNumber,
1528
+ ...overrides,
1529
+ },
1530
+ this.context.preparedData,
1531
+ ethCallContext
1532
+ );
571
1533
  }
572
1534
 
573
1535
  async latestAnswer(overrides?: Overrides): Promise<bigint> {
574
- return await this.view.latestAnswer({
575
- blockTag: this.context.blockNumber,
576
- ...overrides,
577
- });
1536
+ const ethCallContext = {
1537
+ chainId: this.context.chainId,
1538
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1539
+ address: this.context.address,
1540
+ };
1541
+ return await this.view.latestAnswer(
1542
+ {
1543
+ blockTag: this.context.blockNumber,
1544
+ ...overrides,
1545
+ },
1546
+ this.context.preparedData,
1547
+ ethCallContext
1548
+ );
578
1549
  }
579
1550
 
580
1551
  async latestRound(overrides?: Overrides): Promise<bigint> {
581
- return await this.view.latestRound({
582
- blockTag: this.context.blockNumber,
583
- ...overrides,
584
- });
1552
+ const ethCallContext = {
1553
+ chainId: this.context.chainId,
1554
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1555
+ address: this.context.address,
1556
+ };
1557
+ return await this.view.latestRound(
1558
+ {
1559
+ blockTag: this.context.blockNumber,
1560
+ ...overrides,
1561
+ },
1562
+ this.context.preparedData,
1563
+ ethCallContext
1564
+ );
585
1565
  }
586
1566
 
587
1567
  async latestRoundData(
@@ -595,48 +1575,103 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
595
1575
  answeredInRound: bigint;
596
1576
  }
597
1577
  > {
598
- return await this.view.latestRoundData({
599
- blockTag: this.context.blockNumber,
600
- ...overrides,
601
- });
1578
+ const ethCallContext = {
1579
+ chainId: this.context.chainId,
1580
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1581
+ address: this.context.address,
1582
+ };
1583
+ return await this.view.latestRoundData(
1584
+ {
1585
+ blockTag: this.context.blockNumber,
1586
+ ...overrides,
1587
+ },
1588
+ this.context.preparedData,
1589
+ ethCallContext
1590
+ );
602
1591
  }
603
1592
 
604
1593
  async latestTimestamp(overrides?: Overrides): Promise<bigint> {
605
- return await this.view.latestTimestamp({
606
- blockTag: this.context.blockNumber,
607
- ...overrides,
608
- });
1594
+ const ethCallContext = {
1595
+ chainId: this.context.chainId,
1596
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1597
+ address: this.context.address,
1598
+ };
1599
+ return await this.view.latestTimestamp(
1600
+ {
1601
+ blockTag: this.context.blockNumber,
1602
+ ...overrides,
1603
+ },
1604
+ this.context.preparedData,
1605
+ ethCallContext
1606
+ );
609
1607
  }
610
1608
 
611
1609
  async owner(overrides?: Overrides): Promise<string> {
612
- return await this.view.owner({
613
- blockTag: this.context.blockNumber,
614
- ...overrides,
615
- });
1610
+ const ethCallContext = {
1611
+ chainId: this.context.chainId,
1612
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1613
+ address: this.context.address,
1614
+ };
1615
+ return await this.view.owner(
1616
+ {
1617
+ blockTag: this.context.blockNumber,
1618
+ ...overrides,
1619
+ },
1620
+ this.context.preparedData,
1621
+ ethCallContext
1622
+ );
616
1623
  }
617
1624
 
618
1625
  async phaseAggregators(
619
1626
  arg0: BigNumberish,
620
1627
  overrides?: Overrides
621
1628
  ): Promise<string> {
622
- return await this.view.phaseAggregators(arg0, {
623
- blockTag: this.context.blockNumber,
624
- ...overrides,
625
- });
1629
+ const ethCallContext = {
1630
+ chainId: this.context.chainId,
1631
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1632
+ address: this.context.address,
1633
+ };
1634
+ return await this.view.phaseAggregators(
1635
+ arg0,
1636
+ {
1637
+ blockTag: this.context.blockNumber,
1638
+ ...overrides,
1639
+ },
1640
+ this.context.preparedData,
1641
+ ethCallContext
1642
+ );
626
1643
  }
627
1644
 
628
1645
  async phaseId(overrides?: Overrides): Promise<bigint> {
629
- return await this.view.phaseId({
630
- blockTag: this.context.blockNumber,
631
- ...overrides,
632
- });
1646
+ const ethCallContext = {
1647
+ chainId: this.context.chainId,
1648
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1649
+ address: this.context.address,
1650
+ };
1651
+ return await this.view.phaseId(
1652
+ {
1653
+ blockTag: this.context.blockNumber,
1654
+ ...overrides,
1655
+ },
1656
+ this.context.preparedData,
1657
+ ethCallContext
1658
+ );
633
1659
  }
634
1660
 
635
1661
  async proposedAggregator(overrides?: Overrides): Promise<string> {
636
- return await this.view.proposedAggregator({
637
- blockTag: this.context.blockNumber,
638
- ...overrides,
639
- });
1662
+ const ethCallContext = {
1663
+ chainId: this.context.chainId,
1664
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1665
+ address: this.context.address,
1666
+ };
1667
+ return await this.view.proposedAggregator(
1668
+ {
1669
+ blockTag: this.context.blockNumber,
1670
+ ...overrides,
1671
+ },
1672
+ this.context.preparedData,
1673
+ ethCallContext
1674
+ );
640
1675
  }
641
1676
 
642
1677
  async proposedGetRoundData(
@@ -651,10 +1686,20 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
651
1686
  answeredInRound: bigint;
652
1687
  }
653
1688
  > {
654
- return await this.view.proposedGetRoundData(_roundId, {
655
- blockTag: this.context.blockNumber,
656
- ...overrides,
657
- });
1689
+ const ethCallContext = {
1690
+ chainId: this.context.chainId,
1691
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1692
+ address: this.context.address,
1693
+ };
1694
+ return await this.view.proposedGetRoundData(
1695
+ _roundId,
1696
+ {
1697
+ blockTag: this.context.blockNumber,
1698
+ ...overrides,
1699
+ },
1700
+ this.context.preparedData,
1701
+ ethCallContext
1702
+ );
658
1703
  }
659
1704
 
660
1705
  async proposedLatestRoundData(
@@ -668,17 +1713,35 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
668
1713
  answeredInRound: bigint;
669
1714
  }
670
1715
  > {
671
- return await this.view.proposedLatestRoundData({
672
- blockTag: this.context.blockNumber,
673
- ...overrides,
674
- });
1716
+ const ethCallContext = {
1717
+ chainId: this.context.chainId,
1718
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1719
+ address: this.context.address,
1720
+ };
1721
+ return await this.view.proposedLatestRoundData(
1722
+ {
1723
+ blockTag: this.context.blockNumber,
1724
+ ...overrides,
1725
+ },
1726
+ this.context.preparedData,
1727
+ ethCallContext
1728
+ );
675
1729
  }
676
1730
 
677
1731
  async version(overrides?: Overrides): Promise<bigint> {
678
- return await this.view.version({
679
- blockTag: this.context.blockNumber,
680
- ...overrides,
681
- });
1732
+ const ethCallContext = {
1733
+ chainId: this.context.chainId,
1734
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1735
+ address: this.context.address,
1736
+ };
1737
+ return await this.view.version(
1738
+ {
1739
+ blockTag: this.context.blockNumber,
1740
+ ...overrides,
1741
+ },
1742
+ this.context.preparedData,
1743
+ ethCallContext
1744
+ );
682
1745
  }
683
1746
 
684
1747
  callStatic = {
@@ -686,44 +1749,493 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
686
1749
  context: this.context,
687
1750
 
688
1751
  async acceptOwnership(overrides?: Overrides): Promise<void> {
689
- return await this.view.callStatic.acceptOwnership({
690
- blockTag: this.context.blockNumber,
691
- ...overrides,
692
- });
1752
+ const ethCallContext = {
1753
+ chainId: this.context.chainId,
1754
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1755
+ address: this.context.address,
1756
+ };
1757
+ return await this.view.callStatic.acceptOwnership(
1758
+ {
1759
+ blockTag: this.context.blockNumber,
1760
+ ...overrides,
1761
+ },
1762
+ this.context.preparedData,
1763
+ ethCallContext
1764
+ );
693
1765
  },
694
1766
  async confirmAggregator(
695
1767
  _aggregator: string,
696
1768
  overrides?: Overrides
697
1769
  ): Promise<void> {
698
- return await this.view.callStatic.confirmAggregator(_aggregator, {
699
- blockTag: this.context.blockNumber,
700
- ...overrides,
701
- });
1770
+ const ethCallContext = {
1771
+ chainId: this.context.chainId,
1772
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1773
+ address: this.context.address,
1774
+ };
1775
+ return await this.view.callStatic.confirmAggregator(
1776
+ _aggregator,
1777
+ {
1778
+ blockTag: this.context.blockNumber,
1779
+ ...overrides,
1780
+ },
1781
+ this.context.preparedData,
1782
+ ethCallContext
1783
+ );
702
1784
  },
703
1785
  async proposeAggregator(
704
1786
  _aggregator: string,
705
1787
  overrides?: Overrides
706
1788
  ): Promise<void> {
707
- return await this.view.callStatic.proposeAggregator(_aggregator, {
708
- blockTag: this.context.blockNumber,
709
- ...overrides,
710
- });
1789
+ const ethCallContext = {
1790
+ chainId: this.context.chainId,
1791
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1792
+ address: this.context.address,
1793
+ };
1794
+ return await this.view.callStatic.proposeAggregator(
1795
+ _aggregator,
1796
+ {
1797
+ blockTag: this.context.blockNumber,
1798
+ ...overrides,
1799
+ },
1800
+ this.context.preparedData,
1801
+ ethCallContext
1802
+ );
711
1803
  },
712
1804
  async setController(
713
1805
  _accessController: string,
714
1806
  overrides?: Overrides
715
1807
  ): Promise<void> {
716
- return await this.view.callStatic.setController(_accessController, {
717
- blockTag: this.context.blockNumber,
718
- ...overrides,
719
- });
1808
+ const ethCallContext = {
1809
+ chainId: this.context.chainId,
1810
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1811
+ address: this.context.address,
1812
+ };
1813
+ return await this.view.callStatic.setController(
1814
+ _accessController,
1815
+ {
1816
+ blockTag: this.context.blockNumber,
1817
+ ...overrides,
1818
+ },
1819
+ this.context.preparedData,
1820
+ ethCallContext
1821
+ );
720
1822
  },
721
1823
  async transferOwnership(_to: string, overrides?: Overrides): Promise<void> {
722
- return await this.view.callStatic.transferOwnership(_to, {
723
- blockTag: this.context.blockNumber,
724
- ...overrides,
1824
+ const ethCallContext = {
1825
+ chainId: this.context.chainId,
1826
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1827
+ address: this.context.address,
1828
+ };
1829
+ return await this.view.callStatic.transferOwnership(
1830
+ _to,
1831
+ {
1832
+ blockTag: this.context.blockNumber,
1833
+ ...overrides,
1834
+ },
1835
+ this.context.preparedData,
1836
+ ethCallContext
1837
+ );
1838
+ },
1839
+ };
1840
+
1841
+ encodeCall = {
1842
+ view: this.view,
1843
+ context: this.context,
1844
+
1845
+ acceptOwnership(overrides?: Overrides): EthCallParam {
1846
+ const chainId =
1847
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
1848
+ const address = this.context.address;
1849
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1850
+ if (overrides?.blockTag) {
1851
+ blockTag =
1852
+ typeof overrides.blockTag == "string"
1853
+ ? overrides.blockTag
1854
+ : "0x" + overrides.blockTag.toString(16);
1855
+ }
1856
+
1857
+ return this.view.encodeCall.acceptOwnership({
1858
+ chainId,
1859
+ address,
1860
+ blockTag,
1861
+ });
1862
+ },
1863
+ accessController(overrides?: Overrides): EthCallParam {
1864
+ const chainId =
1865
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
1866
+ const address = this.context.address;
1867
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1868
+ if (overrides?.blockTag) {
1869
+ blockTag =
1870
+ typeof overrides.blockTag == "string"
1871
+ ? overrides.blockTag
1872
+ : "0x" + overrides.blockTag.toString(16);
1873
+ }
1874
+
1875
+ return this.view.encodeCall.accessController({
1876
+ chainId,
1877
+ address,
1878
+ blockTag,
1879
+ });
1880
+ },
1881
+ aggregator(overrides?: Overrides): EthCallParam {
1882
+ const chainId =
1883
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
1884
+ const address = this.context.address;
1885
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1886
+ if (overrides?.blockTag) {
1887
+ blockTag =
1888
+ typeof overrides.blockTag == "string"
1889
+ ? overrides.blockTag
1890
+ : "0x" + overrides.blockTag.toString(16);
1891
+ }
1892
+
1893
+ return this.view.encodeCall.aggregator({ chainId, address, blockTag });
1894
+ },
1895
+ confirmAggregator(
1896
+ _aggregator: string,
1897
+ overrides?: Overrides
1898
+ ): EthCallParam {
1899
+ const chainId =
1900
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
1901
+ const address = this.context.address;
1902
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1903
+ if (overrides?.blockTag) {
1904
+ blockTag =
1905
+ typeof overrides.blockTag == "string"
1906
+ ? overrides.blockTag
1907
+ : "0x" + overrides.blockTag.toString(16);
1908
+ }
1909
+
1910
+ return this.view.encodeCall.confirmAggregator(_aggregator, {
1911
+ chainId,
1912
+ address,
1913
+ blockTag,
1914
+ });
1915
+ },
1916
+ decimals(overrides?: Overrides): EthCallParam {
1917
+ const chainId =
1918
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
1919
+ const address = this.context.address;
1920
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1921
+ if (overrides?.blockTag) {
1922
+ blockTag =
1923
+ typeof overrides.blockTag == "string"
1924
+ ? overrides.blockTag
1925
+ : "0x" + overrides.blockTag.toString(16);
1926
+ }
1927
+
1928
+ return this.view.encodeCall.decimals({ chainId, address, blockTag });
1929
+ },
1930
+ description(overrides?: Overrides): EthCallParam {
1931
+ const chainId =
1932
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
1933
+ const address = this.context.address;
1934
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1935
+ if (overrides?.blockTag) {
1936
+ blockTag =
1937
+ typeof overrides.blockTag == "string"
1938
+ ? overrides.blockTag
1939
+ : "0x" + overrides.blockTag.toString(16);
1940
+ }
1941
+
1942
+ return this.view.encodeCall.description({ chainId, address, blockTag });
1943
+ },
1944
+ getAnswer(_roundId: BigNumberish, overrides?: Overrides): EthCallParam {
1945
+ const chainId =
1946
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
1947
+ const address = this.context.address;
1948
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1949
+ if (overrides?.blockTag) {
1950
+ blockTag =
1951
+ typeof overrides.blockTag == "string"
1952
+ ? overrides.blockTag
1953
+ : "0x" + overrides.blockTag.toString(16);
1954
+ }
1955
+
1956
+ return this.view.encodeCall.getAnswer(_roundId, {
1957
+ chainId,
1958
+ address,
1959
+ blockTag,
725
1960
  });
726
1961
  },
1962
+ getRoundData(_roundId: BigNumberish, overrides?: Overrides): EthCallParam {
1963
+ const chainId =
1964
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
1965
+ const address = this.context.address;
1966
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1967
+ if (overrides?.blockTag) {
1968
+ blockTag =
1969
+ typeof overrides.blockTag == "string"
1970
+ ? overrides.blockTag
1971
+ : "0x" + overrides.blockTag.toString(16);
1972
+ }
1973
+
1974
+ return this.view.encodeCall.getRoundData(_roundId, {
1975
+ chainId,
1976
+ address,
1977
+ blockTag,
1978
+ });
1979
+ },
1980
+ getTimestamp(_roundId: BigNumberish, overrides?: Overrides): EthCallParam {
1981
+ const chainId =
1982
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
1983
+ const address = this.context.address;
1984
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1985
+ if (overrides?.blockTag) {
1986
+ blockTag =
1987
+ typeof overrides.blockTag == "string"
1988
+ ? overrides.blockTag
1989
+ : "0x" + overrides.blockTag.toString(16);
1990
+ }
1991
+
1992
+ return this.view.encodeCall.getTimestamp(_roundId, {
1993
+ chainId,
1994
+ address,
1995
+ blockTag,
1996
+ });
1997
+ },
1998
+ latestAnswer(overrides?: Overrides): EthCallParam {
1999
+ const chainId =
2000
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2001
+ const address = this.context.address;
2002
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2003
+ if (overrides?.blockTag) {
2004
+ blockTag =
2005
+ typeof overrides.blockTag == "string"
2006
+ ? overrides.blockTag
2007
+ : "0x" + overrides.blockTag.toString(16);
2008
+ }
2009
+
2010
+ return this.view.encodeCall.latestAnswer({ chainId, address, blockTag });
2011
+ },
2012
+ latestRound(overrides?: Overrides): EthCallParam {
2013
+ const chainId =
2014
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2015
+ const address = this.context.address;
2016
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2017
+ if (overrides?.blockTag) {
2018
+ blockTag =
2019
+ typeof overrides.blockTag == "string"
2020
+ ? overrides.blockTag
2021
+ : "0x" + overrides.blockTag.toString(16);
2022
+ }
2023
+
2024
+ return this.view.encodeCall.latestRound({ chainId, address, blockTag });
2025
+ },
2026
+ latestRoundData(overrides?: Overrides): EthCallParam {
2027
+ const chainId =
2028
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2029
+ const address = this.context.address;
2030
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2031
+ if (overrides?.blockTag) {
2032
+ blockTag =
2033
+ typeof overrides.blockTag == "string"
2034
+ ? overrides.blockTag
2035
+ : "0x" + overrides.blockTag.toString(16);
2036
+ }
2037
+
2038
+ return this.view.encodeCall.latestRoundData({
2039
+ chainId,
2040
+ address,
2041
+ blockTag,
2042
+ });
2043
+ },
2044
+ latestTimestamp(overrides?: Overrides): EthCallParam {
2045
+ const chainId =
2046
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2047
+ const address = this.context.address;
2048
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2049
+ if (overrides?.blockTag) {
2050
+ blockTag =
2051
+ typeof overrides.blockTag == "string"
2052
+ ? overrides.blockTag
2053
+ : "0x" + overrides.blockTag.toString(16);
2054
+ }
2055
+
2056
+ return this.view.encodeCall.latestTimestamp({
2057
+ chainId,
2058
+ address,
2059
+ blockTag,
2060
+ });
2061
+ },
2062
+ owner(overrides?: Overrides): EthCallParam {
2063
+ const chainId =
2064
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2065
+ const address = this.context.address;
2066
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2067
+ if (overrides?.blockTag) {
2068
+ blockTag =
2069
+ typeof overrides.blockTag == "string"
2070
+ ? overrides.blockTag
2071
+ : "0x" + overrides.blockTag.toString(16);
2072
+ }
2073
+
2074
+ return this.view.encodeCall.owner({ chainId, address, blockTag });
2075
+ },
2076
+ phaseAggregators(arg0: BigNumberish, overrides?: Overrides): EthCallParam {
2077
+ const chainId =
2078
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2079
+ const address = this.context.address;
2080
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2081
+ if (overrides?.blockTag) {
2082
+ blockTag =
2083
+ typeof overrides.blockTag == "string"
2084
+ ? overrides.blockTag
2085
+ : "0x" + overrides.blockTag.toString(16);
2086
+ }
2087
+
2088
+ return this.view.encodeCall.phaseAggregators(arg0, {
2089
+ chainId,
2090
+ address,
2091
+ blockTag,
2092
+ });
2093
+ },
2094
+ phaseId(overrides?: Overrides): EthCallParam {
2095
+ const chainId =
2096
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2097
+ const address = this.context.address;
2098
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2099
+ if (overrides?.blockTag) {
2100
+ blockTag =
2101
+ typeof overrides.blockTag == "string"
2102
+ ? overrides.blockTag
2103
+ : "0x" + overrides.blockTag.toString(16);
2104
+ }
2105
+
2106
+ return this.view.encodeCall.phaseId({ chainId, address, blockTag });
2107
+ },
2108
+ proposeAggregator(
2109
+ _aggregator: string,
2110
+ overrides?: Overrides
2111
+ ): EthCallParam {
2112
+ const chainId =
2113
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2114
+ const address = this.context.address;
2115
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2116
+ if (overrides?.blockTag) {
2117
+ blockTag =
2118
+ typeof overrides.blockTag == "string"
2119
+ ? overrides.blockTag
2120
+ : "0x" + overrides.blockTag.toString(16);
2121
+ }
2122
+
2123
+ return this.view.encodeCall.proposeAggregator(_aggregator, {
2124
+ chainId,
2125
+ address,
2126
+ blockTag,
2127
+ });
2128
+ },
2129
+ proposedAggregator(overrides?: Overrides): EthCallParam {
2130
+ const chainId =
2131
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2132
+ const address = this.context.address;
2133
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2134
+ if (overrides?.blockTag) {
2135
+ blockTag =
2136
+ typeof overrides.blockTag == "string"
2137
+ ? overrides.blockTag
2138
+ : "0x" + overrides.blockTag.toString(16);
2139
+ }
2140
+
2141
+ return this.view.encodeCall.proposedAggregator({
2142
+ chainId,
2143
+ address,
2144
+ blockTag,
2145
+ });
2146
+ },
2147
+ proposedGetRoundData(
2148
+ _roundId: BigNumberish,
2149
+ overrides?: Overrides
2150
+ ): EthCallParam {
2151
+ const chainId =
2152
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2153
+ const address = this.context.address;
2154
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2155
+ if (overrides?.blockTag) {
2156
+ blockTag =
2157
+ typeof overrides.blockTag == "string"
2158
+ ? overrides.blockTag
2159
+ : "0x" + overrides.blockTag.toString(16);
2160
+ }
2161
+
2162
+ return this.view.encodeCall.proposedGetRoundData(_roundId, {
2163
+ chainId,
2164
+ address,
2165
+ blockTag,
2166
+ });
2167
+ },
2168
+ proposedLatestRoundData(overrides?: Overrides): EthCallParam {
2169
+ const chainId =
2170
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2171
+ const address = this.context.address;
2172
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2173
+ if (overrides?.blockTag) {
2174
+ blockTag =
2175
+ typeof overrides.blockTag == "string"
2176
+ ? overrides.blockTag
2177
+ : "0x" + overrides.blockTag.toString(16);
2178
+ }
2179
+
2180
+ return this.view.encodeCall.proposedLatestRoundData({
2181
+ chainId,
2182
+ address,
2183
+ blockTag,
2184
+ });
2185
+ },
2186
+ setController(
2187
+ _accessController: string,
2188
+ overrides?: Overrides
2189
+ ): EthCallParam {
2190
+ const chainId =
2191
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2192
+ const address = this.context.address;
2193
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2194
+ if (overrides?.blockTag) {
2195
+ blockTag =
2196
+ typeof overrides.blockTag == "string"
2197
+ ? overrides.blockTag
2198
+ : "0x" + overrides.blockTag.toString(16);
2199
+ }
2200
+
2201
+ return this.view.encodeCall.setController(_accessController, {
2202
+ chainId,
2203
+ address,
2204
+ blockTag,
2205
+ });
2206
+ },
2207
+ transferOwnership(_to: string, overrides?: Overrides): EthCallParam {
2208
+ const chainId =
2209
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2210
+ const address = this.context.address;
2211
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2212
+ if (overrides?.blockTag) {
2213
+ blockTag =
2214
+ typeof overrides.blockTag == "string"
2215
+ ? overrides.blockTag
2216
+ : "0x" + overrides.blockTag.toString(16);
2217
+ }
2218
+
2219
+ return this.view.encodeCall.transferOwnership(_to, {
2220
+ chainId,
2221
+ address,
2222
+ blockTag,
2223
+ });
2224
+ },
2225
+ version(overrides?: Overrides): EthCallParam {
2226
+ const chainId =
2227
+ overrides?.chainId?.toString() ?? this.context.chainId.toString();
2228
+ const address = this.context.address;
2229
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
2230
+ if (overrides?.blockTag) {
2231
+ blockTag =
2232
+ typeof overrides.blockTag == "string"
2233
+ ? overrides.blockTag
2234
+ : "0x" + overrides.blockTag.toString(16);
2235
+ }
2236
+
2237
+ return this.view.encodeCall.version({ chainId, address, blockTag });
2238
+ },
727
2239
  };
728
2240
  }
729
2241
 
@@ -745,7 +2257,8 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
745
2257
  fetchConfig?: Partial<EthFetchConfig>,
746
2258
  preprocessHandler?: (
747
2259
  event: AnswerUpdatedEvent,
748
- ctx: EACAggregatorProxyContext
2260
+ ctx: EACAggregatorProxyContext,
2261
+ preprocessStore: { [k: string]: any }
749
2262
  ) => Promise<PreprocessResult>
750
2263
  ): this {
751
2264
  if (!filter) {
@@ -762,7 +2275,8 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
762
2275
  fetchConfig?: Partial<EthFetchConfig>,
763
2276
  preprocessHandler?: (
764
2277
  event: NewRoundEvent,
765
- ctx: EACAggregatorProxyContext
2278
+ ctx: EACAggregatorProxyContext,
2279
+ preprocessStore: { [k: string]: any }
766
2280
  ) => Promise<PreprocessResult>
767
2281
  ): this {
768
2282
  if (!filter) {
@@ -786,7 +2300,8 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
786
2300
  fetchConfig?: Partial<EthFetchConfig>,
787
2301
  preprocessHandler?: (
788
2302
  event: OwnershipTransferRequestedEvent,
789
- ctx: EACAggregatorProxyContext
2303
+ ctx: EACAggregatorProxyContext,
2304
+ preprocessStore: { [k: string]: any }
790
2305
  ) => Promise<PreprocessResult>
791
2306
  ): this {
792
2307
  if (!filter) {
@@ -808,7 +2323,8 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
808
2323
  fetchConfig?: Partial<EthFetchConfig>,
809
2324
  preprocessHandler?: (
810
2325
  event: OwnershipTransferredEvent,
811
- ctx: EACAggregatorProxyContext
2326
+ ctx: EACAggregatorProxyContext,
2327
+ preprocessStore: { [k: string]: any }
812
2328
  ) => Promise<PreprocessResult>
813
2329
  ): this {
814
2330
  if (!filter) {
@@ -1329,7 +2845,8 @@ export class EACAggregatorProxyProcessorTemplate extends BaseProcessorTemplate<
1329
2845
  fetchConfig?: Partial<EthFetchConfig>,
1330
2846
  preprocessHandler?: (
1331
2847
  event: AnswerUpdatedEvent,
1332
- ctx: EACAggregatorProxyContext
2848
+ ctx: EACAggregatorProxyContext,
2849
+ preprocessStore: { [k: string]: any }
1333
2850
  ) => Promise<PreprocessResult>
1334
2851
  ): this {
1335
2852
  if (!filter) {
@@ -1346,7 +2863,8 @@ export class EACAggregatorProxyProcessorTemplate extends BaseProcessorTemplate<
1346
2863
  fetchConfig?: Partial<EthFetchConfig>,
1347
2864
  preprocessHandler?: (
1348
2865
  event: NewRoundEvent,
1349
- ctx: EACAggregatorProxyContext
2866
+ ctx: EACAggregatorProxyContext,
2867
+ preprocessStore: { [k: string]: any }
1350
2868
  ) => Promise<PreprocessResult>
1351
2869
  ): this {
1352
2870
  if (!filter) {
@@ -1370,7 +2888,8 @@ export class EACAggregatorProxyProcessorTemplate extends BaseProcessorTemplate<
1370
2888
  fetchConfig?: Partial<EthFetchConfig>,
1371
2889
  preprocessHandler?: (
1372
2890
  event: OwnershipTransferRequestedEvent,
1373
- ctx: EACAggregatorProxyContext
2891
+ ctx: EACAggregatorProxyContext,
2892
+ preprocessStore: { [k: string]: any }
1374
2893
  ) => Promise<PreprocessResult>
1375
2894
  ): this {
1376
2895
  if (!filter) {
@@ -1392,7 +2911,8 @@ export class EACAggregatorProxyProcessorTemplate extends BaseProcessorTemplate<
1392
2911
  fetchConfig?: Partial<EthFetchConfig>,
1393
2912
  preprocessHandler?: (
1394
2913
  event: OwnershipTransferredEvent,
1395
- ctx: EACAggregatorProxyContext
2914
+ ctx: EACAggregatorProxyContext,
2915
+ preprocessStore: { [k: string]: any }
1396
2916
  ) => Promise<PreprocessResult>
1397
2917
  ): this {
1398
2918
  if (!filter) {