@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.
- package/lib/aptos/builtin/0x1.js +10 -10
- package/lib/aptos/builtin/0x3.js +11 -11
- package/lib/aptos/builtin/index.js +11 -11
- package/lib/aptos/codegen/index.js +3 -3
- package/lib/aptos/ext/index.js +10 -10
- package/lib/aptos/index.js +10 -10
- package/lib/chunk-2QEQTKQY.js +1050 -0
- package/lib/{chunk-Z7QWETBQ.js → chunk-3LE323R2.js} +2 -2
- package/lib/{chunk-QHHXY7LO.js → chunk-5XM56ENY.js} +5 -5
- package/lib/{chunk-RX5G4RN2.js → chunk-7NFMED3E.js} +2 -2
- package/lib/{chunk-KA5CLZU6.js → chunk-7NWX3CH7.js} +90 -53
- package/lib/{chunk-F2IZC2B6.js → chunk-EMF4HXFG.js} +5 -5
- package/lib/{chunk-VP6Y633M.js → chunk-GOWJIAB2.js} +2 -2
- package/lib/chunk-K5OSTLHI.js +916 -0
- package/lib/{chunk-WLLDVQFE.js → chunk-KO4GSZCM.js} +3 -3
- package/lib/chunk-KTAUVRJN.js +1910 -0
- package/lib/{chunk-2QVJGMW4.js → chunk-KVB555XD.js} +2 -2
- package/lib/{chunk-TDPQO2SX.js → chunk-LICAL3XW.js} +2 -2
- package/lib/{chunk-NBZRHB5V.js → chunk-O6QXDRGG.js} +5 -5
- package/lib/{chunk-6DDG76PU.js → chunk-P6T5WFAZ.js} +4 -4
- package/lib/chunk-QKJ5SWA2.js +861 -0
- package/lib/{chunk-VJTNBZMU.js → chunk-QTWMU7GQ.js} +1 -1
- package/lib/{chunk-OAIP7J4S.js → chunk-RXO7SOTL.js} +2757 -1157
- package/lib/{chunk-S727P6WP.js → chunk-SYEQKTIU.js} +1 -1
- package/lib/{chunk-7OBRGY7G.js → chunk-YNJXNOVA.js} +2 -2
- package/lib/{chunk-N4OQDWM2.js → chunk-YOLIZKGZ.js} +1 -1
- package/lib/{chunk-USETTWR7.js → chunk-Z5PQR6UE.js} +100 -54
- package/lib/core/index.js +3 -3
- package/lib/{eacaggregatorproxy-aed46d4a.d.ts → eacaggregatorproxy-cb8e39be.d.ts} +76 -24
- package/lib/{erc1155-80a76eb5.d.ts → erc1155-fb097c50.d.ts} +31 -9
- package/lib/{erc20-39aae019.d.ts → erc20-95ba7721.d.ts} +61 -19
- package/lib/{erc721-0a429bd4.d.ts → erc721-13bf7a61.d.ts} +49 -15
- package/lib/eth/builtin/eacaggregatorproxy.d.ts +1 -1
- package/lib/eth/builtin/eacaggregatorproxy.js +5 -5
- package/lib/eth/builtin/erc1155.d.ts +1 -1
- package/lib/eth/builtin/erc1155.js +5 -5
- package/lib/eth/builtin/erc20.d.ts +1 -1
- package/lib/eth/builtin/erc20.js +4 -4
- package/lib/eth/builtin/erc721.d.ts +1 -1
- package/lib/eth/builtin/erc721.js +4 -4
- package/lib/eth/builtin/index.d.ts +39 -15
- package/lib/eth/builtin/index.js +8 -8
- package/lib/eth/builtin/weth9.d.ts +1 -1
- package/lib/eth/builtin/weth9.js +5 -5
- package/lib/eth/codegen/index.js +130 -39
- package/lib/eth/index.d.ts +1 -0
- package/lib/eth/index.js +7 -4
- package/lib/fuel/index.js +4 -4
- package/lib/index.js +5 -3
- package/lib/move/index.js +4 -4
- package/lib/solana/builtin/index.js +4 -4
- package/lib/solana/index.js +4 -4
- package/lib/store/index.js +3 -3
- package/lib/sui/builtin/0x1.js +12 -12
- package/lib/sui/builtin/0x2.js +13 -13
- package/lib/sui/builtin/0x3.js +14 -14
- package/lib/sui/builtin/index.js +14 -14
- package/lib/sui/codegen/index.js +2 -2
- package/lib/sui/ext/index.js +10 -10
- package/lib/sui/index.js +11 -11
- package/lib/testing/index.js +14 -14
- package/lib/utils/index.js +7 -7
- package/lib/{weth9-08664cb7.d.ts → weth9-2b52cb06.d.ts} +40 -12
- package/package.json +1 -1
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +1446 -115
- package/src/eth/builtin/internal/erc1155-processor.ts +611 -34
- package/src/eth/builtin/internal/erc20-processor.ts +1182 -84
- package/src/eth/builtin/internal/erc20bytes-processor.ts +595 -45
- package/src/eth/builtin/internal/erc721-processor.ts +967 -64
- package/src/eth/builtin/internal/weth9-processor.ts +698 -55
- package/src/eth/codegen/file.ts +26 -3
- package/src/eth/codegen/function-calls.ts +93 -8
- package/src/eth/codegen/types.ts +22 -1
- package/src/eth/eth-plugin.ts +4 -4
- package/src/eth/index.ts +2 -0
- package/lib/chunk-76HTCT5F.js +0 -469
- package/lib/chunk-ERTIHPSD.js +0 -528
- package/lib/chunk-LWKILLQ6.js +0 -820
- package/lib/chunk-S36AAZOU.js +0 -417
package/lib/chunk-LWKILLQ6.js
DELETED
@@ -1,820 +0,0 @@
|
|
1
|
-
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
2
|
-
import {
|
3
|
-
BaseProcessor,
|
4
|
-
BaseProcessorTemplate,
|
5
|
-
BoundContractView,
|
6
|
-
ContractView,
|
7
|
-
DummyProvider,
|
8
|
-
EACAggregatorProxy__factory,
|
9
|
-
addContractByABI,
|
10
|
-
addProcessor,
|
11
|
-
getContractByABI,
|
12
|
-
getProcessor,
|
13
|
-
getProvider,
|
14
|
-
import_chain,
|
15
|
-
transformEtherError
|
16
|
-
} from "./chunk-OAIP7J4S.js";
|
17
|
-
import {
|
18
|
-
__export,
|
19
|
-
__publicField
|
20
|
-
} from "./chunk-AXRHIURD.js";
|
21
|
-
|
22
|
-
// src/eth/builtin/eacaggregatorproxy.ts
|
23
|
-
var eacaggregatorproxy_exports = {};
|
24
|
-
__export(eacaggregatorproxy_exports, {
|
25
|
-
EACAggregatorProxyBoundContractView: () => EACAggregatorProxyBoundContractView,
|
26
|
-
EACAggregatorProxyContractView: () => EACAggregatorProxyContractView,
|
27
|
-
EACAggregatorProxyProcessor: () => EACAggregatorProxyProcessor,
|
28
|
-
EACAggregatorProxyProcessorTemplate: () => EACAggregatorProxyProcessorTemplate,
|
29
|
-
EACAggregatorProxy__factory: () => EACAggregatorProxy__factory,
|
30
|
-
getEACAggregatorProxyContract: () => getEACAggregatorProxyContract,
|
31
|
-
getEACAggregatorProxyContractOnContext: () => getEACAggregatorProxyContractOnContext,
|
32
|
-
mockAnswerUpdatedLog: () => mockAnswerUpdatedLog,
|
33
|
-
mockNewRoundLog: () => mockNewRoundLog,
|
34
|
-
mockOwnershipTransferRequestedLog: () => mockOwnershipTransferRequestedLog,
|
35
|
-
mockOwnershipTransferredLog: () => mockOwnershipTransferredLog
|
36
|
-
});
|
37
|
-
|
38
|
-
// src/eth/builtin/internal/eacaggregatorproxy-processor.ts
|
39
|
-
var templateContract = EACAggregatorProxy__factory.connect(
|
40
|
-
"0x0",
|
41
|
-
DummyProvider
|
42
|
-
);
|
43
|
-
var EACAggregatorProxyContractView = class extends ContractView {
|
44
|
-
constructor(contract) {
|
45
|
-
super(contract);
|
46
|
-
this.callStatic.contract = contract;
|
47
|
-
}
|
48
|
-
async accessController(overrides) {
|
49
|
-
try {
|
50
|
-
return await this.contract.getFunction("accessController()")(
|
51
|
-
overrides || {}
|
52
|
-
);
|
53
|
-
} catch (e) {
|
54
|
-
const stack = new Error().stack;
|
55
|
-
throw transformEtherError(e, void 0, stack);
|
56
|
-
}
|
57
|
-
}
|
58
|
-
async aggregator(overrides) {
|
59
|
-
try {
|
60
|
-
return await this.contract.getFunction("aggregator()")(overrides || {});
|
61
|
-
} catch (e) {
|
62
|
-
const stack = new Error().stack;
|
63
|
-
throw transformEtherError(e, void 0, stack);
|
64
|
-
}
|
65
|
-
}
|
66
|
-
async decimals(overrides) {
|
67
|
-
try {
|
68
|
-
return await this.contract.getFunction("decimals()")(overrides || {});
|
69
|
-
} catch (e) {
|
70
|
-
const stack = new Error().stack;
|
71
|
-
throw transformEtherError(e, void 0, stack);
|
72
|
-
}
|
73
|
-
}
|
74
|
-
async description(overrides) {
|
75
|
-
try {
|
76
|
-
return await this.contract.getFunction("description()")(overrides || {});
|
77
|
-
} catch (e) {
|
78
|
-
const stack = new Error().stack;
|
79
|
-
throw transformEtherError(e, void 0, stack);
|
80
|
-
}
|
81
|
-
}
|
82
|
-
async getAnswer(_roundId, overrides) {
|
83
|
-
try {
|
84
|
-
return await this.contract.getFunction("getAnswer(uint256)")(
|
85
|
-
_roundId,
|
86
|
-
overrides || {}
|
87
|
-
);
|
88
|
-
} catch (e) {
|
89
|
-
const stack = new Error().stack;
|
90
|
-
throw transformEtherError(e, void 0, stack);
|
91
|
-
}
|
92
|
-
}
|
93
|
-
async getRoundData(_roundId, overrides) {
|
94
|
-
try {
|
95
|
-
return await this.contract.getFunction("getRoundData(uint80)")(
|
96
|
-
_roundId,
|
97
|
-
overrides || {}
|
98
|
-
);
|
99
|
-
} catch (e) {
|
100
|
-
const stack = new Error().stack;
|
101
|
-
throw transformEtherError(e, void 0, stack);
|
102
|
-
}
|
103
|
-
}
|
104
|
-
async getTimestamp(_roundId, overrides) {
|
105
|
-
try {
|
106
|
-
return await this.contract.getFunction("getTimestamp(uint256)")(
|
107
|
-
_roundId,
|
108
|
-
overrides || {}
|
109
|
-
);
|
110
|
-
} catch (e) {
|
111
|
-
const stack = new Error().stack;
|
112
|
-
throw transformEtherError(e, void 0, stack);
|
113
|
-
}
|
114
|
-
}
|
115
|
-
async latestAnswer(overrides) {
|
116
|
-
try {
|
117
|
-
return await this.contract.getFunction("latestAnswer()")(overrides || {});
|
118
|
-
} catch (e) {
|
119
|
-
const stack = new Error().stack;
|
120
|
-
throw transformEtherError(e, void 0, stack);
|
121
|
-
}
|
122
|
-
}
|
123
|
-
async latestRound(overrides) {
|
124
|
-
try {
|
125
|
-
return await this.contract.getFunction("latestRound()")(overrides || {});
|
126
|
-
} catch (e) {
|
127
|
-
const stack = new Error().stack;
|
128
|
-
throw transformEtherError(e, void 0, stack);
|
129
|
-
}
|
130
|
-
}
|
131
|
-
async latestRoundData(overrides) {
|
132
|
-
try {
|
133
|
-
return await this.contract.getFunction("latestRoundData()")(
|
134
|
-
overrides || {}
|
135
|
-
);
|
136
|
-
} catch (e) {
|
137
|
-
const stack = new Error().stack;
|
138
|
-
throw transformEtherError(e, void 0, stack);
|
139
|
-
}
|
140
|
-
}
|
141
|
-
async latestTimestamp(overrides) {
|
142
|
-
try {
|
143
|
-
return await this.contract.getFunction("latestTimestamp()")(
|
144
|
-
overrides || {}
|
145
|
-
);
|
146
|
-
} catch (e) {
|
147
|
-
const stack = new Error().stack;
|
148
|
-
throw transformEtherError(e, void 0, stack);
|
149
|
-
}
|
150
|
-
}
|
151
|
-
async owner(overrides) {
|
152
|
-
try {
|
153
|
-
return await this.contract.getFunction("owner()")(overrides || {});
|
154
|
-
} catch (e) {
|
155
|
-
const stack = new Error().stack;
|
156
|
-
throw transformEtherError(e, void 0, stack);
|
157
|
-
}
|
158
|
-
}
|
159
|
-
async phaseAggregators(arg0, overrides) {
|
160
|
-
try {
|
161
|
-
return await this.contract.getFunction("phaseAggregators(uint16)")(
|
162
|
-
arg0,
|
163
|
-
overrides || {}
|
164
|
-
);
|
165
|
-
} catch (e) {
|
166
|
-
const stack = new Error().stack;
|
167
|
-
throw transformEtherError(e, void 0, stack);
|
168
|
-
}
|
169
|
-
}
|
170
|
-
async phaseId(overrides) {
|
171
|
-
try {
|
172
|
-
return await this.contract.getFunction("phaseId()")(overrides || {});
|
173
|
-
} catch (e) {
|
174
|
-
const stack = new Error().stack;
|
175
|
-
throw transformEtherError(e, void 0, stack);
|
176
|
-
}
|
177
|
-
}
|
178
|
-
async proposedAggregator(overrides) {
|
179
|
-
try {
|
180
|
-
return await this.contract.getFunction("proposedAggregator()")(
|
181
|
-
overrides || {}
|
182
|
-
);
|
183
|
-
} catch (e) {
|
184
|
-
const stack = new Error().stack;
|
185
|
-
throw transformEtherError(e, void 0, stack);
|
186
|
-
}
|
187
|
-
}
|
188
|
-
async proposedGetRoundData(_roundId, overrides) {
|
189
|
-
try {
|
190
|
-
return await this.contract.getFunction("proposedGetRoundData(uint80)")(
|
191
|
-
_roundId,
|
192
|
-
overrides || {}
|
193
|
-
);
|
194
|
-
} catch (e) {
|
195
|
-
const stack = new Error().stack;
|
196
|
-
throw transformEtherError(e, void 0, stack);
|
197
|
-
}
|
198
|
-
}
|
199
|
-
async proposedLatestRoundData(overrides) {
|
200
|
-
try {
|
201
|
-
return await this.contract.getFunction("proposedLatestRoundData()")(
|
202
|
-
overrides || {}
|
203
|
-
);
|
204
|
-
} catch (e) {
|
205
|
-
const stack = new Error().stack;
|
206
|
-
throw transformEtherError(e, void 0, stack);
|
207
|
-
}
|
208
|
-
}
|
209
|
-
async version(overrides) {
|
210
|
-
try {
|
211
|
-
return await this.contract.getFunction("version()")(overrides || {});
|
212
|
-
} catch (e) {
|
213
|
-
const stack = new Error().stack;
|
214
|
-
throw transformEtherError(e, void 0, stack);
|
215
|
-
}
|
216
|
-
}
|
217
|
-
callStatic = {
|
218
|
-
contract: this.contract,
|
219
|
-
async acceptOwnership(overrides) {
|
220
|
-
try {
|
221
|
-
return await this.contract.getFunction("acceptOwnership()").staticCall(overrides || {});
|
222
|
-
} catch (e) {
|
223
|
-
const stack = new Error().stack;
|
224
|
-
throw transformEtherError(e, void 0, stack);
|
225
|
-
}
|
226
|
-
},
|
227
|
-
async confirmAggregator(_aggregator, overrides) {
|
228
|
-
try {
|
229
|
-
return await this.contract.getFunction("confirmAggregator(address)").staticCall(_aggregator, overrides || {});
|
230
|
-
} catch (e) {
|
231
|
-
const stack = new Error().stack;
|
232
|
-
throw transformEtherError(e, void 0, stack);
|
233
|
-
}
|
234
|
-
},
|
235
|
-
async proposeAggregator(_aggregator, overrides) {
|
236
|
-
try {
|
237
|
-
return await this.contract.getFunction("proposeAggregator(address)").staticCall(_aggregator, overrides || {});
|
238
|
-
} catch (e) {
|
239
|
-
const stack = new Error().stack;
|
240
|
-
throw transformEtherError(e, void 0, stack);
|
241
|
-
}
|
242
|
-
},
|
243
|
-
async setController(_accessController, overrides) {
|
244
|
-
try {
|
245
|
-
return await this.contract.getFunction("setController(address)").staticCall(_accessController, overrides || {});
|
246
|
-
} catch (e) {
|
247
|
-
const stack = new Error().stack;
|
248
|
-
throw transformEtherError(e, void 0, stack);
|
249
|
-
}
|
250
|
-
},
|
251
|
-
async transferOwnership(_to, overrides) {
|
252
|
-
try {
|
253
|
-
return await this.contract.getFunction("transferOwnership(address)").staticCall(_to, overrides || {});
|
254
|
-
} catch (e) {
|
255
|
-
const stack = new Error().stack;
|
256
|
-
throw transformEtherError(e, void 0, stack);
|
257
|
-
}
|
258
|
-
}
|
259
|
-
};
|
260
|
-
};
|
261
|
-
var EACAggregatorProxyBoundContractView = class extends BoundContractView {
|
262
|
-
async accessController(overrides) {
|
263
|
-
return await this.view.accessController({
|
264
|
-
blockTag: this.context.blockNumber,
|
265
|
-
...overrides
|
266
|
-
});
|
267
|
-
}
|
268
|
-
async aggregator(overrides) {
|
269
|
-
return await this.view.aggregator({
|
270
|
-
blockTag: this.context.blockNumber,
|
271
|
-
...overrides
|
272
|
-
});
|
273
|
-
}
|
274
|
-
async decimals(overrides) {
|
275
|
-
return await this.view.decimals({
|
276
|
-
blockTag: this.context.blockNumber,
|
277
|
-
...overrides
|
278
|
-
});
|
279
|
-
}
|
280
|
-
async description(overrides) {
|
281
|
-
return await this.view.description({
|
282
|
-
blockTag: this.context.blockNumber,
|
283
|
-
...overrides
|
284
|
-
});
|
285
|
-
}
|
286
|
-
async getAnswer(_roundId, overrides) {
|
287
|
-
return await this.view.getAnswer(_roundId, {
|
288
|
-
blockTag: this.context.blockNumber,
|
289
|
-
...overrides
|
290
|
-
});
|
291
|
-
}
|
292
|
-
async getRoundData(_roundId, overrides) {
|
293
|
-
return await this.view.getRoundData(_roundId, {
|
294
|
-
blockTag: this.context.blockNumber,
|
295
|
-
...overrides
|
296
|
-
});
|
297
|
-
}
|
298
|
-
async getTimestamp(_roundId, overrides) {
|
299
|
-
return await this.view.getTimestamp(_roundId, {
|
300
|
-
blockTag: this.context.blockNumber,
|
301
|
-
...overrides
|
302
|
-
});
|
303
|
-
}
|
304
|
-
async latestAnswer(overrides) {
|
305
|
-
return await this.view.latestAnswer({
|
306
|
-
blockTag: this.context.blockNumber,
|
307
|
-
...overrides
|
308
|
-
});
|
309
|
-
}
|
310
|
-
async latestRound(overrides) {
|
311
|
-
return await this.view.latestRound({
|
312
|
-
blockTag: this.context.blockNumber,
|
313
|
-
...overrides
|
314
|
-
});
|
315
|
-
}
|
316
|
-
async latestRoundData(overrides) {
|
317
|
-
return await this.view.latestRoundData({
|
318
|
-
blockTag: this.context.blockNumber,
|
319
|
-
...overrides
|
320
|
-
});
|
321
|
-
}
|
322
|
-
async latestTimestamp(overrides) {
|
323
|
-
return await this.view.latestTimestamp({
|
324
|
-
blockTag: this.context.blockNumber,
|
325
|
-
...overrides
|
326
|
-
});
|
327
|
-
}
|
328
|
-
async owner(overrides) {
|
329
|
-
return await this.view.owner({
|
330
|
-
blockTag: this.context.blockNumber,
|
331
|
-
...overrides
|
332
|
-
});
|
333
|
-
}
|
334
|
-
async phaseAggregators(arg0, overrides) {
|
335
|
-
return await this.view.phaseAggregators(arg0, {
|
336
|
-
blockTag: this.context.blockNumber,
|
337
|
-
...overrides
|
338
|
-
});
|
339
|
-
}
|
340
|
-
async phaseId(overrides) {
|
341
|
-
return await this.view.phaseId({
|
342
|
-
blockTag: this.context.blockNumber,
|
343
|
-
...overrides
|
344
|
-
});
|
345
|
-
}
|
346
|
-
async proposedAggregator(overrides) {
|
347
|
-
return await this.view.proposedAggregator({
|
348
|
-
blockTag: this.context.blockNumber,
|
349
|
-
...overrides
|
350
|
-
});
|
351
|
-
}
|
352
|
-
async proposedGetRoundData(_roundId, overrides) {
|
353
|
-
return await this.view.proposedGetRoundData(_roundId, {
|
354
|
-
blockTag: this.context.blockNumber,
|
355
|
-
...overrides
|
356
|
-
});
|
357
|
-
}
|
358
|
-
async proposedLatestRoundData(overrides) {
|
359
|
-
return await this.view.proposedLatestRoundData({
|
360
|
-
blockTag: this.context.blockNumber,
|
361
|
-
...overrides
|
362
|
-
});
|
363
|
-
}
|
364
|
-
async version(overrides) {
|
365
|
-
return await this.view.version({
|
366
|
-
blockTag: this.context.blockNumber,
|
367
|
-
...overrides
|
368
|
-
});
|
369
|
-
}
|
370
|
-
callStatic = {
|
371
|
-
view: this.view,
|
372
|
-
context: this.context,
|
373
|
-
async acceptOwnership(overrides) {
|
374
|
-
return await this.view.callStatic.acceptOwnership({
|
375
|
-
blockTag: this.context.blockNumber,
|
376
|
-
...overrides
|
377
|
-
});
|
378
|
-
},
|
379
|
-
async confirmAggregator(_aggregator, overrides) {
|
380
|
-
return await this.view.callStatic.confirmAggregator(_aggregator, {
|
381
|
-
blockTag: this.context.blockNumber,
|
382
|
-
...overrides
|
383
|
-
});
|
384
|
-
},
|
385
|
-
async proposeAggregator(_aggregator, overrides) {
|
386
|
-
return await this.view.callStatic.proposeAggregator(_aggregator, {
|
387
|
-
blockTag: this.context.blockNumber,
|
388
|
-
...overrides
|
389
|
-
});
|
390
|
-
},
|
391
|
-
async setController(_accessController, overrides) {
|
392
|
-
return await this.view.callStatic.setController(_accessController, {
|
393
|
-
blockTag: this.context.blockNumber,
|
394
|
-
...overrides
|
395
|
-
});
|
396
|
-
},
|
397
|
-
async transferOwnership(_to, overrides) {
|
398
|
-
return await this.view.callStatic.transferOwnership(_to, {
|
399
|
-
blockTag: this.context.blockNumber,
|
400
|
-
...overrides
|
401
|
-
});
|
402
|
-
}
|
403
|
-
};
|
404
|
-
};
|
405
|
-
var _EACAggregatorProxyProcessor = class extends BaseProcessor {
|
406
|
-
onEventAnswerUpdated(handler, filter, fetchConfig, preprocessHandler) {
|
407
|
-
if (!filter) {
|
408
|
-
filter = templateContract.filters["AnswerUpdated(int256,uint256,uint256)"](null, null, null);
|
409
|
-
}
|
410
|
-
return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
|
411
|
-
}
|
412
|
-
onEventNewRound(handler, filter, fetchConfig, preprocessHandler) {
|
413
|
-
if (!filter) {
|
414
|
-
filter = templateContract.filters["NewRound(uint256,address,uint256)"](
|
415
|
-
null,
|
416
|
-
null,
|
417
|
-
null
|
418
|
-
);
|
419
|
-
}
|
420
|
-
return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
|
421
|
-
}
|
422
|
-
onEventOwnershipTransferRequested(handler, filter, fetchConfig, preprocessHandler) {
|
423
|
-
if (!filter) {
|
424
|
-
filter = templateContract.filters["OwnershipTransferRequested(address,address)"](null, null);
|
425
|
-
}
|
426
|
-
return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
|
427
|
-
}
|
428
|
-
onEventOwnershipTransferred(handler, filter, fetchConfig, preprocessHandler) {
|
429
|
-
if (!filter) {
|
430
|
-
filter = templateContract.filters["OwnershipTransferred(address,address)"](null, null);
|
431
|
-
}
|
432
|
-
return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
|
433
|
-
}
|
434
|
-
onCallAcceptOwnership(handler, fetchConfig, preprocessHandler) {
|
435
|
-
return super.onEthTrace(
|
436
|
-
"0x79ba5097",
|
437
|
-
handler,
|
438
|
-
fetchConfig,
|
439
|
-
preprocessHandler
|
440
|
-
);
|
441
|
-
}
|
442
|
-
onCallAccessController(handler, fetchConfig, preprocessHandler) {
|
443
|
-
return super.onEthTrace(
|
444
|
-
"0xbc43cbaf",
|
445
|
-
handler,
|
446
|
-
fetchConfig,
|
447
|
-
preprocessHandler
|
448
|
-
);
|
449
|
-
}
|
450
|
-
onCallAggregator(handler, fetchConfig, preprocessHandler) {
|
451
|
-
return super.onEthTrace(
|
452
|
-
"0x245a7bfc",
|
453
|
-
handler,
|
454
|
-
fetchConfig,
|
455
|
-
preprocessHandler
|
456
|
-
);
|
457
|
-
}
|
458
|
-
onCallConfirmAggregator(handler, fetchConfig, preprocessHandler) {
|
459
|
-
return super.onEthTrace(
|
460
|
-
"0xa928c096",
|
461
|
-
handler,
|
462
|
-
fetchConfig,
|
463
|
-
preprocessHandler
|
464
|
-
);
|
465
|
-
}
|
466
|
-
onCallDecimals(handler, fetchConfig, preprocessHandler) {
|
467
|
-
return super.onEthTrace(
|
468
|
-
"0x313ce567",
|
469
|
-
handler,
|
470
|
-
fetchConfig,
|
471
|
-
preprocessHandler
|
472
|
-
);
|
473
|
-
}
|
474
|
-
onCallDescription(handler, fetchConfig, preprocessHandler) {
|
475
|
-
return super.onEthTrace(
|
476
|
-
"0x7284e416",
|
477
|
-
handler,
|
478
|
-
fetchConfig,
|
479
|
-
preprocessHandler
|
480
|
-
);
|
481
|
-
}
|
482
|
-
onCallGetAnswer(handler, fetchConfig, preprocessHandler) {
|
483
|
-
return super.onEthTrace(
|
484
|
-
"0xb5ab58dc",
|
485
|
-
handler,
|
486
|
-
fetchConfig,
|
487
|
-
preprocessHandler
|
488
|
-
);
|
489
|
-
}
|
490
|
-
onCallGetRoundData(handler, fetchConfig, preprocessHandler) {
|
491
|
-
return super.onEthTrace(
|
492
|
-
"0x9a6fc8f5",
|
493
|
-
handler,
|
494
|
-
fetchConfig,
|
495
|
-
preprocessHandler
|
496
|
-
);
|
497
|
-
}
|
498
|
-
onCallGetTimestamp(handler, fetchConfig, preprocessHandler) {
|
499
|
-
return super.onEthTrace(
|
500
|
-
"0xb633620c",
|
501
|
-
handler,
|
502
|
-
fetchConfig,
|
503
|
-
preprocessHandler
|
504
|
-
);
|
505
|
-
}
|
506
|
-
onCallLatestAnswer(handler, fetchConfig, preprocessHandler) {
|
507
|
-
return super.onEthTrace(
|
508
|
-
"0x50d25bcd",
|
509
|
-
handler,
|
510
|
-
fetchConfig,
|
511
|
-
preprocessHandler
|
512
|
-
);
|
513
|
-
}
|
514
|
-
onCallLatestRound(handler, fetchConfig, preprocessHandler) {
|
515
|
-
return super.onEthTrace(
|
516
|
-
"0x668a0f02",
|
517
|
-
handler,
|
518
|
-
fetchConfig,
|
519
|
-
preprocessHandler
|
520
|
-
);
|
521
|
-
}
|
522
|
-
onCallLatestRoundData(handler, fetchConfig, preprocessHandler) {
|
523
|
-
return super.onEthTrace(
|
524
|
-
"0xfeaf968c",
|
525
|
-
handler,
|
526
|
-
fetchConfig,
|
527
|
-
preprocessHandler
|
528
|
-
);
|
529
|
-
}
|
530
|
-
onCallLatestTimestamp(handler, fetchConfig, preprocessHandler) {
|
531
|
-
return super.onEthTrace(
|
532
|
-
"0x8205bf6a",
|
533
|
-
handler,
|
534
|
-
fetchConfig,
|
535
|
-
preprocessHandler
|
536
|
-
);
|
537
|
-
}
|
538
|
-
onCallOwner(handler, fetchConfig, preprocessHandler) {
|
539
|
-
return super.onEthTrace(
|
540
|
-
"0x8da5cb5b",
|
541
|
-
handler,
|
542
|
-
fetchConfig,
|
543
|
-
preprocessHandler
|
544
|
-
);
|
545
|
-
}
|
546
|
-
onCallPhaseAggregators(handler, fetchConfig, preprocessHandler) {
|
547
|
-
return super.onEthTrace(
|
548
|
-
"0xc1597304",
|
549
|
-
handler,
|
550
|
-
fetchConfig,
|
551
|
-
preprocessHandler
|
552
|
-
);
|
553
|
-
}
|
554
|
-
onCallPhaseId(handler, fetchConfig, preprocessHandler) {
|
555
|
-
return super.onEthTrace(
|
556
|
-
"0x58303b10",
|
557
|
-
handler,
|
558
|
-
fetchConfig,
|
559
|
-
preprocessHandler
|
560
|
-
);
|
561
|
-
}
|
562
|
-
onCallProposeAggregator(handler, fetchConfig, preprocessHandler) {
|
563
|
-
return super.onEthTrace(
|
564
|
-
"0xf8a2abd3",
|
565
|
-
handler,
|
566
|
-
fetchConfig,
|
567
|
-
preprocessHandler
|
568
|
-
);
|
569
|
-
}
|
570
|
-
onCallProposedAggregator(handler, fetchConfig, preprocessHandler) {
|
571
|
-
return super.onEthTrace(
|
572
|
-
"0xe8c4be30",
|
573
|
-
handler,
|
574
|
-
fetchConfig,
|
575
|
-
preprocessHandler
|
576
|
-
);
|
577
|
-
}
|
578
|
-
onCallProposedGetRoundData(handler, fetchConfig, preprocessHandler) {
|
579
|
-
return super.onEthTrace(
|
580
|
-
"0x6001ac53",
|
581
|
-
handler,
|
582
|
-
fetchConfig,
|
583
|
-
preprocessHandler
|
584
|
-
);
|
585
|
-
}
|
586
|
-
onCallProposedLatestRoundData(handler, fetchConfig, preprocessHandler) {
|
587
|
-
return super.onEthTrace(
|
588
|
-
"0x8f6b4d91",
|
589
|
-
handler,
|
590
|
-
fetchConfig,
|
591
|
-
preprocessHandler
|
592
|
-
);
|
593
|
-
}
|
594
|
-
onCallSetController(handler, fetchConfig, preprocessHandler) {
|
595
|
-
return super.onEthTrace(
|
596
|
-
"0x92eefe9b",
|
597
|
-
handler,
|
598
|
-
fetchConfig,
|
599
|
-
preprocessHandler
|
600
|
-
);
|
601
|
-
}
|
602
|
-
onCallTransferOwnership(handler, fetchConfig, preprocessHandler) {
|
603
|
-
return super.onEthTrace(
|
604
|
-
"0xf2fde38b",
|
605
|
-
handler,
|
606
|
-
fetchConfig,
|
607
|
-
preprocessHandler
|
608
|
-
);
|
609
|
-
}
|
610
|
-
onCallVersion(handler, fetchConfig, preprocessHandler) {
|
611
|
-
return super.onEthTrace(
|
612
|
-
"0x54fd4d50",
|
613
|
-
handler,
|
614
|
-
fetchConfig,
|
615
|
-
preprocessHandler
|
616
|
-
);
|
617
|
-
}
|
618
|
-
CreateBoundContractView() {
|
619
|
-
const view = getEACAggregatorProxyContract(
|
620
|
-
this.config.network,
|
621
|
-
this.config.address
|
622
|
-
);
|
623
|
-
return new EACAggregatorProxyBoundContractView(this.config.address, view);
|
624
|
-
}
|
625
|
-
static bind(options) {
|
626
|
-
if (!options.name) {
|
627
|
-
options.name = "EACAggregatorProxy";
|
628
|
-
}
|
629
|
-
let processor = getProcessor(options);
|
630
|
-
if (!processor) {
|
631
|
-
processor = new _EACAggregatorProxyProcessor(options);
|
632
|
-
addProcessor(options, processor);
|
633
|
-
}
|
634
|
-
return processor;
|
635
|
-
}
|
636
|
-
};
|
637
|
-
var EACAggregatorProxyProcessor = _EACAggregatorProxyProcessor;
|
638
|
-
__publicField(EACAggregatorProxyProcessor, "filters", {
|
639
|
-
AnswerUpdated(current, roundId, updatedAt) {
|
640
|
-
return templateContract.filters["AnswerUpdated(int256,uint256,uint256)"](
|
641
|
-
current,
|
642
|
-
roundId,
|
643
|
-
updatedAt
|
644
|
-
);
|
645
|
-
},
|
646
|
-
NewRound(roundId, startedBy, startedAt) {
|
647
|
-
return templateContract.filters["NewRound(uint256,address,uint256)"](
|
648
|
-
roundId,
|
649
|
-
startedBy,
|
650
|
-
startedAt
|
651
|
-
);
|
652
|
-
},
|
653
|
-
OwnershipTransferRequested(from, to) {
|
654
|
-
return templateContract.filters["OwnershipTransferRequested(address,address)"](from, to);
|
655
|
-
},
|
656
|
-
OwnershipTransferred(from, to) {
|
657
|
-
return templateContract.filters["OwnershipTransferred(address,address)"](
|
658
|
-
from,
|
659
|
-
to
|
660
|
-
);
|
661
|
-
}
|
662
|
-
});
|
663
|
-
var EACAggregatorProxyProcessorTemplate = class extends BaseProcessorTemplate {
|
664
|
-
bindInternal(options) {
|
665
|
-
if (!options.name) {
|
666
|
-
options.name = "EACAggregatorProxy";
|
667
|
-
}
|
668
|
-
let processor = getProcessor(options);
|
669
|
-
if (!processor) {
|
670
|
-
processor = new EACAggregatorProxyProcessor(options);
|
671
|
-
addProcessor(options, processor);
|
672
|
-
}
|
673
|
-
return processor;
|
674
|
-
}
|
675
|
-
onEventAnswerUpdated(handler, filter, fetchConfig, preprocessHandler) {
|
676
|
-
if (!filter) {
|
677
|
-
filter = templateContract.filters["AnswerUpdated(int256,uint256,uint256)"](null, null, null);
|
678
|
-
}
|
679
|
-
return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
|
680
|
-
}
|
681
|
-
onEventNewRound(handler, filter, fetchConfig, preprocessHandler) {
|
682
|
-
if (!filter) {
|
683
|
-
filter = templateContract.filters["NewRound(uint256,address,uint256)"](
|
684
|
-
null,
|
685
|
-
null,
|
686
|
-
null
|
687
|
-
);
|
688
|
-
}
|
689
|
-
return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
|
690
|
-
}
|
691
|
-
onEventOwnershipTransferRequested(handler, filter, fetchConfig, preprocessHandler) {
|
692
|
-
if (!filter) {
|
693
|
-
filter = templateContract.filters["OwnershipTransferRequested(address,address)"](null, null);
|
694
|
-
}
|
695
|
-
return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
|
696
|
-
}
|
697
|
-
onEventOwnershipTransferred(handler, filter, fetchConfig, preprocessHandler) {
|
698
|
-
if (!filter) {
|
699
|
-
filter = templateContract.filters["OwnershipTransferred(address,address)"](null, null);
|
700
|
-
}
|
701
|
-
return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
|
702
|
-
}
|
703
|
-
};
|
704
|
-
function getEACAggregatorProxyContract(chainId, address) {
|
705
|
-
let contract = getContractByABI(
|
706
|
-
"EACAggregatorProxy",
|
707
|
-
address,
|
708
|
-
chainId
|
709
|
-
);
|
710
|
-
if (!contract) {
|
711
|
-
const rawContract = EACAggregatorProxy__factory.connect(
|
712
|
-
address,
|
713
|
-
getProvider(chainId)
|
714
|
-
);
|
715
|
-
contract = new EACAggregatorProxyContractView(rawContract);
|
716
|
-
addContractByABI("EACAggregatorProxy", address, chainId, contract);
|
717
|
-
}
|
718
|
-
return contract;
|
719
|
-
}
|
720
|
-
function getEACAggregatorProxyContractOnContext(context, address) {
|
721
|
-
const view = getEACAggregatorProxyContract(context.getChainId(), address);
|
722
|
-
const boundView = new EACAggregatorProxyBoundContractView(address, view);
|
723
|
-
boundView.context = context;
|
724
|
-
if (boundView.callStatic) {
|
725
|
-
boundView.callStatic.context = context;
|
726
|
-
}
|
727
|
-
return boundView;
|
728
|
-
}
|
729
|
-
|
730
|
-
// src/eth/builtin/internal/eacaggregatorproxy-test-utils.ts
|
731
|
-
var mockField = {
|
732
|
-
blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
|
733
|
-
blockNumber: 0,
|
734
|
-
logIndex: 0,
|
735
|
-
removed: false,
|
736
|
-
transactionHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
|
737
|
-
transactionIndex: 0
|
738
|
-
};
|
739
|
-
function mockAnswerUpdatedLog(contractAddress, event) {
|
740
|
-
const contract = getEACAggregatorProxyContract(
|
741
|
-
import_chain.EthChainId.ETHEREUM,
|
742
|
-
contractAddress
|
743
|
-
);
|
744
|
-
const encodedLog = contract.rawContract.interface.encodeEventLog(
|
745
|
-
"AnswerUpdated(int256,uint256,uint256)",
|
746
|
-
[event.current, event.roundId, event.updatedAt]
|
747
|
-
);
|
748
|
-
return {
|
749
|
-
...mockField,
|
750
|
-
index: 0,
|
751
|
-
address: contractAddress,
|
752
|
-
data: encodedLog.data,
|
753
|
-
topics: encodedLog.topics
|
754
|
-
};
|
755
|
-
}
|
756
|
-
function mockNewRoundLog(contractAddress, event) {
|
757
|
-
const contract = getEACAggregatorProxyContract(
|
758
|
-
import_chain.EthChainId.ETHEREUM,
|
759
|
-
contractAddress
|
760
|
-
);
|
761
|
-
const encodedLog = contract.rawContract.interface.encodeEventLog(
|
762
|
-
"NewRound(uint256,address,uint256)",
|
763
|
-
[event.roundId, event.startedBy, event.startedAt]
|
764
|
-
);
|
765
|
-
return {
|
766
|
-
...mockField,
|
767
|
-
index: 0,
|
768
|
-
address: contractAddress,
|
769
|
-
data: encodedLog.data,
|
770
|
-
topics: encodedLog.topics
|
771
|
-
};
|
772
|
-
}
|
773
|
-
function mockOwnershipTransferRequestedLog(contractAddress, event) {
|
774
|
-
const contract = getEACAggregatorProxyContract(
|
775
|
-
import_chain.EthChainId.ETHEREUM,
|
776
|
-
contractAddress
|
777
|
-
);
|
778
|
-
const encodedLog = contract.rawContract.interface.encodeEventLog(
|
779
|
-
"OwnershipTransferRequested(address,address)",
|
780
|
-
[event.from, event.to]
|
781
|
-
);
|
782
|
-
return {
|
783
|
-
...mockField,
|
784
|
-
index: 0,
|
785
|
-
address: contractAddress,
|
786
|
-
data: encodedLog.data,
|
787
|
-
topics: encodedLog.topics
|
788
|
-
};
|
789
|
-
}
|
790
|
-
function mockOwnershipTransferredLog(contractAddress, event) {
|
791
|
-
const contract = getEACAggregatorProxyContract(
|
792
|
-
import_chain.EthChainId.ETHEREUM,
|
793
|
-
contractAddress
|
794
|
-
);
|
795
|
-
const encodedLog = contract.rawContract.interface.encodeEventLog(
|
796
|
-
"OwnershipTransferred(address,address)",
|
797
|
-
[event.from, event.to]
|
798
|
-
);
|
799
|
-
return {
|
800
|
-
...mockField,
|
801
|
-
index: 0,
|
802
|
-
address: contractAddress,
|
803
|
-
data: encodedLog.data,
|
804
|
-
topics: encodedLog.topics
|
805
|
-
};
|
806
|
-
}
|
807
|
-
|
808
|
-
export {
|
809
|
-
EACAggregatorProxyContractView,
|
810
|
-
EACAggregatorProxyBoundContractView,
|
811
|
-
EACAggregatorProxyProcessor,
|
812
|
-
EACAggregatorProxyProcessorTemplate,
|
813
|
-
getEACAggregatorProxyContract,
|
814
|
-
getEACAggregatorProxyContractOnContext,
|
815
|
-
mockAnswerUpdatedLog,
|
816
|
-
mockNewRoundLog,
|
817
|
-
mockOwnershipTransferRequestedLog,
|
818
|
-
mockOwnershipTransferredLog,
|
819
|
-
eacaggregatorproxy_exports
|
820
|
-
};
|