@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
@@ -23,7 +23,7 @@ import {
23
23
  u32,
24
24
  wrapConstructor,
25
25
  wrapXOFConstructorWithOpts
26
- } from "./chunk-USETTWR7.js";
26
+ } from "./chunk-Z5PQR6UE.js";
27
27
  import {
28
28
  __export
29
29
  } from "./chunk-AXRHIURD.js";
@@ -22,7 +22,7 @@ import {
22
22
  normalizeLabels,
23
23
  processGqlReceipt,
24
24
  require_lib2 as require_lib
25
- } from "./chunk-KA5CLZU6.js";
25
+ } from "./chunk-7NWX3CH7.js";
26
26
  import {
27
27
  arrayify,
28
28
  bn
@@ -35,7 +35,7 @@ import {
35
35
  USER_PROCESSOR,
36
36
  errorString,
37
37
  mergeProcessResults
38
- } from "./chunk-USETTWR7.js";
38
+ } from "./chunk-Z5PQR6UE.js";
39
39
  import {
40
40
  __publicField,
41
41
  __toESM
@@ -15,7 +15,7 @@ import {
15
15
  u32,
16
16
  u64_default,
17
17
  wrapConstructorWithOpts
18
- } from "./chunk-USETTWR7.js";
18
+ } from "./chunk-Z5PQR6UE.js";
19
19
  import {
20
20
  __commonJS,
21
21
  __toESM
@@ -1,6 +1,6 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
2
 
3
- // ../runtime/lib/chunk-FGIYODHE.js
3
+ // ../runtime/lib/chunk-FFU5RYDX.js
4
4
  import { createRequire as createRequireShim } from "module";
5
5
  import { AsyncLocalStorage } from "async_hooks";
6
6
  import * as process2 from "process";
@@ -47470,9 +47470,75 @@ var ProcessResult = {
47470
47470
  }
47471
47471
  };
47472
47472
  function createBaseEthCallParam() {
47473
- return { chainId: "", address: "", function: "", signature: "", args: [] };
47473
+ return { context: void 0, calldata: "" };
47474
47474
  }
