@sentio/sdk 2.40.0-rc.2 → 2.40.0-rc.21

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 (135) 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 +17 -17
  70. package/lib/eth/eth-plugin.js.map +1 -1
  71. package/lib/eth/generic-processor.test.js.map +1 -1
  72. package/lib/eth/index.d.ts +1 -0
  73. package/lib/eth/index.d.ts.map +1 -1
  74. package/lib/eth/index.js +1 -0
  75. package/lib/eth/index.js.map +1 -1
  76. package/lib/solana/builtin/spl-token-processor.d.ts +1 -1
  77. package/lib/solana/builtin/spl-token-processor.d.ts.map +1 -1
  78. package/lib/solana/builtin/spl-token-processor.js +1 -1
  79. package/lib/solana/builtin/spl-token-processor.js.map +1 -1
  80. package/lib/solana/solana-context.d.ts +1 -1
  81. package/lib/solana/solana-context.js +2 -2
  82. package/lib/store/cache.d.ts +14 -0
  83. package/lib/store/cache.d.ts.map +1 -0
  84. package/lib/store/cache.js +35 -0
  85. package/lib/store/cache.js.map +1 -0
  86. package/lib/store/store.d.ts +2 -3
  87. package/lib/store/store.d.ts.map +1 -1
  88. package/lib/store/store.js +33 -8
  89. package/lib/store/store.js.map +1 -1
  90. package/lib/sui/context.d.ts +1 -1
  91. package/lib/sui/context.d.ts.map +1 -1
  92. package/lib/sui/sui-processor.d.ts +1 -1
  93. package/lib/sui/sui-processor.d.ts.map +1 -1
  94. package/lib/sui/sui-processor.js +1 -1
  95. package/lib/sui/sui-processor.js.map +1 -1
  96. package/lib/testing/aptos-facet.d.ts +1 -1
  97. package/lib/testing/aptos-facet.js +2 -2
  98. package/lib/testing/sui-facet.js +1 -1
  99. package/lib/utils/dex-price.d.ts +1 -0
  100. package/lib/utils/dex-price.d.ts.map +1 -1
  101. package/lib/utils/dex-price.js +13 -2
  102. package/lib/utils/dex-price.js.map +1 -1
  103. package/package.json +8 -7
  104. package/src/aptos/aptos-processor.ts +1 -1
  105. package/src/aptos/context.ts +2 -2
  106. package/src/aptos/ext/aptos-dex.ts +1 -1
  107. package/src/aptos/ext/coin-event.ts +1 -1
  108. package/src/aptos/ext/coin.ts +2 -2
  109. package/src/eth/account-processor.ts +28 -12
  110. package/src/eth/base-processor-template.ts +16 -8
  111. package/src/eth/base-processor.ts +25 -16
  112. package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +1643 -123
  113. package/src/eth/builtin/internal/erc1155-processor.ts +724 -42
  114. package/src/eth/builtin/internal/erc20-processor.ts +1368 -90
  115. package/src/eth/builtin/internal/erc20bytes-processor.ts +685 -49
  116. package/src/eth/builtin/internal/erc721-processor.ts +1116 -70
  117. package/src/eth/builtin/internal/weth9-processor.ts +798 -63
  118. package/src/eth/codegen/event-handler.ts +1 -1
  119. package/src/eth/codegen/file.ts +26 -3
  120. package/src/eth/codegen/function-calls.ts +101 -8
  121. package/src/eth/codegen/types.ts +22 -1
  122. package/src/eth/context.ts +7 -0
  123. package/src/eth/eth-plugin.ts +31 -26
  124. package/src/eth/index.ts +2 -0
  125. package/src/solana/builtin/spl-token-processor.ts +1 -1
  126. package/src/solana/solana-context.ts +2 -2
  127. package/src/store/cache.ts +46 -0
  128. package/src/store/store.ts +39 -21
  129. package/src/sui/context.ts +1 -1
  130. package/src/sui/sui-processor.ts +1 -1
  131. package/src/testing/aptos-facet.ts +2 -2
  132. package/src/testing/sui-facet.ts +1 -1
  133. package/src/utils/dex-price.ts +15 -2
  134. package/lib/utils/chainlink-oracles-sepolia.csv +0 -19
  135. package/lib/utils/chainlink-oracles.csv +0 -217
@@ -1,4 +1,8 @@
1
- import { addContractByABI, getContractByABI, addProcessor, getProcessor, getProvider, transformEtherError, BaseProcessor, BaseProcessorTemplate, BoundContractView, ContractView, DummyProvider, } from "@sentio/sdk/eth";
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import { Interface } from "ethers";
5
+ import { addContractByABI, getContractByABI, addProcessor, getProcessor, getProvider, transformEtherError, BaseProcessor, BaseProcessorTemplate, BoundContractView, ContractView, DummyProvider, makeEthCallKey, } from "@sentio/sdk/eth";
2
6
  import { EACAggregatorProxy__factory } from "./index.js";
3
7
  const templateContract = EACAggregatorProxy__factory.connect("0x0", DummyProvider);
4
8
  export class EACAggregatorProxyContractView extends ContractView {
@@ -6,8 +10,28 @@ export class EACAggregatorProxyContractView extends ContractView {
6
10
  super(contract);
7
11
  this.callStatic.contract = contract;
8
12
  }
9
- async accessController(overrides) {
13
+ async accessController(overrides, preparedData, ethCallContext) {
10
14
  try {
15
+ if (preparedData?.ethCallResults && ethCallContext) {
16
+ const iface = new Interface([
17
+ "function accessController() view returns (address)",
18
+ ]);
19
+ const calldata = iface.encodeFunctionData("accessController", []);
20
+ const key = makeEthCallKey({
21
+ context: ethCallContext,
22
+ calldata,
23
+ });
24
+ console.debug("looking up eth call key:", key);
25
+ const ret = preparedData.ethCallResults[key];
26
+ if (ret) {
27
+ console.debug("prepared eth call found:", key);
28
+ const result = iface
29
+ .decodeFunctionResult("accessController", ret)
30
+ .toArray();
31
+ return result.length == 1 ? result[0] : result;
32
+ }
33
+ console.debug("missing eth call key:", "accessController", key);
34
+ }
11
35
  return await this.contract.getFunction("accessController()")(overrides || {});
12
36
  }
13
37
  catch (e) {
@@ -15,8 +39,28 @@ export class EACAggregatorProxyContractView extends ContractView {
15
39
  throw transformEtherError(e, undefined, stack);
16
40
  }
17
41
  }
18
- async aggregator(overrides) {
42
+ async aggregator(overrides, preparedData, ethCallContext) {
19
43
  try {
44
+ if (preparedData?.ethCallResults && ethCallContext) {
45
+ const iface = new Interface([
46
+ "function aggregator() view returns (address)",
47
+ ]);
48
+ const calldata = iface.encodeFunctionData("aggregator", []);
49
+ const key = makeEthCallKey({
50
+ context: ethCallContext,
51
+ calldata,
52
+ });
53
+ console.debug("looking up eth call key:", key);
54
+ const ret = preparedData.ethCallResults[key];
55
+ if (ret) {
56
+ console.debug("prepared eth call found:", key);
57
+ const result = iface
58
+ .decodeFunctionResult("aggregator", ret)
59
+ .toArray();
60
+ return result.length == 1 ? result[0] : result;
61
+ }
62
+ console.debug("missing eth call key:", "aggregator", key);
63
+ }
20
64
  return await this.contract.getFunction("aggregator()")(overrides || {});
21
65
  }
22
66
  catch (e) {
@@ -24,8 +68,26 @@ export class EACAggregatorProxyContractView extends ContractView {
24
68
  throw transformEtherError(e, undefined, stack);
25
69
  }
26
70
  }
27
- async decimals(overrides) {
71
+ async decimals(overrides, preparedData, ethCallContext) {
28
72
  try {
73
+ if (preparedData?.ethCallResults && ethCallContext) {
74
+ const iface = new Interface([
75
+ "function decimals() view returns (uint8)",
76
+ ]);
77
+ const calldata = iface.encodeFunctionData("decimals", []);
78
+ const key = makeEthCallKey({
79
+ context: ethCallContext,
80
+ calldata,
81
+ });
82
+ console.debug("looking up eth call key:", key);
83
+ const ret = preparedData.ethCallResults[key];
84
+ if (ret) {
85
+ console.debug("prepared eth call found:", key);
86
+ const result = iface.decodeFunctionResult("decimals", ret).toArray();
87
+ return result.length == 1 ? result[0] : result;
88
+ }
89
+ console.debug("missing eth call key:", "decimals", key);
90
+ }
29
91
  return await this.contract.getFunction("decimals()")(overrides || {});
30
92
  }
31
93
  catch (e) {
@@ -33,8 +95,28 @@ export class EACAggregatorProxyContractView extends ContractView {
33
95
  throw transformEtherError(e, undefined, stack);
34
96
  }
35
97
  }
36
- async description(overrides) {
98
+ async description(overrides, preparedData, ethCallContext) {
37
99
  try {
100
+ if (preparedData?.ethCallResults && ethCallContext) {
101
+ const iface = new Interface([
102
+ "function description() view returns (string)",
103
+ ]);
104
+ const calldata = iface.encodeFunctionData("description", []);
105
+ const key = makeEthCallKey({
106
+ context: ethCallContext,
107
+ calldata,
108
+ });
109
+ console.debug("looking up eth call key:", key);
110
+ const ret = preparedData.ethCallResults[key];
111
+ if (ret) {
112
+ console.debug("prepared eth call found:", key);
113
+ const result = iface
114
+ .decodeFunctionResult("description", ret)
115
+ .toArray();
116
+ return result.length == 1 ? result[0] : result;
117
+ }
118
+ console.debug("missing eth call key:", "description", key);
119
+ }
38
120
  return await this.contract.getFunction("description()")(overrides || {});
39
121
  }
40
122
  catch (e) {
@@ -42,8 +124,26 @@ export class EACAggregatorProxyContractView extends ContractView {
42
124
  throw transformEtherError(e, undefined, stack);
43
125
  }
44
126
  }
45
- async getAnswer(_roundId, overrides) {
127
+ async getAnswer(_roundId, overrides, preparedData, ethCallContext) {
46
128
  try {
129
+ if (preparedData?.ethCallResults && ethCallContext) {
130
+ const iface = new Interface([
131
+ "function getAnswer(uint256) view returns (int256)",
132
+ ]);
133
+ const calldata = iface.encodeFunctionData("getAnswer", [_roundId]);
134
+ const key = makeEthCallKey({
135
+ context: ethCallContext,
136
+ calldata,
137
+ });
138
+ console.debug("looking up eth call key:", key);
139
+ const ret = preparedData.ethCallResults[key];
140
+ if (ret) {
141
+ console.debug("prepared eth call found:", key);
142
+ const result = iface.decodeFunctionResult("getAnswer", ret).toArray();
143
+ return result.length == 1 ? result[0] : result;
144
+ }
145
+ console.debug("missing eth call key:", "getAnswer", _roundId, key);
146
+ }
47
147
  return await this.contract.getFunction("getAnswer(uint256)")(_roundId, overrides || {});
48
148
  }
49
149
  catch (e) {
@@ -51,8 +151,28 @@ export class EACAggregatorProxyContractView extends ContractView {
51
151
  throw transformEtherError(e, undefined, stack);
52
152
  }
53
153
  }
54
- async getRoundData(_roundId, overrides) {
154
+ async getRoundData(_roundId, overrides, preparedData, ethCallContext) {
55
155
  try {
156
+ if (preparedData?.ethCallResults && ethCallContext) {
157
+ const iface = new Interface([
158
+ "function getRoundData(uint80) view returns (uint80,int256,uint256,uint256,uint80)",
159
+ ]);
160
+ const calldata = iface.encodeFunctionData("getRoundData", [_roundId]);
161
+ const key = makeEthCallKey({
162
+ context: ethCallContext,
163
+ calldata,
164
+ });
165
+ console.debug("looking up eth call key:", key);
166
+ const ret = preparedData.ethCallResults[key];
167
+ if (ret) {
168
+ console.debug("prepared eth call found:", key);
169
+ const result = iface
170
+ .decodeFunctionResult("getRoundData", ret)
171
+ .toArray();
172
+ return result.length == 1 ? result[0] : result;
173
+ }
174
+ console.debug("missing eth call key:", "getRoundData", _roundId, key);
175
+ }
56
176
  return await this.contract.getFunction("getRoundData(uint80)")(_roundId, overrides || {});
57
177
  }
58
178
  catch (e) {
@@ -60,8 +180,28 @@ export class EACAggregatorProxyContractView extends ContractView {
60
180
  throw transformEtherError(e, undefined, stack);
61
181
  }
62
182
  }
63
- async getTimestamp(_roundId, overrides) {
183
+ async getTimestamp(_roundId, overrides, preparedData, ethCallContext) {
64
184
  try {
185
+ if (preparedData?.ethCallResults && ethCallContext) {
186
+ const iface = new Interface([
187
+ "function getTimestamp(uint256) view returns (uint256)",
188
+ ]);
189
+ const calldata = iface.encodeFunctionData("getTimestamp", [_roundId]);
190
+ const key = makeEthCallKey({
191
+ context: ethCallContext,
192
+ calldata,
193
+ });
194
+ console.debug("looking up eth call key:", key);
195
+ const ret = preparedData.ethCallResults[key];
196
+ if (ret) {
197
+ console.debug("prepared eth call found:", key);
198
+ const result = iface
199
+ .decodeFunctionResult("getTimestamp", ret)
200
+ .toArray();
201
+ return result.length == 1 ? result[0] : result;
202
+ }
203
+ console.debug("missing eth call key:", "getTimestamp", _roundId, key);
204
+ }
65
205
  return await this.contract.getFunction("getTimestamp(uint256)")(_roundId, overrides || {});
66
206
  }
67
207
  catch (e) {
@@ -69,8 +209,28 @@ export class EACAggregatorProxyContractView extends ContractView {
69
209
  throw transformEtherError(e, undefined, stack);
70
210
  }
71
211
  }
72
- async latestAnswer(overrides) {
212
+ async latestAnswer(overrides, preparedData, ethCallContext) {
73
213
  try {
214
+ if (preparedData?.ethCallResults && ethCallContext) {
215
+ const iface = new Interface([
216
+ "function latestAnswer() view returns (int256)",
217
+ ]);
218
+ const calldata = iface.encodeFunctionData("latestAnswer", []);
219
+ const key = makeEthCallKey({
220
+ context: ethCallContext,
221
+ calldata,
222
+ });
223
+ console.debug("looking up eth call key:", key);
224
+ const ret = preparedData.ethCallResults[key];
225
+ if (ret) {
226
+ console.debug("prepared eth call found:", key);
227
+ const result = iface
228
+ .decodeFunctionResult("latestAnswer", ret)
229
+ .toArray();
230
+ return result.length == 1 ? result[0] : result;
231
+ }
232
+ console.debug("missing eth call key:", "latestAnswer", key);
233
+ }
74
234
  return await this.contract.getFunction("latestAnswer()")(overrides || {});
75
235
  }
76
236
  catch (e) {
@@ -78,8 +238,28 @@ export class EACAggregatorProxyContractView extends ContractView {
78
238
  throw transformEtherError(e, undefined, stack);
79
239
  }
80
240
  }
81
- async latestRound(overrides) {
241
+ async latestRound(overrides, preparedData, ethCallContext) {
82
242
  try {
243
+ if (preparedData?.ethCallResults && ethCallContext) {
244
+ const iface = new Interface([
245
+ "function latestRound() view returns (uint256)",
246
+ ]);
247
+ const calldata = iface.encodeFunctionData("latestRound", []);
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("latestRound", ret)
258
+ .toArray();
259
+ return result.length == 1 ? result[0] : result;
260
+ }
261
+ console.debug("missing eth call key:", "latestRound", key);
262
+ }
83
263
  return await this.contract.getFunction("latestRound()")(overrides || {});
84
264
  }
85
265
  catch (e) {
@@ -87,8 +267,28 @@ export class EACAggregatorProxyContractView extends ContractView {
87
267
  throw transformEtherError(e, undefined, stack);
88
268
  }
89
269
  }
90
- async latestRoundData(overrides) {
270
+ async latestRoundData(overrides, preparedData, ethCallContext) {
91
271
  try {
272
+ if (preparedData?.ethCallResults && ethCallContext) {
273
+ const iface = new Interface([
274
+ "function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)",
275
+ ]);
276
+ const calldata = iface.encodeFunctionData("latestRoundData", []);
277
+ const key = makeEthCallKey({
278
+ context: ethCallContext,
279
+ calldata,
280
+ });
281
+ console.debug("looking up eth call key:", key);
282
+ const ret = preparedData.ethCallResults[key];
283
+ if (ret) {
284
+ console.debug("prepared eth call found:", key);
285
+ const result = iface
286
+ .decodeFunctionResult("latestRoundData", ret)
287
+ .toArray();
288
+ return result.length == 1 ? result[0] : result;
289
+ }
290
+ console.debug("missing eth call key:", "latestRoundData", key);
291
+ }
92
292
  return await this.contract.getFunction("latestRoundData()")(overrides || {});
93
293
  }
94
294
  catch (e) {
@@ -96,8 +296,28 @@ export class EACAggregatorProxyContractView extends ContractView {
96
296
  throw transformEtherError(e, undefined, stack);
97
297
  }
98
298
  }
99
- async latestTimestamp(overrides) {
299
+ async latestTimestamp(overrides, preparedData, ethCallContext) {
100
300
  try {
301
+ if (preparedData?.ethCallResults && ethCallContext) {
302
+ const iface = new Interface([
303
+ "function latestTimestamp() view returns (uint256)",
304
+ ]);
305
+ const calldata = iface.encodeFunctionData("latestTimestamp", []);
306
+ const key = makeEthCallKey({
307
+ context: ethCallContext,
308
+ calldata,
309
+ });
310
+ console.debug("looking up eth call key:", key);
311
+ const ret = preparedData.ethCallResults[key];
312
+ if (ret) {
313
+ console.debug("prepared eth call found:", key);
314
+ const result = iface
315
+ .decodeFunctionResult("latestTimestamp", ret)
316
+ .toArray();
317
+ return result.length == 1 ? result[0] : result;
318
+ }
319
+ console.debug("missing eth call key:", "latestTimestamp", key);
320
+ }
101
321
  return await this.contract.getFunction("latestTimestamp()")(overrides || {});
102
322
  }
103
323
  catch (e) {
@@ -105,8 +325,26 @@ export class EACAggregatorProxyContractView extends ContractView {
105
325
  throw transformEtherError(e, undefined, stack);
106
326
  }
107
327
  }
108
- async owner(overrides) {
328
+ async owner(overrides, preparedData, ethCallContext) {
109
329
  try {
330
+ if (preparedData?.ethCallResults && ethCallContext) {
331
+ const iface = new Interface([
332
+ "function owner() view returns (address)",
333
+ ]);
334
+ const calldata = iface.encodeFunctionData("owner", []);
335
+ const key = makeEthCallKey({
336
+ context: ethCallContext,
337
+ calldata,
338
+ });
339
+ console.debug("looking up eth call key:", key);
340
+ const ret = preparedData.ethCallResults[key];
341
+ if (ret) {
342
+ console.debug("prepared eth call found:", key);
343
+ const result = iface.decodeFunctionResult("owner", ret).toArray();
344
+ return result.length == 1 ? result[0] : result;
345
+ }
346
+ console.debug("missing eth call key:", "owner", key);
347
+ }
110
348
  return await this.contract.getFunction("owner()")(overrides || {});
111
349
  }
112
350
  catch (e) {
@@ -114,8 +352,28 @@ export class EACAggregatorProxyContractView extends ContractView {
114
352
  throw transformEtherError(e, undefined, stack);
115
353
  }
116
354
  }
117
- async phaseAggregators(arg0, overrides) {
355
+ async phaseAggregators(arg0, overrides, preparedData, ethCallContext) {
118
356
  try {
357
+ if (preparedData?.ethCallResults && ethCallContext) {
358
+ const iface = new Interface([
359
+ "function phaseAggregators(uint16) view returns (address)",
360
+ ]);
361
+ const calldata = iface.encodeFunctionData("phaseAggregators", [arg0]);
362
+ const key = makeEthCallKey({
363
+ context: ethCallContext,
364
+ calldata,
365
+ });
366
+ console.debug("looking up eth call key:", key);
367
+ const ret = preparedData.ethCallResults[key];
368
+ if (ret) {
369
+ console.debug("prepared eth call found:", key);
370
+ const result = iface
371
+ .decodeFunctionResult("phaseAggregators", ret)
372
+ .toArray();
373
+ return result.length == 1 ? result[0] : result;
374
+ }
375
+ console.debug("missing eth call key:", "phaseAggregators", arg0, key);
376
+ }
119
377
  return await this.contract.getFunction("phaseAggregators(uint16)")(arg0, overrides || {});
120
378
  }
121
379
  catch (e) {
@@ -123,8 +381,26 @@ export class EACAggregatorProxyContractView extends ContractView {
123
381
  throw transformEtherError(e, undefined, stack);
124
382
  }
125
383
  }
126
- async phaseId(overrides) {
384
+ async phaseId(overrides, preparedData, ethCallContext) {
127
385
  try {
386
+ if (preparedData?.ethCallResults && ethCallContext) {
387
+ const iface = new Interface([
388
+ "function phaseId() view returns (uint16)",
389
+ ]);
390
+ const calldata = iface.encodeFunctionData("phaseId", []);
391
+ const key = makeEthCallKey({
392
+ context: ethCallContext,
393
+ calldata,
394
+ });
395
+ console.debug("looking up eth call key:", key);
396
+ const ret = preparedData.ethCallResults[key];
397
+ if (ret) {
398
+ console.debug("prepared eth call found:", key);
399
+ const result = iface.decodeFunctionResult("phaseId", ret).toArray();
400
+ return result.length == 1 ? result[0] : result;
401
+ }
402
+ console.debug("missing eth call key:", "phaseId", key);
403
+ }
128
404
  return await this.contract.getFunction("phaseId()")(overrides || {});
129
405
  }
130
406
  catch (e) {
@@ -132,8 +408,28 @@ export class EACAggregatorProxyContractView extends ContractView {
132
408
  throw transformEtherError(e, undefined, stack);
133
409
  }
134
410
  }
135
- async proposedAggregator(overrides) {
411
+ async proposedAggregator(overrides, preparedData, ethCallContext) {
136
412
  try {
413
+ if (preparedData?.ethCallResults && ethCallContext) {
414
+ const iface = new Interface([
415
+ "function proposedAggregator() view returns (address)",
416
+ ]);
417
+ const calldata = iface.encodeFunctionData("proposedAggregator", []);
418
+ const key = makeEthCallKey({
419
+ context: ethCallContext,
420
+ calldata,
421
+ });
422
+ console.debug("looking up eth call key:", key);
423
+ const ret = preparedData.ethCallResults[key];
424
+ if (ret) {
425
+ console.debug("prepared eth call found:", key);
426
+ const result = iface
427
+ .decodeFunctionResult("proposedAggregator", ret)
428
+ .toArray();
429
+ return result.length == 1 ? result[0] : result;
430
+ }
431
+ console.debug("missing eth call key:", "proposedAggregator", key);
432
+ }
137
433
  return await this.contract.getFunction("proposedAggregator()")(overrides || {});
138
434
  }
139
435
  catch (e) {
@@ -141,8 +437,30 @@ export class EACAggregatorProxyContractView extends ContractView {
141
437
  throw transformEtherError(e, undefined, stack);
142
438
  }
143
439
  }
144
- async proposedGetRoundData(_roundId, overrides) {
440
+ async proposedGetRoundData(_roundId, overrides, preparedData, ethCallContext) {
145
441
  try {
442
+ if (preparedData?.ethCallResults && ethCallContext) {
443
+ const iface = new Interface([
444
+ "function proposedGetRoundData(uint80) view returns (uint80,int256,uint256,uint256,uint80)",
445
+ ]);
446
+ const calldata = iface.encodeFunctionData("proposedGetRoundData", [
447
+ _roundId,
448
+ ]);
449
+ const key = makeEthCallKey({
450
+ context: ethCallContext,
451
+ calldata,
452
+ });
453
+ console.debug("looking up eth call key:", key);
454
+ const ret = preparedData.ethCallResults[key];
455
+ if (ret) {
456
+ console.debug("prepared eth call found:", key);
457
+ const result = iface
458
+ .decodeFunctionResult("proposedGetRoundData", ret)
459
+ .toArray();
460
+ return result.length == 1 ? result[0] : result;
461
+ }
462
+ console.debug("missing eth call key:", "proposedGetRoundData", _roundId, key);
463
+ }
146
464
  return await this.contract.getFunction("proposedGetRoundData(uint80)")(_roundId, overrides || {});
147
465
  }
148
466
  catch (e) {
@@ -150,8 +468,28 @@ export class EACAggregatorProxyContractView extends ContractView {
150
468
  throw transformEtherError(e, undefined, stack);
151
469
  }
152
470
  }
153
- async proposedLatestRoundData(overrides) {
471
+ async proposedLatestRoundData(overrides, preparedData, ethCallContext) {
154
472
  try {
473
+ if (preparedData?.ethCallResults && ethCallContext) {
474
+ const iface = new Interface([
475
+ "function proposedLatestRoundData() view returns (uint80,int256,uint256,uint256,uint80)",
476
+ ]);
477
+ const calldata = iface.encodeFunctionData("proposedLatestRoundData", []);
478
+ const key = makeEthCallKey({
479
+ context: ethCallContext,
480
+ calldata,
481
+ });
482
+ console.debug("looking up eth call key:", key);
483
+ const ret = preparedData.ethCallResults[key];
484
+ if (ret) {
485
+ console.debug("prepared eth call found:", key);
486
+ const result = iface
487
+ .decodeFunctionResult("proposedLatestRoundData", ret)
488
+ .toArray();
489
+ return result.length == 1 ? result[0] : result;
490
+ }
491
+ console.debug("missing eth call key:", "proposedLatestRoundData", key);
492
+ }
155
493
  return await this.contract.getFunction("proposedLatestRoundData()")(overrides || {});
156
494
  }
157
495
  catch (e) {
@@ -159,8 +497,26 @@ export class EACAggregatorProxyContractView extends ContractView {
159
497
  throw transformEtherError(e, undefined, stack);
160
498
  }
161
499
  }
162
- async version(overrides) {
500
+ async version(overrides, preparedData, ethCallContext) {
163
501
  try {
502
+ if (preparedData?.ethCallResults && ethCallContext) {
503
+ const iface = new Interface([
504
+ "function version() view returns (uint256)",
505
+ ]);
506
+ const calldata = iface.encodeFunctionData("version", []);
507
+ const key = makeEthCallKey({
508
+ context: ethCallContext,
509
+ calldata,
510
+ });
511
+ console.debug("looking up eth call key:", key);
512
+ const ret = preparedData.ethCallResults[key];
513
+ if (ret) {
514
+ console.debug("prepared eth call found:", key);
515
+ const result = iface.decodeFunctionResult("version", ret).toArray();
516
+ return result.length == 1 ? result[0] : result;
517
+ }
518
+ console.debug("missing eth call key:", "version", key);
519
+ }
164
520
  return await this.contract.getFunction("version()")(overrides || {});
165
521
  }
166
522
  catch (e) {
@@ -170,8 +526,28 @@ export class EACAggregatorProxyContractView extends ContractView {
170
526
  }
171
527
  callStatic = {
172
528
  contract: this.contract,
173
- async acceptOwnership(overrides) {
529
+ async acceptOwnership(overrides, preparedData, ethCallContext) {
174
530
  try {
531
+ if (preparedData?.ethCallResults && ethCallContext) {
532
+ const iface = new Interface([
533
+ "function acceptOwnership() nonpayable returns ()",
534
+ ]);
535
+ const calldata = iface.encodeFunctionData("acceptOwnership", []);
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("acceptOwnership", ret)
546
+ .toArray();
547
+ return result.length == 1 ? result[0] : result;
548
+ }
549
+ console.debug("missing eth call key:", "acceptOwnership", key);
550
+ }
175
551
  return await this.contract
176
552
  .getFunction("acceptOwnership()")
177
553
  .staticCall(overrides || {});
@@ -181,8 +557,30 @@ export class EACAggregatorProxyContractView extends ContractView {
181
557
  throw transformEtherError(e, undefined, stack);
182
558
  }
183
559
  },
184
- async confirmAggregator(_aggregator, overrides) {
560
+ async confirmAggregator(_aggregator, overrides, preparedData, ethCallContext) {
185
561
  try {
562
+ if (preparedData?.ethCallResults && ethCallContext) {
563
+ const iface = new Interface([
564
+ "function confirmAggregator(address) nonpayable returns ()",
565
+ ]);
566
+ const calldata = iface.encodeFunctionData("confirmAggregator", [
567
+ _aggregator,
568
+ ]);
569
+ const key = makeEthCallKey({
570
+ context: ethCallContext,
571
+ calldata,
572
+ });
573
+ console.debug("looking up eth call key:", key);
574
+ const ret = preparedData.ethCallResults[key];
575
+ if (ret) {
576
+ console.debug("prepared eth call found:", key);
577
+ const result = iface
578
+ .decodeFunctionResult("confirmAggregator", ret)
579
+ .toArray();
580
+ return result.length == 1 ? result[0] : result;
581
+ }
582
+ console.debug("missing eth call key:", "confirmAggregator", _aggregator, key);
583
+ }
186
584
  return await this.contract
187
585
  .getFunction("confirmAggregator(address)")
188
586
  .staticCall(_aggregator, overrides || {});
@@ -192,8 +590,30 @@ export class EACAggregatorProxyContractView extends ContractView {
192
590
  throw transformEtherError(e, undefined, stack);
193
591
  }
194
592
  },
195
- async proposeAggregator(_aggregator, overrides) {
593
+ async proposeAggregator(_aggregator, overrides, preparedData, ethCallContext) {
196
594
  try {
595
+ if (preparedData?.ethCallResults && ethCallContext) {
596
+ const iface = new Interface([
597
+ "function proposeAggregator(address) nonpayable returns ()",
598
+ ]);
599
+ const calldata = iface.encodeFunctionData("proposeAggregator", [
600
+ _aggregator,
601
+ ]);
602
+ const key = makeEthCallKey({
603
+ context: ethCallContext,
604
+ calldata,
605
+ });
606
+ console.debug("looking up eth call key:", key);
607
+ const ret = preparedData.ethCallResults[key];
608
+ if (ret) {
609
+ console.debug("prepared eth call found:", key);
610
+ const result = iface
611
+ .decodeFunctionResult("proposeAggregator", ret)
612
+ .toArray();
613
+ return result.length == 1 ? result[0] : result;
614
+ }
615
+ console.debug("missing eth call key:", "proposeAggregator", _aggregator, key);
616
+ }
197
617
  return await this.contract
198
618
  .getFunction("proposeAggregator(address)")
199
619
  .staticCall(_aggregator, overrides || {});
@@ -203,8 +623,30 @@ export class EACAggregatorProxyContractView extends ContractView {
203
623
  throw transformEtherError(e, undefined, stack);
204
624
  }
205
625
  },
206
- async setController(_accessController, overrides) {
626
+ async setController(_accessController, overrides, preparedData, ethCallContext) {
207
627
  try {
628
+ if (preparedData?.ethCallResults && ethCallContext) {
629
+ const iface = new Interface([
630
+ "function setController(address) nonpayable returns ()",
631
+ ]);
632
+ const calldata = iface.encodeFunctionData("setController", [
633
+ _accessController,
634
+ ]);
635
+ const key = makeEthCallKey({
636
+ context: ethCallContext,
637
+ calldata,
638
+ });
639
+ console.debug("looking up eth call key:", key);
640
+ const ret = preparedData.ethCallResults[key];
641
+ if (ret) {
642
+ console.debug("prepared eth call found:", key);
643
+ const result = iface
644
+ .decodeFunctionResult("setController", ret)
645
+ .toArray();
646
+ return result.length == 1 ? result[0] : result;
647
+ }
648
+ console.debug("missing eth call key:", "setController", _accessController, key);
649
+ }
208
650
  return await this.contract
209
651
  .getFunction("setController(address)")
210
652
  .staticCall(_accessController, overrides || {});
@@ -214,8 +656,28 @@ export class EACAggregatorProxyContractView extends ContractView {
214
656
  throw transformEtherError(e, undefined, stack);
215
657
  }
216
658
  },
217
- async transferOwnership(_to, overrides) {
659
+ async transferOwnership(_to, overrides, preparedData, ethCallContext) {
218
660
  try {
661
+ if (preparedData?.ethCallResults && ethCallContext) {
662
+ const iface = new Interface([
663
+ "function transferOwnership(address) nonpayable returns ()",
664
+ ]);
665
+ const calldata = iface.encodeFunctionData("transferOwnership", [_to]);
666
+ const key = makeEthCallKey({
667
+ context: ethCallContext,
668
+ calldata,
669
+ });
670
+ console.debug("looking up eth call key:", key);
671
+ const ret = preparedData.ethCallResults[key];
672
+ if (ret) {
673
+ console.debug("prepared eth call found:", key);
674
+ const result = iface
675
+ .decodeFunctionResult("transferOwnership", ret)
676
+ .toArray();
677
+ return result.length == 1 ? result[0] : result;
678
+ }
679
+ console.debug("missing eth call key:", "transferOwnership", _to, key);
680
+ }
219
681
  return await this.contract
220
682
  .getFunction("transferOwnership(address)")
221
683
  .staticCall(_to, overrides || {});
@@ -226,149 +688,936 @@ export class EACAggregatorProxyContractView extends ContractView {
226
688
  }
227
689
  },
228
690
  };
691
+ encodeCall = {
692
+ acceptOwnership(ethCallContext) {
693
+ try {
694
+ const iface = new Interface(["function acceptOwnership()"]);
695
+ const calldata = iface.encodeFunctionData("acceptOwnership", []);
696
+ return {
697
+ context: ethCallContext,
698
+ calldata,
699
+ };
700
+ }
701
+ catch (e) {
702
+ const stack = new Error().stack;
703
+ throw transformEtherError(e, undefined, stack);
704
+ }
705
+ },
706
+ accessController(ethCallContext) {
707
+ try {
708
+ const iface = new Interface(["function accessController()"]);
709
+ const calldata = iface.encodeFunctionData("accessController", []);
710
+ return {
711
+ context: ethCallContext,
712
+ calldata,
713
+ };
714
+ }
715
+ catch (e) {
716
+ const stack = new Error().stack;
717
+ throw transformEtherError(e, undefined, stack);
718
+ }
719
+ },
720
+ aggregator(ethCallContext) {
721
+ try {
722
+ const iface = new Interface(["function aggregator()"]);
723
+ const calldata = iface.encodeFunctionData("aggregator", []);
724
+ return {
725
+ context: ethCallContext,
726
+ calldata,
727
+ };
728
+ }
729
+ catch (e) {
730
+ const stack = new Error().stack;
731
+ throw transformEtherError(e, undefined, stack);
732
+ }
733
+ },
734
+ confirmAggregator(_aggregator, ethCallContext) {
735
+ try {
736
+ const iface = new Interface(["function confirmAggregator(address)"]);
737
+ const calldata = iface.encodeFunctionData("confirmAggregator", [
738
+ _aggregator,
739
+ ]);
740
+ return {
741
+ context: ethCallContext,
742
+ calldata,
743
+ };
744
+ }
745
+ catch (e) {
746
+ const stack = new Error().stack;
747
+ throw transformEtherError(e, undefined, stack);
748
+ }
749
+ },
750
+ decimals(ethCallContext) {
751
+ try {
752
+ const iface = new Interface(["function decimals()"]);
753
+ const calldata = iface.encodeFunctionData("decimals", []);
754
+ return {
755
+ context: ethCallContext,
756
+ calldata,
757
+ };
758
+ }
759
+ catch (e) {
760
+ const stack = new Error().stack;
761
+ throw transformEtherError(e, undefined, stack);
762
+ }
763
+ },
764
+ description(ethCallContext) {
765
+ try {
766
+ const iface = new Interface(["function description()"]);
767
+ const calldata = iface.encodeFunctionData("description", []);
768
+ return {
769
+ context: ethCallContext,
770
+ calldata,
771
+ };
772
+ }
773
+ catch (e) {
774
+ const stack = new Error().stack;
775
+ throw transformEtherError(e, undefined, stack);
776
+ }
777
+ },
778
+ getAnswer(_roundId, ethCallContext) {
779
+ try {
780
+ const iface = new Interface(["function getAnswer(uint256)"]);
781
+ const calldata = iface.encodeFunctionData("getAnswer", [_roundId]);
782
+ return {
783
+ context: ethCallContext,
784
+ calldata,
785
+ };
786
+ }
787
+ catch (e) {
788
+ const stack = new Error().stack;
789
+ throw transformEtherError(e, undefined, stack);
790
+ }
791
+ },
792
+ getRoundData(_roundId, ethCallContext) {
793
+ try {
794
+ const iface = new Interface(["function getRoundData(uint80)"]);
795
+ const calldata = iface.encodeFunctionData("getRoundData", [_roundId]);
796
+ return {
797
+ context: ethCallContext,
798
+ calldata,
799
+ };
800
+ }
801
+ catch (e) {
802
+ const stack = new Error().stack;
803
+ throw transformEtherError(e, undefined, stack);
804
+ }
805
+ },
806
+ getTimestamp(_roundId, ethCallContext) {
807
+ try {
808
+ const iface = new Interface(["function getTimestamp(uint256)"]);
809
+ const calldata = iface.encodeFunctionData("getTimestamp", [_roundId]);
810
+ return {
811
+ context: ethCallContext,
812
+ calldata,
813
+ };
814
+ }
815
+ catch (e) {
816
+ const stack = new Error().stack;
817
+ throw transformEtherError(e, undefined, stack);
818
+ }
819
+ },
820
+ latestAnswer(ethCallContext) {
821
+ try {
822
+ const iface = new Interface(["function latestAnswer()"]);
823
+ const calldata = iface.encodeFunctionData("latestAnswer", []);
824
+ return {
825
+ context: ethCallContext,
826
+ calldata,
827
+ };
828
+ }
829
+ catch (e) {
830
+ const stack = new Error().stack;
831
+ throw transformEtherError(e, undefined, stack);
832
+ }
833
+ },
834
+ latestRound(ethCallContext) {
835
+ try {
836
+ const iface = new Interface(["function latestRound()"]);
837
+ const calldata = iface.encodeFunctionData("latestRound", []);
838
+ return {
839
+ context: ethCallContext,
840
+ calldata,
841
+ };
842
+ }
843
+ catch (e) {
844
+ const stack = new Error().stack;
845
+ throw transformEtherError(e, undefined, stack);
846
+ }
847
+ },
848
+ latestRoundData(ethCallContext) {
849
+ try {
850
+ const iface = new Interface(["function latestRoundData()"]);
851
+ const calldata = iface.encodeFunctionData("latestRoundData", []);
852
+ return {
853
+ context: ethCallContext,
854
+ calldata,
855
+ };
856
+ }
857
+ catch (e) {
858
+ const stack = new Error().stack;
859
+ throw transformEtherError(e, undefined, stack);
860
+ }
861
+ },
862
+ latestTimestamp(ethCallContext) {
863
+ try {
864
+ const iface = new Interface(["function latestTimestamp()"]);
865
+ const calldata = iface.encodeFunctionData("latestTimestamp", []);
866
+ return {
867
+ context: ethCallContext,
868
+ calldata,
869
+ };
870
+ }
871
+ catch (e) {
872
+ const stack = new Error().stack;
873
+ throw transformEtherError(e, undefined, stack);
874
+ }
875
+ },
876
+ owner(ethCallContext) {
877
+ try {
878
+ const iface = new Interface(["function owner()"]);
879
+ const calldata = iface.encodeFunctionData("owner", []);
880
+ return {
881
+ context: ethCallContext,
882
+ calldata,
883
+ };
884
+ }
885
+ catch (e) {
886
+ const stack = new Error().stack;
887
+ throw transformEtherError(e, undefined, stack);
888
+ }
889
+ },
890
+ phaseAggregators(arg0, ethCallContext) {
891
+ try {
892
+ const iface = new Interface(["function phaseAggregators(uint16)"]);
893
+ const calldata = iface.encodeFunctionData("phaseAggregators", [arg0]);
894
+ return {
895
+ context: ethCallContext,
896
+ calldata,
897
+ };
898
+ }
899
+ catch (e) {
900
+ const stack = new Error().stack;
901
+ throw transformEtherError(e, undefined, stack);
902
+ }
903
+ },
904
+ phaseId(ethCallContext) {
905
+ try {
906
+ const iface = new Interface(["function phaseId()"]);
907
+ const calldata = iface.encodeFunctionData("phaseId", []);
908
+ return {
909
+ context: ethCallContext,
910
+ calldata,
911
+ };
912
+ }
913
+ catch (e) {
914
+ const stack = new Error().stack;
915
+ throw transformEtherError(e, undefined, stack);
916
+ }
917
+ },
918
+ proposeAggregator(_aggregator, ethCallContext) {
919
+ try {
920
+ const iface = new Interface(["function proposeAggregator(address)"]);
921
+ const calldata = iface.encodeFunctionData("proposeAggregator", [
922
+ _aggregator,
923
+ ]);
924
+ return {
925
+ context: ethCallContext,
926
+ calldata,
927
+ };
928
+ }
929
+ catch (e) {
930
+ const stack = new Error().stack;
931
+ throw transformEtherError(e, undefined, stack);
932
+ }
933
+ },
934
+ proposedAggregator(ethCallContext) {
935
+ try {
936
+ const iface = new Interface(["function proposedAggregator()"]);
937
+ const calldata = iface.encodeFunctionData("proposedAggregator", []);
938
+ return {
939
+ context: ethCallContext,
940
+ calldata,
941
+ };
942
+ }
943
+ catch (e) {
944
+ const stack = new Error().stack;
945
+ throw transformEtherError(e, undefined, stack);
946
+ }
947
+ },
948
+ proposedGetRoundData(_roundId, ethCallContext) {
949
+ try {
950
+ const iface = new Interface(["function proposedGetRoundData(uint80)"]);
951
+ const calldata = iface.encodeFunctionData("proposedGetRoundData", [
952
+ _roundId,
953
+ ]);
954
+ return {
955
+ context: ethCallContext,
956
+ calldata,
957
+ };
958
+ }
959
+ catch (e) {
960
+ const stack = new Error().stack;
961
+ throw transformEtherError(e, undefined, stack);
962
+ }
963
+ },
964
+ proposedLatestRoundData(ethCallContext) {
965
+ try {
966
+ const iface = new Interface(["function proposedLatestRoundData()"]);
967
+ const calldata = iface.encodeFunctionData("proposedLatestRoundData", []);
968
+ return {
969
+ context: ethCallContext,
970
+ calldata,
971
+ };
972
+ }
973
+ catch (e) {
974
+ const stack = new Error().stack;
975
+ throw transformEtherError(e, undefined, stack);
976
+ }
977
+ },
978
+ setController(_accessController, ethCallContext) {
979
+ try {
980
+ const iface = new Interface(["function setController(address)"]);
981
+ const calldata = iface.encodeFunctionData("setController", [
982
+ _accessController,
983
+ ]);
984
+ return {
985
+ context: ethCallContext,
986
+ calldata,
987
+ };
988
+ }
989
+ catch (e) {
990
+ const stack = new Error().stack;
991
+ throw transformEtherError(e, undefined, stack);
992
+ }
993
+ },
994
+ transferOwnership(_to, ethCallContext) {
995
+ try {
996
+ const iface = new Interface(["function transferOwnership(address)"]);
997
+ const calldata = iface.encodeFunctionData("transferOwnership", [_to]);
998
+ return {
999
+ context: ethCallContext,
1000
+ calldata,
1001
+ };
1002
+ }
1003
+ catch (e) {
1004
+ const stack = new Error().stack;
1005
+ throw transformEtherError(e, undefined, stack);
1006
+ }
1007
+ },
1008
+ version(ethCallContext) {
1009
+ try {
1010
+ const iface = new Interface(["function version()"]);
1011
+ const calldata = iface.encodeFunctionData("version", []);
1012
+ return {
1013
+ context: ethCallContext,
1014
+ calldata,
1015
+ };
1016
+ }
1017
+ catch (e) {
1018
+ const stack = new Error().stack;
1019
+ throw transformEtherError(e, undefined, stack);
1020
+ }
1021
+ },
1022
+ };
229
1023
  }
230
1024
  export class EACAggregatorProxyBoundContractView extends BoundContractView {
231
1025
  async accessController(overrides) {
1026
+ const ethCallContext = {
1027
+ chainId: this.context.chainId,
1028
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1029
+ address: this.context.address,
1030
+ };
232
1031
  return await this.view.accessController({
233
1032
  blockTag: this.context.blockNumber,
234
1033
  ...overrides,
235
- });
1034
+ }, this.context.preparedData, ethCallContext);
236
1035
  }
237
1036
  async aggregator(overrides) {
1037
+ const ethCallContext = {
1038
+ chainId: this.context.chainId,
1039
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1040
+ address: this.context.address,
1041
+ };
238
1042
  return await this.view.aggregator({
239
1043
  blockTag: this.context.blockNumber,
240
1044
  ...overrides,
241
- });
1045
+ }, this.context.preparedData, ethCallContext);
242
1046
  }
243
1047
  async decimals(overrides) {
1048
+ const ethCallContext = {
1049
+ chainId: this.context.chainId,
1050
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1051
+ address: this.context.address,
1052
+ };
244
1053
  return await this.view.decimals({
245
1054
  blockTag: this.context.blockNumber,
246
1055
  ...overrides,
247
- });
1056
+ }, this.context.preparedData, ethCallContext);
248
1057
  }
249
1058
  async description(overrides) {
1059
+ const ethCallContext = {
1060
+ chainId: this.context.chainId,
1061
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1062
+ address: this.context.address,
1063
+ };
250
1064
  return await this.view.description({
251
1065
  blockTag: this.context.blockNumber,
252
1066
  ...overrides,
253
- });
1067
+ }, this.context.preparedData, ethCallContext);
254
1068
  }
255
1069
  async getAnswer(_roundId, overrides) {
1070
+ const ethCallContext = {
1071
+ chainId: this.context.chainId,
1072
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1073
+ address: this.context.address,
1074
+ };
256
1075
  return await this.view.getAnswer(_roundId, {
257
1076
  blockTag: this.context.blockNumber,
258
1077
  ...overrides,
259
- });
1078
+ }, this.context.preparedData, ethCallContext);
260
1079
  }
261
1080
  async getRoundData(_roundId, overrides) {
1081
+ const ethCallContext = {
1082
+ chainId: this.context.chainId,
1083
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1084
+ address: this.context.address,
1085
+ };
262
1086
  return await this.view.getRoundData(_roundId, {
263
1087
  blockTag: this.context.blockNumber,
264
1088
  ...overrides,
265
- });
1089
+ }, this.context.preparedData, ethCallContext);
266
1090
  }
267
1091
  async getTimestamp(_roundId, overrides) {
1092
+ const ethCallContext = {
1093
+ chainId: this.context.chainId,
1094
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1095
+ address: this.context.address,
1096
+ };
268
1097
  return await this.view.getTimestamp(_roundId, {
269
1098
  blockTag: this.context.blockNumber,
270
1099
  ...overrides,
271
- });
1100
+ }, this.context.preparedData, ethCallContext);
272
1101
  }
273
1102
  async latestAnswer(overrides) {
1103
+ const ethCallContext = {
1104
+ chainId: this.context.chainId,
1105
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1106
+ address: this.context.address,
1107
+ };
274
1108
  return await this.view.latestAnswer({
275
1109
  blockTag: this.context.blockNumber,
276
1110
  ...overrides,
277
- });
1111
+ }, this.context.preparedData, ethCallContext);
278
1112
  }
279
1113
  async latestRound(overrides) {
1114
+ const ethCallContext = {
1115
+ chainId: this.context.chainId,
1116
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1117
+ address: this.context.address,
1118
+ };
280
1119
  return await this.view.latestRound({
281
1120
  blockTag: this.context.blockNumber,
282
1121
  ...overrides,
283
- });
1122
+ }, this.context.preparedData, ethCallContext);
284
1123
  }
285
1124
  async latestRoundData(overrides) {
1125
+ const ethCallContext = {
1126
+ chainId: this.context.chainId,
1127
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1128
+ address: this.context.address,
1129
+ };
286
1130
  return await this.view.latestRoundData({
287
1131
  blockTag: this.context.blockNumber,
288
1132
  ...overrides,
289
- });
1133
+ }, this.context.preparedData, ethCallContext);
290
1134
  }
291
1135
  async latestTimestamp(overrides) {
1136
+ const ethCallContext = {
1137
+ chainId: this.context.chainId,
1138
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1139
+ address: this.context.address,
1140
+ };
292
1141
  return await this.view.latestTimestamp({
293
1142
  blockTag: this.context.blockNumber,
294
1143
  ...overrides,
295
- });
1144
+ }, this.context.preparedData, ethCallContext);
296
1145
  }
297
1146
  async owner(overrides) {
1147
+ const ethCallContext = {
1148
+ chainId: this.context.chainId,
1149
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1150
+ address: this.context.address,
1151
+ };
298
1152
  return await this.view.owner({
299
1153
  blockTag: this.context.blockNumber,
300
1154
  ...overrides,
301
- });
1155
+ }, this.context.preparedData, ethCallContext);
302
1156
  }
303
1157
  async phaseAggregators(arg0, overrides) {
1158
+ const ethCallContext = {
1159
+ chainId: this.context.chainId,
1160
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1161
+ address: this.context.address,
1162
+ };
304
1163
  return await this.view.phaseAggregators(arg0, {
305
1164
  blockTag: this.context.blockNumber,
306
1165
  ...overrides,
307
- });
1166
+ }, this.context.preparedData, ethCallContext);
308
1167
  }
309
1168
  async phaseId(overrides) {
1169
+ const ethCallContext = {
1170
+ chainId: this.context.chainId,
1171
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1172
+ address: this.context.address,
1173
+ };
310
1174
  return await this.view.phaseId({
311
1175
  blockTag: this.context.blockNumber,
312
1176
  ...overrides,
313
- });
1177
+ }, this.context.preparedData, ethCallContext);
314
1178
  }
315
1179
  async proposedAggregator(overrides) {
1180
+ const ethCallContext = {
1181
+ chainId: this.context.chainId,
1182
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1183
+ address: this.context.address,
1184
+ };
316
1185
  return await this.view.proposedAggregator({
317
1186
  blockTag: this.context.blockNumber,
318
1187
  ...overrides,
319
- });
1188
+ }, this.context.preparedData, ethCallContext);
320
1189
  }
321
1190
  async proposedGetRoundData(_roundId, overrides) {
1191
+ const ethCallContext = {
1192
+ chainId: this.context.chainId,
1193
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1194
+ address: this.context.address,
1195
+ };
322
1196
  return await this.view.proposedGetRoundData(_roundId, {
323
1197
  blockTag: this.context.blockNumber,
324
1198
  ...overrides,
325
- });
1199
+ }, this.context.preparedData, ethCallContext);
326
1200
  }
327
1201
  async proposedLatestRoundData(overrides) {
1202
+ const ethCallContext = {
1203
+ chainId: this.context.chainId,
1204
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1205
+ address: this.context.address,
1206
+ };
328
1207
  return await this.view.proposedLatestRoundData({
329
1208
  blockTag: this.context.blockNumber,
330
1209
  ...overrides,
331
- });
1210
+ }, this.context.preparedData, ethCallContext);
332
1211
  }
333
1212
  async version(overrides) {
1213
+ const ethCallContext = {
1214
+ chainId: this.context.chainId,
1215
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1216
+ address: this.context.address,
1217
+ };
334
1218
  return await this.view.version({
335
1219
  blockTag: this.context.blockNumber,
336
1220
  ...overrides,
337
- });
1221
+ }, this.context.preparedData, ethCallContext);
338
1222
  }
339
1223
  callStatic = {
340
1224
  view: this.view,
341
1225
  context: this.context,
342
1226
  async acceptOwnership(overrides) {
1227
+ const ethCallContext = {
1228
+ chainId: this.context.chainId,
1229
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1230
+ address: this.context.address,
1231
+ };
343
1232
  return await this.view.callStatic.acceptOwnership({
344
1233
  blockTag: this.context.blockNumber,
345
1234
  ...overrides,
346
- });
1235
+ }, this.context.preparedData, ethCallContext);
347
1236
  },
348
1237
  async confirmAggregator(_aggregator, overrides) {
1238
+ const ethCallContext = {
1239
+ chainId: this.context.chainId,
1240
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1241
+ address: this.context.address,
1242
+ };
349
1243
  return await this.view.callStatic.confirmAggregator(_aggregator, {
350
1244
  blockTag: this.context.blockNumber,
351
1245
  ...overrides,
352
- });
1246
+ }, this.context.preparedData, ethCallContext);
353
1247
  },
354
1248
  async proposeAggregator(_aggregator, overrides) {
1249
+ const ethCallContext = {
1250
+ chainId: this.context.chainId,
1251
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1252
+ address: this.context.address,
1253
+ };
355
1254
  return await this.view.callStatic.proposeAggregator(_aggregator, {
356
1255
  blockTag: this.context.blockNumber,
357
1256
  ...overrides,
358
- });
1257
+ }, this.context.preparedData, ethCallContext);
359
1258
  },
360
1259
  async setController(_accessController, overrides) {
1260
+ const ethCallContext = {
1261
+ chainId: this.context.chainId,
1262
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1263
+ address: this.context.address,
1264
+ };
361
1265
  return await this.view.callStatic.setController(_accessController, {
362
1266
  blockTag: this.context.blockNumber,
363
1267
  ...overrides,
364
- });
1268
+ }, this.context.preparedData, ethCallContext);
365
1269
  },
366
1270
  async transferOwnership(_to, overrides) {
1271
+ const ethCallContext = {
1272
+ chainId: this.context.chainId,
1273
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1274
+ address: this.context.address,
1275
+ };
367
1276
  return await this.view.callStatic.transferOwnership(_to, {
368
1277
  blockTag: this.context.blockNumber,
369
1278
  ...overrides,
1279
+ }, this.context.preparedData, ethCallContext);
1280
+ },
1281
+ };
1282
+ encodeCall = {
1283
+ view: this.view,
1284
+ context: this.context,
1285
+ acceptOwnership(overrides) {
1286
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1287
+ const address = this.context.address;
1288
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1289
+ if (overrides?.blockTag) {
1290
+ blockTag =
1291
+ typeof overrides.blockTag == "string"
1292
+ ? overrides.blockTag
1293
+ : "0x" + overrides.blockTag.toString(16);
1294
+ }
1295
+ return this.view.encodeCall.acceptOwnership({
1296
+ chainId,
1297
+ address,
1298
+ blockTag,
1299
+ });
1300
+ },
1301
+ accessController(overrides) {
1302
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1303
+ const address = this.context.address;
1304
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1305
+ if (overrides?.blockTag) {
1306
+ blockTag =
1307
+ typeof overrides.blockTag == "string"
1308
+ ? overrides.blockTag
1309
+ : "0x" + overrides.blockTag.toString(16);
1310
+ }
1311
+ return this.view.encodeCall.accessController({
1312
+ chainId,
1313
+ address,
1314
+ blockTag,
1315
+ });
1316
+ },
1317
+ aggregator(overrides) {
1318
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1319
+ const address = this.context.address;
1320
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1321
+ if (overrides?.blockTag) {
1322
+ blockTag =
1323
+ typeof overrides.blockTag == "string"
1324
+ ? overrides.blockTag
1325
+ : "0x" + overrides.blockTag.toString(16);
1326
+ }
1327
+ return this.view.encodeCall.aggregator({ chainId, address, blockTag });
1328
+ },
1329
+ confirmAggregator(_aggregator, overrides) {
1330
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1331
+ const address = this.context.address;
1332
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1333
+ if (overrides?.blockTag) {
1334
+ blockTag =
1335
+ typeof overrides.blockTag == "string"
1336
+ ? overrides.blockTag
1337
+ : "0x" + overrides.blockTag.toString(16);
1338
+ }
1339
+ return this.view.encodeCall.confirmAggregator(_aggregator, {
1340
+ chainId,
1341
+ address,
1342
+ blockTag,
370
1343
  });
371
1344
  },
1345
+ decimals(overrides) {
1346
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1347
+ const address = this.context.address;
1348
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1349
+ if (overrides?.blockTag) {
1350
+ blockTag =
1351
+ typeof overrides.blockTag == "string"
1352
+ ? overrides.blockTag
1353
+ : "0x" + overrides.blockTag.toString(16);
1354
+ }
1355
+ return this.view.encodeCall.decimals({ chainId, address, blockTag });
1356
+ },
1357
+ description(overrides) {
1358
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1359
+ const address = this.context.address;
1360
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1361
+ if (overrides?.blockTag) {
1362
+ blockTag =
1363
+ typeof overrides.blockTag == "string"
1364
+ ? overrides.blockTag
1365
+ : "0x" + overrides.blockTag.toString(16);
1366
+ }
1367
+ return this.view.encodeCall.description({ chainId, address, blockTag });
1368
+ },
1369
+ getAnswer(_roundId, overrides) {
1370
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1371
+ const address = this.context.address;
1372
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1373
+ if (overrides?.blockTag) {
1374
+ blockTag =
1375
+ typeof overrides.blockTag == "string"
1376
+ ? overrides.blockTag
1377
+ : "0x" + overrides.blockTag.toString(16);
1378
+ }
1379
+ return this.view.encodeCall.getAnswer(_roundId, {
1380
+ chainId,
1381
+ address,
1382
+ blockTag,
1383
+ });
1384
+ },
1385
+ getRoundData(_roundId, overrides) {
1386
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1387
+ const address = this.context.address;
1388
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1389
+ if (overrides?.blockTag) {
1390
+ blockTag =
1391
+ typeof overrides.blockTag == "string"
1392
+ ? overrides.blockTag
1393
+ : "0x" + overrides.blockTag.toString(16);
1394
+ }
1395
+ return this.view.encodeCall.getRoundData(_roundId, {
1396
+ chainId,
1397
+ address,
1398
+ blockTag,
1399
+ });
1400
+ },
1401
+ getTimestamp(_roundId, overrides) {
1402
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1403
+ const address = this.context.address;
1404
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1405
+ if (overrides?.blockTag) {
1406
+ blockTag =
1407
+ typeof overrides.blockTag == "string"
1408
+ ? overrides.blockTag
1409
+ : "0x" + overrides.blockTag.toString(16);
1410
+ }
1411
+ return this.view.encodeCall.getTimestamp(_roundId, {
1412
+ chainId,
1413
+ address,
1414
+ blockTag,
1415
+ });
1416
+ },
1417
+ latestAnswer(overrides) {
1418
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1419
+ const address = this.context.address;
1420
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1421
+ if (overrides?.blockTag) {
1422
+ blockTag =
1423
+ typeof overrides.blockTag == "string"
1424
+ ? overrides.blockTag
1425
+ : "0x" + overrides.blockTag.toString(16);
1426
+ }
1427
+ return this.view.encodeCall.latestAnswer({ chainId, address, blockTag });
1428
+ },
1429
+ latestRound(overrides) {
1430
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1431
+ const address = this.context.address;
1432
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1433
+ if (overrides?.blockTag) {
1434
+ blockTag =
1435
+ typeof overrides.blockTag == "string"
1436
+ ? overrides.blockTag
1437
+ : "0x" + overrides.blockTag.toString(16);
1438
+ }
1439
+ return this.view.encodeCall.latestRound({ chainId, address, blockTag });
1440
+ },
1441
+ latestRoundData(overrides) {
1442
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1443
+ const address = this.context.address;
1444
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1445
+ if (overrides?.blockTag) {
1446
+ blockTag =
1447
+ typeof overrides.blockTag == "string"
1448
+ ? overrides.blockTag
1449
+ : "0x" + overrides.blockTag.toString(16);
1450
+ }
1451
+ return this.view.encodeCall.latestRoundData({
1452
+ chainId,
1453
+ address,
1454
+ blockTag,
1455
+ });
1456
+ },
1457
+ latestTimestamp(overrides) {
1458
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1459
+ const address = this.context.address;
1460
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1461
+ if (overrides?.blockTag) {
1462
+ blockTag =
1463
+ typeof overrides.blockTag == "string"
1464
+ ? overrides.blockTag
1465
+ : "0x" + overrides.blockTag.toString(16);
1466
+ }
1467
+ return this.view.encodeCall.latestTimestamp({
1468
+ chainId,
1469
+ address,
1470
+ blockTag,
1471
+ });
1472
+ },
1473
+ owner(overrides) {
1474
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1475
+ const address = this.context.address;
1476
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1477
+ if (overrides?.blockTag) {
1478
+ blockTag =
1479
+ typeof overrides.blockTag == "string"
1480
+ ? overrides.blockTag
1481
+ : "0x" + overrides.blockTag.toString(16);
1482
+ }
1483
+ return this.view.encodeCall.owner({ chainId, address, blockTag });
1484
+ },
1485
+ phaseAggregators(arg0, overrides) {
1486
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1487
+ const address = this.context.address;
1488
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1489
+ if (overrides?.blockTag) {
1490
+ blockTag =
1491
+ typeof overrides.blockTag == "string"
1492
+ ? overrides.blockTag
1493
+ : "0x" + overrides.blockTag.toString(16);
1494
+ }
1495
+ return this.view.encodeCall.phaseAggregators(arg0, {
1496
+ chainId,
1497
+ address,
1498
+ blockTag,
1499
+ });
1500
+ },
1501
+ phaseId(overrides) {
1502
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1503
+ const address = this.context.address;
1504
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1505
+ if (overrides?.blockTag) {
1506
+ blockTag =
1507
+ typeof overrides.blockTag == "string"
1508
+ ? overrides.blockTag
1509
+ : "0x" + overrides.blockTag.toString(16);
1510
+ }
1511
+ return this.view.encodeCall.phaseId({ chainId, address, blockTag });
1512
+ },
1513
+ proposeAggregator(_aggregator, overrides) {
1514
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1515
+ const address = this.context.address;
1516
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1517
+ if (overrides?.blockTag) {
1518
+ blockTag =
1519
+ typeof overrides.blockTag == "string"
1520
+ ? overrides.blockTag
1521
+ : "0x" + overrides.blockTag.toString(16);
1522
+ }
1523
+ return this.view.encodeCall.proposeAggregator(_aggregator, {
1524
+ chainId,
1525
+ address,
1526
+ blockTag,
1527
+ });
1528
+ },
1529
+ proposedAggregator(overrides) {
1530
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1531
+ const address = this.context.address;
1532
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1533
+ if (overrides?.blockTag) {
1534
+ blockTag =
1535
+ typeof overrides.blockTag == "string"
1536
+ ? overrides.blockTag
1537
+ : "0x" + overrides.blockTag.toString(16);
1538
+ }
1539
+ return this.view.encodeCall.proposedAggregator({
1540
+ chainId,
1541
+ address,
1542
+ blockTag,
1543
+ });
1544
+ },
1545
+ proposedGetRoundData(_roundId, overrides) {
1546
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1547
+ const address = this.context.address;
1548
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1549
+ if (overrides?.blockTag) {
1550
+ blockTag =
1551
+ typeof overrides.blockTag == "string"
1552
+ ? overrides.blockTag
1553
+ : "0x" + overrides.blockTag.toString(16);
1554
+ }
1555
+ return this.view.encodeCall.proposedGetRoundData(_roundId, {
1556
+ chainId,
1557
+ address,
1558
+ blockTag,
1559
+ });
1560
+ },
1561
+ proposedLatestRoundData(overrides) {
1562
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1563
+ const address = this.context.address;
1564
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1565
+ if (overrides?.blockTag) {
1566
+ blockTag =
1567
+ typeof overrides.blockTag == "string"
1568
+ ? overrides.blockTag
1569
+ : "0x" + overrides.blockTag.toString(16);
1570
+ }
1571
+ return this.view.encodeCall.proposedLatestRoundData({
1572
+ chainId,
1573
+ address,
1574
+ blockTag,
1575
+ });
1576
+ },
1577
+ setController(_accessController, overrides) {
1578
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1579
+ const address = this.context.address;
1580
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1581
+ if (overrides?.blockTag) {
1582
+ blockTag =
1583
+ typeof overrides.blockTag == "string"
1584
+ ? overrides.blockTag
1585
+ : "0x" + overrides.blockTag.toString(16);
1586
+ }
1587
+ return this.view.encodeCall.setController(_accessController, {
1588
+ chainId,
1589
+ address,
1590
+ blockTag,
1591
+ });
1592
+ },
1593
+ transferOwnership(_to, overrides) {
1594
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1595
+ const address = this.context.address;
1596
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1597
+ if (overrides?.blockTag) {
1598
+ blockTag =
1599
+ typeof overrides.blockTag == "string"
1600
+ ? overrides.blockTag
1601
+ : "0x" + overrides.blockTag.toString(16);
1602
+ }
1603
+ return this.view.encodeCall.transferOwnership(_to, {
1604
+ chainId,
1605
+ address,
1606
+ blockTag,
1607
+ });
1608
+ },
1609
+ version(overrides) {
1610
+ const chainId = overrides?.chainId?.toString() ?? this.context.chainId.toString();
1611
+ const address = this.context.address;
1612
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1613
+ if (overrides?.blockTag) {
1614
+ blockTag =
1615
+ typeof overrides.blockTag == "string"
1616
+ ? overrides.blockTag
1617
+ : "0x" + overrides.blockTag.toString(16);
1618
+ }
1619
+ return this.view.encodeCall.version({ chainId, address, blockTag });
1620
+ },
372
1621
  };
373
1622
  }
374
1623
  export class EACAggregatorProxyProcessor extends BaseProcessor {