47475
47475
  var EthCallParam = {
47476
+ encode(message, writer = import_minimal5.default.Writer.create()) {
47477
+ if (message.context !== void 0) {
47478
+ EthCallContext.encode(message.context, writer.uint32(10).fork()).ldelim();
47479
+ }
47480
+ if (message.calldata !== "") {
47481
+ writer.uint32(18).string(message.calldata);
47482
+ }
47483
+ return writer;
47484
+ },
47485
+ decode(input, length) {
47486
+ const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
47487
+ let end = length === void 0 ? reader.len : reader.pos + length;
47488
+ const message = createBaseEthCallParam();
47489
+ while (reader.pos < end) {
47490
+ const tag = reader.uint32();
47491
+ switch (tag >>> 3) {
47492
+ case 1:
47493
+ if (tag !== 10) {
47494
+ break;
47495
+ }
47496
+ message.context = EthCallContext.decode(reader, reader.uint32());
47497
+ continue;
47498
+ case 2:
47499
+ if (tag !== 18) {
47500
+ break;
47501
+ }
47502
+ message.calldata = reader.string();
47503
+ continue;
47504
+ }
47505
+ if ((tag & 7) === 4 || tag === 0) {
47506
+ break;
47507
+ }
47508
+ reader.skipType(tag & 7);
47509
+ }
47510
+ return message;
47511
+ },
47512
+ fromJSON(object2) {
47513
+ return {
47514
+ context: isSet3(object2.context) ? EthCallContext.fromJSON(object2.context) : void 0,
47515
+ calldata: isSet3(object2.calldata) ? globalThis.String(object2.calldata) : ""
47516
+ };
47517
+ },
47518
+ toJSON(message) {
47519
+ const obj = {};
47520
+ if (message.context !== void 0) {
47521
+ obj.context = EthCallContext.toJSON(message.context);
47522
+ }
47523
+ if (message.calldata !== "") {
47524
+ obj.calldata = message.calldata;
47525
+ }
47526
+ return obj;
47527
+ },
47528
+ create(base) {
47529
+ return EthCallParam.fromPartial(base ?? {});
47530
+ },
47531
+ fromPartial(object2) {
47532
+ const message = createBaseEthCallParam();
47533
+ message.context = object2.context !== void 0 && object2.context !== null ? EthCallContext.fromPartial(object2.context) : void 0;
47534
+ message.calldata = object2.calldata ?? "";
47535
+ return message;
47536
+ }
47537
+ };
47538
+ function createBaseEthCallContext() {
47539
+ return { chainId: "", address: "", blockTag: "" };
47540
+ }
47541
+ var EthCallContext = {
47476
47542
  encode(message, writer = import_minimal5.default.Writer.create()) {
47477
47543
  if (message.chainId !== "") {
47478
47544
  writer.uint32(10).string(message.chainId);
@@ -47480,21 +47546,15 @@ var EthCallParam = {
47480
47546
  if (message.address !== "") {
47481
47547
  writer.uint32(18).string(message.address);
47482
47548
  }
47483
- if (message.function !== "") {
47484
- writer.uint32(26).string(message.function);
47485
- }
47486
- if (message.signature !== "") {
47487
- writer.uint32(34).string(message.signature);
47488
- }
47489
- for (const v of message.args) {
47490
- Value.encode(Value.wrap(v), writer.uint32(42).fork()).ldelim();
47549
+ if (message.blockTag !== "") {
47550
+ writer.uint32(26).string(message.blockTag);
47491
47551
  }
47492
47552
  return writer;
47493
47553
  },
47494
47554
  decode(input, length) {
47495
47555
  const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
47496
47556
  let end = length === void 0 ? reader.len : reader.pos + length;
47497
- const message = createBaseEthCallParam();
47557
+ const message = createBaseEthCallContext();
47498
47558
  while (reader.pos < end) {
47499
47559
  const tag = reader.uint32();
47500
47560
  switch (tag >>> 3) {
@@ -47514,19 +47574,7 @@ var EthCallParam = {
47514
47574
  if (tag !== 26) {
47515
47575
  break;
47516
47576
  }
47517
- message.function = reader.string();
47518
- continue;
47519
- case 4:
47520
- if (tag !== 34) {
47521
- break;
47522
- }
47523
- message.signature = reader.string();
47524
- continue;
47525
- case 5:
47526
- if (tag !== 42) {
47527
- break;
47528
- }
47529
- message.args.push(Value.unwrap(Value.decode(reader, reader.uint32())));
47577
+ message.blockTag = reader.string();
47530
47578
  continue;
47531
47579
  }
47532
47580
  if ((tag & 7) === 4 || tag === 0) {
@@ -47540,9 +47588,7 @@ var EthCallParam = {
47540
47588
  return {
47541
47589
  chainId: isSet3(object2.chainId) ? globalThis.String(object2.chainId) : "",
47542
47590
  address: isSet3(object2.address) ? globalThis.String(object2.address) : "",
47543
- function: isSet3(object2.function) ? globalThis.String(object2.function) : "",
47544
- signature: isSet3(object2.signature) ? globalThis.String(object2.signature) : "",
47545
- args: globalThis.Array.isArray(object2?.args) ? [...object2.args] : []
47591
+ blockTag: isSet3(object2.blockTag) ? globalThis.String(object2.blockTag) : ""
47546
47592
  };
47547
47593
  },
47548
47594
  toJSON(message) {
@@ -47553,27 +47599,19 @@ var EthCallParam = {
47553
47599
  if (message.address !== "") {
47554
47600
  obj.address = message.address;
47555
47601
  }
47556
- if (message.function !== "") {
47557
- obj.function = message.function;
47558
- }
47559
- if (message.signature !== "") {
47560
- obj.signature = message.signature;
47561
- }
47562
- if (message.args?.length) {
47563
- obj.args = message.args;
47602
+ if (message.blockTag !== "") {
47603
+ obj.blockTag = message.blockTag;
47564
47604
  }
47565
47605
  return obj;
47566
47606
  },
47567
47607
  create(base) {
47568
- return EthCallParam.fromPartial(base ?? {});
47608
+ return EthCallContext.fromPartial(base ?? {});
47569
47609
  },
47570
47610
  fromPartial(object2) {
47571
- const message = createBaseEthCallParam();
47611
+ const message = createBaseEthCallContext();
47572
47612
  message.chainId = object2.chainId ?? "";
47573
47613
  message.address = object2.address ?? "";
47574
- message.function = object2.function ?? "";
47575
- message.signature = object2.signature ?? "";
47576
- message.args = object2.args?.map((e) => e) || [];
47614
+ message.blockTag = object2.blockTag ?? "";
47577
47615
  return message;
47578
47616
  }
47579
47617
  };
@@ -58358,6 +58396,13 @@ function errorString(e) {
58358
58396
  return e.message + "\n" + e.stack;
58359
58397
  }
58360
58398
  var USER_PROCESSOR = "user_processor";
58399
+ function makeEthCallKey(param) {
58400
+ if (!param.context) {
58401
+ throw new Error("null context for eth call");
58402
+ }
58403
+ const { chainId, address, blockTag } = param.context;
58404
+ return `${chainId}|${address}|${blockTag}|${param.calldata}`;
58405
+ }
58361
58406
  var _Endpoints = class {
58362
58407
  concurrency = 8;
58363
58408
  chainQueryAPI = "";
@@ -77073,6 +77118,7 @@ var ProcessorServiceImpl = class {
77073
77118
  // private processorConfig: ProcessConfigResponse
77074
77119
  loader;
77075
77120
  shutdownHandler;
77121
+ preprocessedEthCalls;
77076
77122
  constructor(loader, shutdownHandler) {
77077
77123
  this.loader = loader;
77078
77124
  this.shutdownHandler = shutdownHandler;
@@ -77133,7 +77179,7 @@ var ProcessorServiceImpl = class {
77133
77179
  };
77134
77180
  }
77135
77181
  async preprocessBindings(bindings, dbContext, options) {
77136
- console.log(`preprocessBindings start, bindings: ${bindings.length}`);
77182
+ console.debug(`preprocessBindings start, bindings: ${bindings.length}`);
77137
77183
  const promises = [];
77138
77184
  for (const binding of bindings) {
77139
77185
  promises.push(this.preprocessBinding(binding, dbContext, options));
@@ -77144,7 +77190,7 @@ var ProcessorServiceImpl = class {
77144
77190
  } catch (e) {
77145
77191
  throw e;
77146
77192
  }
77147
- console.log(
77193
+ console.debug(
77148
77194
  "ethCallParams: ",
77149
77195
  preprocessResults.map((r) => r.ethCallParams)
77150
77196
  );
@@ -77152,10 +77198,11 @@ var ProcessorServiceImpl = class {
77152
77198
  const providers2 = /* @__PURE__ */ new Map();
77153
77199
  for (const result of preprocessResults) {
77154
77200
  for (const param of result.ethCallParams) {
77155
- if (!providers2.has(param.chainId)) {
77156
- providers2.set(param.chainId, getProvider2(param.chainId));
77201
+ const { chainId, address, blockTag } = param.context;
77202
+ if (!providers2.has(chainId)) {
77203
+ providers2.set(chainId, getProvider2(chainId));
77157
77204
  }
77158
- const key = param.chainId + "|" + param.address;
77205
+ const key = [chainId, address, blockTag].join("|");
77159
77206
  if (!groupedRequests.has(key)) {
77160
77207
  groupedRequests.set(key, []);
77161
77208
  }
@@ -77165,15 +77212,15 @@ var ProcessorServiceImpl = class {
77165
77212
  const start = Date.now();
77166
77213
  const callPromises = [];
77167
77214
  for (const params of groupedRequests.values()) {
77168
- console.log(`chain: ${params[0].chainId}, address: ${params[0].address}, totalCalls: ${params.length}`);
77215
+ const { chainId, address, blockTag } = params[0].context;
77216
+ console.log(`chain: ${chainId}, address: ${address}, blockTag: ${blockTag}, totalCalls: ${params.length}`);
77169
77217
  for (const param of params) {
77170
- const frag = new Interface([param.signature]);
77171
- const calldata = frag.encodeFunctionData(param.function, param.args);
77172
77218
  callPromises.push(
77173
- providers2.get(param.chainId).call({
77174
- to: param.address,
77175
- data: calldata
77176
- }).then((ret) => [calldata, frag.decodeFunctionResult(param.function, ret).toArray()])
77219
+ providers2.get(chainId).call({
77220
+ to: address,
77221
+ data: param.calldata,
77222
+ blockTag
77223
+ }).then((result) => [makeEthCallKey(param), result])
77177
77224
  );
77178
77225
  }
77179
77226
  }
@@ -77253,11 +77300,9 @@ var ProcessorServiceImpl = class {
77253
77300
  }).catch((e) => {
77254
77301
  console.debug(e);
77255
77302
  dbContext.error(request.processId, e);
77256
- process_binding_error.add(1);
77257
77303
  }).finally(() => {
77258
77304
  const cost = Date.now() - start;
77259
77305
  console.debug("preprocessBinding", request.processId, " took", cost, "ms");
77260
- process_binding_time.add(cost);
77261
77306
  contexts.delete(request.processId);
77262
77307
  });
77263
77308
  }
@@ -77670,6 +77715,7 @@ export {
77670
77715
  mergeProcessResults,
77671
77716
  errorString,
77672
77717
  USER_PROCESSOR,
77718
+ makeEthCallKey,
77673
77719
  Endpoints,
77674
77720
  GLOBAL_CONFIG,
77675
77721
  StoreContext,
package/lib/core/index.js CHANGED
@@ -22,10 +22,10 @@ import {
22
22
  scaleDown,
23
23
  toBigInteger,
24
24
  toMetricValue
25
- } from "../chunk-KA5CLZU6.js";
25
+ } from "../chunk-7NWX3CH7.js";
26
26
  import "../chunk-BQH37WZR.js";
27
- import "../chunk-S727P6WP.js";
28
- import "../chunk-USETTWR7.js";
27
+ import "../chunk-SYEQKTIU.js";
28
+ import "../chunk-Z5PQR6UE.js";
29
29
  import {
30
30
  BigDecimal
31
31
  } from "../chunk-3PI3P62P.js";
@@ -1,7 +1,7 @@
1
1
  import { Interface, BaseContract, Overrides, BigNumberish, Signer, Provider } from 'ethers';
2
2
  import { B as BaseProcessor, a as BindOptions, b as BaseProcessorTemplate } from './base-processor-template-51ea121e.js';
3
3
  import { T as TypedEvent, a as TypedEventFilter, d as TypedCallTrace, C as ContractView, B as BoundContractView, E as EthContext, c as ContractContext } from './eth-d186c27a.js';
4
- import { EthFetchConfig, PreprocessResult } from '@sentio/protos';
4
+ import { PreparedData, EthCallContext, EthCallParam, EthFetchConfig, PreprocessResult } from '@sentio/protos';
5
5
  import './base-context-05879549.js';
6
6
  import { EthChainId } from '@sentio/chain';
7
7
  import { ContractRunner, LogParams } from 'ethers/providers';
@@ -154,12 +154,12 @@ interface VersionCallObject {
154
154
  type VersionCallTrace = TypedCallTrace<[], VersionCallObject>;
155
155
  declare class EACAggregatorProxyContractView extends ContractView<EACAggregatorProxy> {
156
156
  constructor(contract: EACAggregatorProxy);
157
- accessController(overrides?: Overrides): Promise<string>;
158
- aggregator(overrides?: Overrides): Promise<string>;
159
- decimals(overrides?: Overrides): Promise<bigint>;
160
- description(overrides?: Overrides): Promise<string>;
161
- getAnswer(_roundId: BigNumberish, overrides?: Overrides): Promise<bigint>;
162
- getRoundData(_roundId: BigNumberish, overrides?: Overrides): Promise<[
157
+ accessController(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<string>;
158
+ aggregator(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<string>;
159
+ decimals(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint>;
160
+ description(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<string>;
161
+ getAnswer(_roundId: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint>;
162
+ getRoundData(_roundId: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<[
163
163
  bigint,
164
164
  bigint,
165
165
  bigint,
@@ -172,10 +172,10 @@ declare class EACAggregatorProxyContractView extends ContractView<EACAggregatorP
172
172
  updatedAt: bigint;
173
173
  answeredInRound: bigint;
174
174
  }>;
175
- getTimestamp(_roundId: BigNumberish, overrides?: Overrides): Promise<bigint>;
176
- latestAnswer(overrides?: Overrides): Promise<bigint>;
177
- latestRound(overrides?: Overrides): Promise<bigint>;
178
- latestRoundData(overrides?: Overrides): Promise<[
175
+ getTimestamp(_roundId: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint>;
176
+ latestAnswer(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint>;
177
+ latestRound(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint>;
178
+ latestRoundData(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<[
179
179
  bigint,
180
180
  bigint,
181
181
  bigint,
@@ -188,12 +188,12 @@ declare class EACAggregatorProxyContractView extends ContractView<EACAggregatorP
188
188
  updatedAt: bigint;
189
189
  answeredInRound: bigint;
190
190
  }>;
191
- latestTimestamp(overrides?: Overrides): Promise<bigint>;
192
- owner(overrides?: Overrides): Promise<string>;
193
- phaseAggregators(arg0: BigNumberish, overrides?: Overrides): Promise<string>;
194
- phaseId(overrides?: Overrides): Promise<bigint>;
195
- proposedAggregator(overrides?: Overrides): Promise<string>;
196
- proposedGetRoundData(_roundId: BigNumberish, overrides?: Overrides): Promise<[
191
+ latestTimestamp(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint>;
192
+ owner(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<string>;
193
+ phaseAggregators(arg0: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<string>;
194
+ phaseId(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint>;
195
+ proposedAggregator(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<string>;
196
+ proposedGetRoundData(_roundId: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<[
197
197
  bigint,
198
198
  bigint,
199
199
  bigint,
@@ -206,7 +206,7 @@ declare class EACAggregatorProxyContractView extends ContractView<EACAggregatorP
206
206
  updatedAt: bigint;
207
207
  answeredInRound: bigint;
208
208
  }>;
209
- proposedLatestRoundData(overrides?: Overrides): Promise<[
209
+ proposedLatestRoundData(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<[
210
210
  bigint,
211
211
  bigint,
212
212
  bigint,
@@ -219,14 +219,39 @@ declare class EACAggregatorProxyContractView extends ContractView<EACAggregatorP
219
219
  updatedAt: bigint;
220
220
  answeredInRound: bigint;
221
221
  }>;
222
- version(overrides?: Overrides): Promise<bigint>;
222
+ version(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint>;
223
223
  callStatic: {
224
224
  contract: EACAggregatorProxy;
225
- acceptOwnership(overrides?: Overrides): Promise<void>;
226
- confirmAggregator(_aggregator: string, overrides?: Overrides): Promise<void>;
227
- proposeAggregator(_aggregator: string, overrides?: Overrides): Promise<void>;
228
- setController(_accessController: string, overrides?: Overrides): Promise<void>;
229
- transferOwnership(_to: string, overrides?: Overrides): Promise<void>;
225
+ acceptOwnership(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<void>;
226
+ confirmAggregator(_aggregator: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<void>;
227
+ proposeAggregator(_aggregator: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<void>;
228
+ setController(_accessController: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<void>;
229
+ transferOwnership(_to: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<void>;
230
+ };
231
+ encodeCall: {
232
+ acceptOwnership(ethCallContext: EthCallContext): EthCallParam;
233
+ accessController(ethCallContext: EthCallContext): EthCallParam;
234
+ aggregator(ethCallContext: EthCallContext): EthCallParam;
235
+ confirmAggregator(_aggregator: string, ethCallContext: EthCallContext): EthCallParam;
236
+ decimals(ethCallContext: EthCallContext): EthCallParam;
237
+ description(ethCallContext: EthCallContext): EthCallParam;
238
+ getAnswer(_roundId: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
239
+ getRoundData(_roundId: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
240
+ getTimestamp(_roundId: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
241
+ latestAnswer(ethCallContext: EthCallContext): EthCallParam;
242
+ latestRound(ethCallContext: EthCallContext): EthCallParam;
243
+ latestRoundData(ethCallContext: EthCallContext): EthCallParam;
244
+ latestTimestamp(ethCallContext: EthCallContext): EthCallParam;
245
+ owner(ethCallContext: EthCallContext): EthCallParam;
246
+ phaseAggregators(arg0: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
247
+ phaseId(ethCallContext: EthCallContext): EthCallParam;
248
+ proposeAggregator(_aggregator: string, ethCallContext: EthCallContext): EthCallParam;
249
+ proposedAggregator(ethCallContext: EthCallContext): EthCallParam;
250
+ proposedGetRoundData(_roundId: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
251
+ proposedLatestRoundData(ethCallContext: EthCallContext): EthCallParam;
252
+ setController(_accessController: string, ethCallContext: EthCallContext): EthCallParam;
253
+ transferOwnership(_to: string, ethCallContext: EthCallContext): EthCallParam;
254
+ version(ethCallContext: EthCallContext): EthCallParam;
230
255
  };
231
256
  }
232
257
  declare class EACAggregatorProxyBoundContractView extends BoundContractView<EACAggregatorProxy, EACAggregatorProxyContractView> {
@@ -305,6 +330,33 @@ declare class EACAggregatorProxyBoundContractView extends BoundContractView<EACA
305
330
  setController(_accessController: string, overrides?: Overrides): Promise<void>;
306
331
  transferOwnership(_to: string, overrides?: Overrides): Promise<void>;
307
332
  };
333
+ encodeCall: {
334
+ view: EACAggregatorProxyContractView;
335
+ context: EthContext;
336
+ acceptOwnership(overrides?: Overrides): EthCallParam;
337
+ accessController(overrides?: Overrides): EthCallParam;
338
+ aggregator(overrides?: Overrides): EthCallParam;
339
+ confirmAggregator(_aggregator: string, overrides?: Overrides): EthCallParam;
340
+ decimals(overrides?: Overrides): EthCallParam;
341
+ description(overrides?: Overrides): EthCallParam;
342
+ getAnswer(_roundId: BigNumberish, overrides?: Overrides): EthCallParam;
343
+ getRoundData(_roundId: BigNumberish, overrides?: Overrides): EthCallParam;
344
+ getTimestamp(_roundId: BigNumberish, overrides?: Overrides): EthCallParam;
345
+ latestAnswer(overrides?: Overrides): EthCallParam;
346
+ latestRound(overrides?: Overrides): EthCallParam;
347
+ latestRoundData(overrides?: Overrides): EthCallParam;
348
+ latestTimestamp(overrides?: Overrides): EthCallParam;
349
+ owner(overrides?: Overrides): EthCallParam;
350
+ phaseAggregators(arg0: BigNumberish, overrides?: Overrides): EthCallParam;
351
+ phaseId(overrides?: Overrides): EthCallParam;
352
+ proposeAggregator(_aggregator: string, overrides?: Overrides): EthCallParam;
353
+ proposedAggregator(overrides?: Overrides): EthCallParam;
354
+ proposedGetRoundData(_roundId: BigNumberish, overrides?: Overrides): EthCallParam;
355
+ proposedLatestRoundData(overrides?: Overrides): EthCallParam;
356
+ setController(_accessController: string, overrides?: Overrides): EthCallParam;
357
+ transferOwnership(_to: string, overrides?: Overrides): EthCallParam;
358
+ version(overrides?: Overrides): EthCallParam;
359
+ };
308
360
  }
309
361
  type EACAggregatorProxyContext = ContractContext<EACAggregatorProxy, EACAggregatorProxyBoundContractView>;
310
362
  declare class EACAggregatorProxyProcessor extends BaseProcessor<EACAggregatorProxy, EACAggregatorProxyBoundContractView> {
@@ -1,7 +1,7 @@
1
1
  import { Interface, BaseContract, BigNumberish, Overrides, BytesLike, Signer, Provider } from 'ethers';
2
2
  import { B as BaseProcessor, a as BindOptions, b as BaseProcessorTemplate } from './base-processor-template-51ea121e.js';
3
3
  import { T as TypedEvent, a as TypedEventFilter, d as TypedCallTrace, C as ContractView, B as BoundContractView, E as EthContext, c as ContractContext } from './eth-d186c27a.js';
4
- import { EthFetchConfig, PreprocessResult } from '@sentio/protos';
4
+ import { PreparedData, EthCallContext, EthCallParam, EthFetchConfig, PreprocessResult } from '@sentio/protos';
5
5
  import './base-context-05879549.js';
6
6
  import { EthChainId } from '@sentio/chain';
7
7
  import { ContractRunner, LogParams } from 'ethers/providers';
@@ -132,16 +132,26 @@ interface UriCallObject {
132
132
  type UriCallTrace = TypedCallTrace<[bigint], UriCallObject>;
133
133
  declare class ERC1155ContractView extends ContractView<ERC1155> {
134
134
  constructor(contract: ERC1155);
135
- balanceOf(account: string, id: BigNumberish, overrides?: Overrides): Promise<bigint>;
136
- balanceOfBatch(accounts: string[], ids: BigNumberish[], overrides?: Overrides): Promise<bigint[]>;
137
- isApprovedForAll(account: string, operator: string, overrides?: Overrides): Promise<boolean>;
138
- supportsInterface(interfaceId: BytesLike, overrides?: Overrides): Promise<boolean>;
139
- uri(id: BigNumberish, overrides?: Overrides): Promise<string>;
135
+ balanceOf(account: string, id: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint>;
136
+ balanceOfBatch(accounts: string[], ids: BigNumberish[], overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint[]>;
137
+ isApprovedForAll(account: string, operator: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<boolean>;
138
+ supportsInterface(interfaceId: BytesLike, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<boolean>;
139
+ uri(id: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<string>;
140
140
  callStatic: {
141
141
  contract: ERC1155;
142
- safeBatchTransferFrom(from: string, to: string, ids: BigNumberish[], amounts: BigNumberish[], data: BytesLike, overrides?: Overrides): Promise<void>;
143
- safeTransferFrom(from: string, to: string, id: BigNumberish, amount: BigNumberish, data: BytesLike, overrides?: Overrides): Promise<void>;
144
- setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides): Promise<void>;
142
+ safeBatchTransferFrom(from: string, to: string, ids: BigNumberish[], amounts: BigNumberish[], data: BytesLike, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<void>;
143
+ safeTransferFrom(from: string, to: string, id: BigNumberish, amount: BigNumberish, data: BytesLike, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<void>;
144
+ setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<void>;
145
+ };
146
+ encodeCall: {
147
+ balanceOf(account: string, id: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
148
+ balanceOfBatch(accounts: string[], ids: BigNumberish[], ethCallContext: EthCallContext): EthCallParam;
149
+ isApprovedForAll(account: string, operator: string, ethCallContext: EthCallContext): EthCallParam;
150
+ safeBatchTransferFrom(from: string, to: string, ids: BigNumberish[], amounts: BigNumberish[], data: BytesLike, ethCallContext: EthCallContext): EthCallParam;
151
+ safeTransferFrom(from: string, to: string, id: BigNumberish, amount: BigNumberish, data: BytesLike, ethCallContext: EthCallContext): EthCallParam;
152
+ setApprovalForAll(operator: string, approved: boolean, ethCallContext: EthCallContext): EthCallParam;
153
+ supportsInterface(interfaceId: BytesLike, ethCallContext: EthCallContext): EthCallParam;
154
+ uri(id: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
145
155
  };
146
156
  }
147
157
  declare class ERC1155BoundContractView extends BoundContractView<ERC1155, ERC1155ContractView> {
@@ -157,6 +167,18 @@ declare class ERC1155BoundContractView extends BoundContractView<ERC1155, ERC115
157
167
  safeTransferFrom(from: string, to: string, id: BigNumberish, amount: BigNumberish, data: BytesLike, overrides?: Overrides): Promise<void>;
158
168
  setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides): Promise<void>;
159
169
  };
170
+ encodeCall: {
171
+ view: ERC1155ContractView;
172
+ context: EthContext;
173
+ balanceOf(account: string, id: BigNumberish, overrides?: Overrides): EthCallParam;
174
+ balanceOfBatch(accounts: string[], ids: BigNumberish[], overrides?: Overrides): EthCallParam;
175
+ isApprovedForAll(account: string, operator: string, overrides?: Overrides): EthCallParam;
176
+ safeBatchTransferFrom(from: string, to: string, ids: BigNumberish[], amounts: BigNumberish[], data: BytesLike, overrides?: Overrides): EthCallParam;
177
+ safeTransferFrom(from: string, to: string, id: BigNumberish, amount: BigNumberish, data: BytesLike, overrides?: Overrides): EthCallParam;
178
+ setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides): EthCallParam;
179
+ supportsInterface(interfaceId: BytesLike, overrides?: Overrides): EthCallParam;
180
+ uri(id: BigNumberish, overrides?: Overrides): EthCallParam;
181
+ };
160
182
  }
161
183
  type ERC1155Context = ContractContext<ERC1155, ERC1155BoundContractView>;
162
184
  declare class ERC1155Processor extends BaseProcessor<ERC1155, ERC1155BoundContractView> {
@@ -1,7 +1,7 @@
1
1
  import { Overrides, BigNumberish, Signer, Provider } from 'ethers';
2
2
  import { B as BaseProcessor, a as BindOptions, b as BaseProcessorTemplate } from './base-processor-template-51ea121e.js';
3
3
  import { d as TypedCallTrace, C as ContractView, B as BoundContractView, E as EthContext, c as ContractContext } from './eth-d186c27a.js';
4
- import { EthFetchConfig, PreprocessResult } from '@sentio/protos';
4
+ import { PreparedData, EthCallContext, EthCallParam, EthFetchConfig, PreprocessResult } from '@sentio/protos';
5
5
  import './base-context-05879549.js';
6
6
  import { EthChainId } from '@sentio/chain';
7
7
  import { E as ERC20, A as ApprovalEvent, a as ApprovalEventFilter, O as OwnershipTransferredEvent, b as OwnershipTransferredEventFilter, T as TransferEvent, c as TransferEventFilter, d as ApprovalEventObject, e as OwnershipTransferredEventObject, f as TransferEventObject, g as ERC20Interface } from './ERC20-b4312b0c.js';
@@ -107,26 +107,46 @@ type TransferOwnershipCallTrace = TypedCallTrace<[
107
107
  ], TransferOwnershipCallObject>;
108
108
  declare class ERC20ContractView extends ContractView<ERC20> {
109
109
  constructor(contract: ERC20);
110
- allowance(owner: string, spender: string, overrides?: Overrides): Promise<bigint>;
111
- balanceOf(account: string, overrides?: Overrides): Promise<bigint>;
112
- decimals(overrides?: Overrides): Promise<bigint>;
113
- locker(overrides?: Overrides): Promise<string>;
114
- name(overrides?: Overrides): Promise<string>;
115
- owner(overrides?: Overrides): Promise<string>;
116
- symbol(overrides?: Overrides): Promise<string>;
117
- totalSupply(overrides?: Overrides): Promise<bigint>;
110
+ allowance(owner: string, spender: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint>;
111
+ balanceOf(account: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint>;
112
+ decimals(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint>;
113
+ locker(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<string>;
114
+ name(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<string>;
115
+ owner(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<string>;
116
+ symbol(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<string>;
117
+ totalSupply(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<bigint>;
118
118
  callStatic: {
119
119
  contract: ERC20;
120
- approve(spender: string, amount: BigNumberish, overrides?: Overrides): Promise<boolean>;
121
- burn(amount: BigNumberish, overrides?: Overrides): Promise<void>;
122
- burnFrom(account: string, amount: BigNumberish, overrides?: Overrides): Promise<void>;
123
- decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides): Promise<boolean>;
124
- increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides): Promise<boolean>;
125
- renounceOwnership(overrides?: Overrides): Promise<void>;
126
- setLocker(_locker: string, overrides?: Overrides): Promise<void>;
127
- transfer(recipient: string, amount: BigNumberish, overrides?: Overrides): Promise<boolean>;
128
- transferFrom(sender: string, recipient: string, amount: BigNumberish, overrides?: Overrides): Promise<boolean>;
129
- transferOwnership(newOwner: string, overrides?: Overrides): Promise<void>;
120
+ approve(spender: string, amount: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<boolean>;
121
+ burn(amount: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<void>;
122
+ burnFrom(account: string, amount: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<void>;
123
+ decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<boolean>;
124
+ increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<boolean>;
125
+ renounceOwnership(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<void>;
126
+ setLocker(_locker: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<void>;
127
+ transfer(recipient: string, amount: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<boolean>;
128
+ transferFrom(sender: string, recipient: string, amount: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<boolean>;
129
+ transferOwnership(newOwner: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise<void>;
130
+ };
131
+ encodeCall: {
132
+ allowance(owner: string, spender: string, ethCallContext: EthCallContext): EthCallParam;
133
+ approve(spender: string, amount: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
134
+ balanceOf(account: string, ethCallContext: EthCallContext): EthCallParam;
135
+ burn(amount: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
136
+ burnFrom(account: string, amount: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
137
+ decimals(ethCallContext: EthCallContext): EthCallParam;
138
+ decreaseAllowance(spender: string, subtractedValue: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
139
+ increaseAllowance(spender: string, addedValue: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
140
+ locker(ethCallContext: EthCallContext): EthCallParam;
141
+ name(ethCallContext: EthCallContext): EthCallParam;
142
+ owner(ethCallContext: EthCallContext): EthCallParam;
143
+ renounceOwnership(ethCallContext: EthCallContext): EthCallParam;
144
+ setLocker(_locker: string, ethCallContext: EthCallContext): EthCallParam;
145
+ symbol(ethCallContext: EthCallContext): EthCallParam;
146
+ totalSupply(ethCallContext: EthCallContext): EthCallParam;
147
+ transfer(recipient: string, amount: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
148
+ transferFrom(sender: string, recipient: string, amount: BigNumberish, ethCallContext: EthCallContext): EthCallParam;
149
+ transferOwnership(newOwner: string, ethCallContext: EthCallContext): EthCallParam;
130
150
  };
131
151
  }
132
152
  declare class ERC20BoundContractView extends BoundContractView<ERC20, ERC20ContractView> {
@@ -152,6 +172,28 @@ declare class ERC20BoundContractView extends BoundContractView<ERC20, ERC20Contr
152
172
  transferFrom(sender: string, recipient: string, amount: BigNumberish, overrides?: Overrides): Promise<boolean>;
153
173
  transferOwnership(newOwner: string, overrides?: Overrides): Promise<void>;
154
174
  };
175
+ encodeCall: {
176
+ view: ERC20ContractView;
177
+ context: EthContext;
178
+ allowance(owner: string, spender: string, overrides?: Overrides): EthCallParam;
179
+ approve(spender: string, amount: BigNumberish, overrides?: Overrides): EthCallParam;
180
+ balanceOf(account: string, overrides?: Overrides): EthCallParam;
181
+ burn(amount: BigNumberish, overrides?: Overrides): EthCallParam;
182
+ burnFrom(account: string, amount: BigNumberish, overrides?: Overrides): EthCallParam;
183
+ decimals(overrides?: Overrides): EthCallParam;
184
+ decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides): EthCallParam;
185
+ increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides): EthCallParam;
186
+ locker(overrides?: Overrides): EthCallParam;
187
+ name(overrides?: Overrides): EthCallParam;
188
+ owner(overrides?: Overrides): EthCallParam;
189
+ renounceOwnership(overrides?: Overrides): EthCallParam;
190
+ setLocker(_locker: string, overrides?: Overrides): EthCallParam;
191
+ symbol(overrides?: Overrides): EthCallParam;
192
+ totalSupply(overrides?: Overrides): EthCallParam;
193
+ transfer(recipient: string, amount: BigNumberish, overrides?: Overrides): EthCallParam;
194
+ transferFrom(sender: string, recipient: string, amount: BigNumberish, overrides?: Overrides): EthCallParam;
195
+ transferOwnership(newOwner: string, overrides?: Overrides): EthCallParam;
196
+ };
155
197
  }
156
198
  type ERC20Context = ContractContext<ERC20, ERC20BoundContractView>;
157
199
  declare class ERC20Processor extends BaseProcessor<ERC20, ERC20BoundContractView> {