@sentio/sdk 2.40.1-rc.1 → 2.40.1-rc.3
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/eth/builtin/internal/eacaggregatorproxy-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js +25 -69
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.js +10 -24
- package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.js +20 -52
- package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.js +11 -25
- package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.js +16 -40
- package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.js +13 -31
- package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
- package/lib/eth/codegen/file.d.ts.map +1 -1
- package/lib/eth/codegen/file.js +5 -1
- package/lib/eth/codegen/file.js.map +1 -1
- package/lib/eth/codegen/function-calls.d.ts +1 -0
- package/lib/eth/codegen/function-calls.d.ts.map +1 -1
- package/lib/eth/codegen/function-calls.js +3 -1
- package/lib/eth/codegen/function-calls.js.map +1 -1
- package/lib/eth/codegen/types.d.ts.map +1 -1
- package/lib/eth/codegen/types.js +23 -6
- package/lib/eth/codegen/types.js.map +1 -1
- package/package.json +3 -3
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +26 -69
- package/src/eth/builtin/internal/erc1155-processor.ts +11 -24
- package/src/eth/builtin/internal/erc20-processor.ts +21 -52
- package/src/eth/builtin/internal/erc20bytes-processor.ts +12 -25
- package/src/eth/builtin/internal/erc721-processor.ts +17 -40
- package/src/eth/builtin/internal/weth9-processor.ts +14 -31
- package/src/eth/codegen/file.ts +5 -0
- package/src/eth/codegen/function-calls.ts +4 -1
- package/src/eth/codegen/types.ts +29 -7
@@ -10,6 +10,9 @@ export function generateViewFunctions(view, functions) {
|
|
10
10
|
const includeArgTypes = functions.length !== 1;
|
11
11
|
return functions.flatMap((fn) => generateViewFunction(view, fn, includeArgTypes));
|
12
12
|
}
|
13
|
+
export function generateFunctionSignatures(functions) {
|
14
|
+
return functions.map((fn) => `"function ${getFullSignatureWithOutputForFn(fn)}"`);
|
15
|
+
}
|
13
16
|
export function generateViewFunction(view, fn, includeArgTypes) {
|
14
17
|
const isView = fn.stateMutability === 'view' || fn.stateMutability === 'pure';
|
15
18
|
if (view !== isView) {
|
@@ -32,7 +35,6 @@ export function generateViewFunction(view, fn, includeArgTypes) {
|
|
32
35
|
})}overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): ${generateReturnTypes(fn)} {
|
33
36
|
try {
|
34
37
|
if (preparedData?.ethCallResults && ethCallContext) {
|
35
|
-
const iface = new Interface(["function ${getFullSignatureWithOutputForFn(fn)}"])
|
36
38
|
const calldata = iface.encodeFunctionData(
|
37
39
|
"${fn.name}",[${fn.inputs.length > 0 ? fn.inputs.map((input, index) => input.name || `arg${index}`).join(',') + ',' : ''}]
|
38
40
|
)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"function-calls.js","sourceRoot":"","sources":["../../../src/eth/codegen/function-calls.ts"],"names":[],"mappings":"AAAA,+IAA+I;AAC/I,OAAO,EAAuB,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAClE,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AACjG,OAAO,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EAAE,CAAC,MAAM,EAAE;YACrD,UAAU,EAAE,IAAI;SACjB,CAAC;;;;;;;;kCAQ8B,QAAQ,IACpC,EAAE,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,IAAI,MAAM,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,EACxG;;GAED;KACA,CAAA;AACH,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/eth/codegen/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/eth/codegen/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,gBAAgB,EAChB,mBAAmB,EAEpB,MAAM,WAAW,CAAA;AAGlB,wBAAgB,mCAAmC,CAAC,EAAE,EAAE,mBAAmB,GAAG,MAAM,CAUnF;AAaD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAM/E;AAGD,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,mBAAmB,GAAG,MAAM,CAM3E;AAED,wBAAgB,+BAA+B,CAAC,EAAE,EAAE,mBAAmB,UAKtE"}
|
package/lib/eth/codegen/types.js
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { getArgumentForSignature, getSignatureForFn } from 'typechain';
|
2
1
|
export function getFullSignatureAsSymbolForFunction(fn) {
|
3
2
|
return `${fn.name}_${fn.inputs
|
4
3
|
.map((e) => {
|
@@ -38,16 +37,34 @@ export function getFullSignatureForFunction(fn) {
|
|
38
37
|
})
|
39
38
|
.join(',')})`;
|
40
39
|
}
|
40
|
+
export function getFullSignatureWithOutputForFn(fn) {
|
41
|
+
return `${fn.name}(${fn.inputs.map((i) => getArgumentForSignature(i)).join(', ')}) ${fn.stateMutability} returns (${fn.outputs
|
42
|
+
.map((i) => getOutputArgumentForSignature(i))
|
43
|
+
.filter((s) => s != '')
|
44
|
+
.join(', ')})`;
|
45
|
+
}
|
41
46
|
function getOutputArgumentForSignature(argument) {
|
42
47
|
if (argument.type.type == 'void') {
|
43
48
|
return '';
|
44
49
|
}
|
45
50
|
return getArgumentForSignature(argument);
|
46
51
|
}
|
47
|
-
|
48
|
-
|
49
|
-
.map((i) =>
|
50
|
-
|
51
|
-
|
52
|
+
function getArgumentForSignature(argument) {
|
53
|
+
if (argument.type.originalType === 'tuple') {
|
54
|
+
return `(${argument.type.components.map((i) => getTypeWithName(getArgumentForSignature(i), argument.name)).join(', ')})`;
|
55
|
+
}
|
56
|
+
else if (argument.type.originalType.startsWith('tuple')) {
|
57
|
+
const arr = argument.type;
|
58
|
+
return getTypeWithName(`${getArgumentForSignature({
|
59
|
+
name: '',
|
60
|
+
type: arr.itemType
|
61
|
+
})}[${arr.size?.toString() || ''}]`, argument.name);
|
62
|
+
}
|
63
|
+
else {
|
64
|
+
return getTypeWithName(argument.type.originalType, argument.name);
|
65
|
+
}
|
66
|
+
}
|
67
|
+
function getTypeWithName(type, name) {
|
68
|
+
return (name ?? '').length > 0 ? `${type} ${name}` : type;
|
52
69
|
}
|
53
70
|
//# sourceMappingURL=types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/eth/codegen/types.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/eth/codegen/types.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,mCAAmC,CAAC,EAAuB;IACzE,OAAO,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,MAAM;SAC3B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO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AO,eAAe,CACpB,GAAG,uBAAuB,CAAC;YACzB,IAAI,EAAE,EAAE;YACR,IAAI,EAAE,GAAG,CAAC,QAAQ;SACnB,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EACnC,QAAQ,CAAC,IAAI,CACd,CAAA;IACH,CAAC;SAAM,CAAC;QACN,OAAO,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;IACnE,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,IAAY,EAAE,IAAa;IAClD,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;AAC3D,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sentio/sdk",
|
3
|
-
"version": "2.40.1-rc.
|
3
|
+
"version": "2.40.1-rc.3",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -86,8 +86,8 @@
|
|
86
86
|
"typechain": "^8.3.2",
|
87
87
|
"utility-types": "^3.11.0",
|
88
88
|
"yaml": "^2.3.4",
|
89
|
-
"@sentio/runtime": "^2.40.1-rc.
|
90
|
-
"@sentio/protos": "2.40.1-rc.
|
89
|
+
"@sentio/runtime": "^2.40.1-rc.3",
|
90
|
+
"@sentio/protos": "2.40.1-rc.3"
|
91
91
|
},
|
92
92
|
"peerDependencies": {
|
93
93
|
"tsup": "npm:@sentio/tsup@^6.7.2"
|
@@ -193,6 +193,32 @@ const templateContract = EACAggregatorProxy__factory.connect(
|
|
193
193
|
DummyProvider
|
194
194
|
);
|
195
195
|
|
196
|
+
const iface = new Interface([
|
197
|
+
"function acceptOwnership() nonpayable returns ()",
|
198
|
+
"function accessController() view returns (address)",
|
199
|
+
"function aggregator() view returns (address)",
|
200
|
+
"function confirmAggregator(address _aggregator) nonpayable returns ()",
|
201
|
+
"function decimals() view returns (uint8)",
|
202
|
+
"function description() view returns (string)",
|
203
|
+
"function getAnswer(uint256 _roundId) view returns (int256)",
|
204
|
+
"function getRoundData(uint80 _roundId) view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)",
|
205
|
+
"function getTimestamp(uint256 _roundId) view returns (uint256)",
|
206
|
+
"function latestAnswer() view returns (int256)",
|
207
|
+
"function latestRound() view returns (uint256)",
|
208
|
+
"function latestRoundData() view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)",
|
209
|
+
"function latestTimestamp() view returns (uint256)",
|
210
|
+
"function owner() view returns (address)",
|
211
|
+
"function phaseAggregators(uint16) view returns (address)",
|
212
|
+
"function phaseId() view returns (uint16)",
|
213
|
+
"function proposeAggregator(address _aggregator) nonpayable returns ()",
|
214
|
+
"function proposedAggregator() view returns (address)",
|
215
|
+
"function proposedGetRoundData(uint80 _roundId) view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)",
|
216
|
+
"function proposedLatestRoundData() view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)",
|
217
|
+
"function setController(address _accessController) nonpayable returns ()",
|
218
|
+
"function transferOwnership(address _to) nonpayable returns ()",
|
219
|
+
"function version() view returns (uint256)",
|
220
|
+
]);
|
221
|
+
|
196
222
|
export class EACAggregatorProxyContractView extends ContractView<EACAggregatorProxy> {
|
197
223
|
constructor(contract: EACAggregatorProxy) {
|
198
224
|
super(contract);
|
@@ -206,9 +232,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
206
232
|
): Promise<string> {
|
207
233
|
try {
|
208
234
|
if (preparedData?.ethCallResults && ethCallContext) {
|
209
|
-
const iface = new Interface([
|
210
|
-
"function accessController() view returns (address)",
|
211
|
-
]);
|
212
235
|
const calldata = iface.encodeFunctionData("accessController", []);
|
213
236
|
const ethCallKey = makeEthCallKey({
|
214
237
|
context: ethCallContext,
|
@@ -238,9 +261,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
238
261
|
): Promise<string> {
|
239
262
|
try {
|
240
263
|
if (preparedData?.ethCallResults && ethCallContext) {
|
241
|
-
const iface = new Interface([
|
242
|
-
"function aggregator() view returns (address)",
|
243
|
-
]);
|
244
264
|
const calldata = iface.encodeFunctionData("aggregator", []);
|
245
265
|
const ethCallKey = makeEthCallKey({
|
246
266
|
context: ethCallContext,
|
@@ -268,9 +288,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
268
288
|
): Promise<bigint> {
|
269
289
|
try {
|
270
290
|
if (preparedData?.ethCallResults && ethCallContext) {
|
271
|
-
const iface = new Interface([
|
272
|
-
"function decimals() view returns (uint8)",
|
273
|
-
]);
|
274
291
|
const calldata = iface.encodeFunctionData("decimals", []);
|
275
292
|
const ethCallKey = makeEthCallKey({
|
276
293
|
context: ethCallContext,
|
@@ -296,9 +313,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
296
313
|
): Promise<string> {
|
297
314
|
try {
|
298
315
|
if (preparedData?.ethCallResults && ethCallContext) {
|
299
|
-
const iface = new Interface([
|
300
|
-
"function description() view returns (string)",
|
301
|
-
]);
|
302
316
|
const calldata = iface.encodeFunctionData("description", []);
|
303
317
|
const ethCallKey = makeEthCallKey({
|
304
318
|
context: ethCallContext,
|
@@ -327,9 +341,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
327
341
|
): Promise<bigint> {
|
328
342
|
try {
|
329
343
|
if (preparedData?.ethCallResults && ethCallContext) {
|
330
|
-
const iface = new Interface([
|
331
|
-
"function getAnswer(uint256) view returns (int256)",
|
332
|
-
]);
|
333
344
|
const calldata = iface.encodeFunctionData("getAnswer", [_roundId]);
|
334
345
|
const ethCallKey = makeEthCallKey({
|
335
346
|
context: ethCallContext,
|
@@ -367,9 +378,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
367
378
|
> {
|
368
379
|
try {
|
369
380
|
if (preparedData?.ethCallResults && ethCallContext) {
|
370
|
-
const iface = new Interface([
|
371
|
-
"function getRoundData(uint80) view returns (uint80,int256,uint256,uint256,uint80)",
|
372
|
-
]);
|
373
381
|
const calldata = iface.encodeFunctionData("getRoundData", [_roundId]);
|
374
382
|
const ethCallKey = makeEthCallKey({
|
375
383
|
context: ethCallContext,
|
@@ -401,9 +409,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
401
409
|
): Promise<bigint> {
|
402
410
|
try {
|
403
411
|
if (preparedData?.ethCallResults && ethCallContext) {
|
404
|
-
const iface = new Interface([
|
405
|
-
"function getTimestamp(uint256) view returns (uint256)",
|
406
|
-
]);
|
407
412
|
const calldata = iface.encodeFunctionData("getTimestamp", [_roundId]);
|
408
413
|
const ethCallKey = makeEthCallKey({
|
409
414
|
context: ethCallContext,
|
@@ -434,9 +439,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
434
439
|
): Promise<bigint> {
|
435
440
|
try {
|
436
441
|
if (preparedData?.ethCallResults && ethCallContext) {
|
437
|
-
const iface = new Interface([
|
438
|
-
"function latestAnswer() view returns (int256)",
|
439
|
-
]);
|
440
442
|
const calldata = iface.encodeFunctionData("latestAnswer", []);
|
441
443
|
const ethCallKey = makeEthCallKey({
|
442
444
|
context: ethCallContext,
|
@@ -464,9 +466,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
464
466
|
): Promise<bigint> {
|
465
467
|
try {
|
466
468
|
if (preparedData?.ethCallResults && ethCallContext) {
|
467
|
-
const iface = new Interface([
|
468
|
-
"function latestRound() view returns (uint256)",
|
469
|
-
]);
|
470
469
|
const calldata = iface.encodeFunctionData("latestRound", []);
|
471
470
|
const ethCallKey = makeEthCallKey({
|
472
471
|
context: ethCallContext,
|
@@ -502,9 +501,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
502
501
|
> {
|
503
502
|
try {
|
504
503
|
if (preparedData?.ethCallResults && ethCallContext) {
|
505
|
-
const iface = new Interface([
|
506
|
-
"function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)",
|
507
|
-
]);
|
508
504
|
const calldata = iface.encodeFunctionData("latestRoundData", []);
|
509
505
|
const ethCallKey = makeEthCallKey({
|
510
506
|
context: ethCallContext,
|
@@ -534,9 +530,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
534
530
|
): Promise<bigint> {
|
535
531
|
try {
|
536
532
|
if (preparedData?.ethCallResults && ethCallContext) {
|
537
|
-
const iface = new Interface([
|
538
|
-
"function latestTimestamp() view returns (uint256)",
|
539
|
-
]);
|
540
533
|
const calldata = iface.encodeFunctionData("latestTimestamp", []);
|
541
534
|
const ethCallKey = makeEthCallKey({
|
542
535
|
context: ethCallContext,
|
@@ -566,9 +559,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
566
559
|
): Promise<string> {
|
567
560
|
try {
|
568
561
|
if (preparedData?.ethCallResults && ethCallContext) {
|
569
|
-
const iface = new Interface([
|
570
|
-
"function owner() view returns (address)",
|
571
|
-
]);
|
572
562
|
const calldata = iface.encodeFunctionData("owner", []);
|
573
563
|
const ethCallKey = makeEthCallKey({
|
574
564
|
context: ethCallContext,
|
@@ -595,9 +585,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
595
585
|
): Promise<string> {
|
596
586
|
try {
|
597
587
|
if (preparedData?.ethCallResults && ethCallContext) {
|
598
|
-
const iface = new Interface([
|
599
|
-
"function phaseAggregators(uint16) view returns (address)",
|
600
|
-
]);
|
601
588
|
const calldata = iface.encodeFunctionData("phaseAggregators", [arg0]);
|
602
589
|
const ethCallKey = makeEthCallKey({
|
603
590
|
context: ethCallContext,
|
@@ -628,9 +615,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
628
615
|
): Promise<bigint> {
|
629
616
|
try {
|
630
617
|
if (preparedData?.ethCallResults && ethCallContext) {
|
631
|
-
const iface = new Interface([
|
632
|
-
"function phaseId() view returns (uint16)",
|
633
|
-
]);
|
634
618
|
const calldata = iface.encodeFunctionData("phaseId", []);
|
635
619
|
const ethCallKey = makeEthCallKey({
|
636
620
|
context: ethCallContext,
|
@@ -656,9 +640,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
656
640
|
): Promise<string> {
|
657
641
|
try {
|
658
642
|
if (preparedData?.ethCallResults && ethCallContext) {
|
659
|
-
const iface = new Interface([
|
660
|
-
"function proposedAggregator() view returns (address)",
|
661
|
-
]);
|
662
643
|
const calldata = iface.encodeFunctionData("proposedAggregator", []);
|
663
644
|
const ethCallKey = makeEthCallKey({
|
664
645
|
context: ethCallContext,
|
@@ -697,9 +678,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
697
678
|
> {
|
698
679
|
try {
|
699
680
|
if (preparedData?.ethCallResults && ethCallContext) {
|
700
|
-
const iface = new Interface([
|
701
|
-
"function proposedGetRoundData(uint80) view returns (uint80,int256,uint256,uint256,uint80)",
|
702
|
-
]);
|
703
681
|
const calldata = iface.encodeFunctionData("proposedGetRoundData", [
|
704
682
|
_roundId,
|
705
683
|
]);
|
@@ -740,9 +718,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
740
718
|
> {
|
741
719
|
try {
|
742
720
|
if (preparedData?.ethCallResults && ethCallContext) {
|
743
|
-
const iface = new Interface([
|
744
|
-
"function proposedLatestRoundData() view returns (uint80,int256,uint256,uint256,uint80)",
|
745
|
-
]);
|
746
721
|
const calldata = iface.encodeFunctionData(
|
747
722
|
"proposedLatestRoundData",
|
748
723
|
[]
|
@@ -775,9 +750,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
775
750
|
): Promise<bigint> {
|
776
751
|
try {
|
777
752
|
if (preparedData?.ethCallResults && ethCallContext) {
|
778
|
-
const iface = new Interface([
|
779
|
-
"function version() view returns (uint256)",
|
780
|
-
]);
|
781
753
|
const calldata = iface.encodeFunctionData("version", []);
|
782
754
|
const ethCallKey = makeEthCallKey({
|
783
755
|
context: ethCallContext,
|
@@ -806,9 +778,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
806
778
|
): Promise<void> {
|
807
779
|
try {
|
808
780
|
if (preparedData?.ethCallResults && ethCallContext) {
|
809
|
-
const iface = new Interface([
|
810
|
-
"function acceptOwnership() nonpayable returns ()",
|
811
|
-
]);
|
812
781
|
const calldata = iface.encodeFunctionData("acceptOwnership", []);
|
813
782
|
const ethCallKey = makeEthCallKey({
|
814
783
|
context: ethCallContext,
|
@@ -838,9 +807,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
838
807
|
): Promise<void> {
|
839
808
|
try {
|
840
809
|
if (preparedData?.ethCallResults && ethCallContext) {
|
841
|
-
const iface = new Interface([
|
842
|
-
"function confirmAggregator(address) nonpayable returns ()",
|
843
|
-
]);
|
844
810
|
const calldata = iface.encodeFunctionData("confirmAggregator", [
|
845
811
|
_aggregator,
|
846
812
|
]);
|
@@ -872,9 +838,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
872
838
|
): Promise<void> {
|
873
839
|
try {
|
874
840
|
if (preparedData?.ethCallResults && ethCallContext) {
|
875
|
-
const iface = new Interface([
|
876
|
-
"function proposeAggregator(address) nonpayable returns ()",
|
877
|
-
]);
|
878
841
|
const calldata = iface.encodeFunctionData("proposeAggregator", [
|
879
842
|
_aggregator,
|
880
843
|
]);
|
@@ -906,9 +869,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
906
869
|
): Promise<void> {
|
907
870
|
try {
|
908
871
|
if (preparedData?.ethCallResults && ethCallContext) {
|
909
|
-
const iface = new Interface([
|
910
|
-
"function setController(address) nonpayable returns ()",
|
911
|
-
]);
|
912
872
|
const calldata = iface.encodeFunctionData("setController", [
|
913
873
|
_accessController,
|
914
874
|
]);
|
@@ -940,9 +900,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
|
|
940
900
|
): Promise<void> {
|
941
901
|
try {
|
942
902
|
if (preparedData?.ethCallResults && ethCallContext) {
|
943
|
-
const iface = new Interface([
|
944
|
-
"function transferOwnership(address) nonpayable returns ()",
|
945
|
-
]);
|
946
903
|
const calldata = iface.encodeFunctionData("transferOwnership", [_to]);
|
947
904
|
const ethCallKey = makeEthCallKey({
|
948
905
|
context: ethCallContext,
|
@@ -121,6 +121,17 @@ export type UriCallTrace = TypedCallTrace<[bigint], UriCallObject>;
|
|
121
121
|
|
122
122
|
const templateContract = ERC1155__factory.connect("0x0", DummyProvider);
|
123
123
|
|
124
|
+
const iface = new Interface([
|
125
|
+
"function balanceOf(address account, uint256 id) view returns (uint256)",
|
126
|
+
"function balanceOfBatch(address[] accounts, uint256[] ids) view returns (uint256[])",
|
127
|
+
"function isApprovedForAll(address account, address operator) view returns (bool)",
|
128
|
+
"function safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] amounts, bytes data) nonpayable returns ()",
|
129
|
+
"function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data) nonpayable returns ()",
|
130
|
+
"function setApprovalForAll(address operator, bool approved) nonpayable returns ()",
|
131
|
+
"function supportsInterface(bytes4 interfaceId) view returns (bool)",
|
132
|
+
"function uri(uint256 id) view returns (string)",
|
133
|
+
]);
|
134
|
+
|
124
135
|
export class ERC1155ContractView extends ContractView<ERC1155> {
|
125
136
|
constructor(contract: ERC1155) {
|
126
137
|
super(contract);
|
@@ -136,9 +147,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
136
147
|
): Promise<bigint> {
|
137
148
|
try {
|
138
149
|
if (preparedData?.ethCallResults && ethCallContext) {
|
139
|
-
const iface = new Interface([
|
140
|
-
"function balanceOf(address,uint256) view returns (uint256)",
|
141
|
-
]);
|
142
150
|
const calldata = iface.encodeFunctionData("balanceOf", [account, id]);
|
143
151
|
const ethCallKey = makeEthCallKey({
|
144
152
|
context: ethCallContext,
|
@@ -170,9 +178,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
170
178
|
): Promise<bigint[]> {
|
171
179
|
try {
|
172
180
|
if (preparedData?.ethCallResults && ethCallContext) {
|
173
|
-
const iface = new Interface([
|
174
|
-
"function balanceOfBatch(address[],uint256[]) view returns (uint256[])",
|
175
|
-
]);
|
176
181
|
const calldata = iface.encodeFunctionData("balanceOfBatch", [
|
177
182
|
accounts,
|
178
183
|
ids,
|
@@ -207,9 +212,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
207
212
|
): Promise<boolean> {
|
208
213
|
try {
|
209
214
|
if (preparedData?.ethCallResults && ethCallContext) {
|
210
|
-
const iface = new Interface([
|
211
|
-
"function isApprovedForAll(address,address) view returns (bool)",
|
212
|
-
]);
|
213
215
|
const calldata = iface.encodeFunctionData("isApprovedForAll", [
|
214
216
|
account,
|
215
217
|
operator,
|
@@ -243,9 +245,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
243
245
|
): Promise<boolean> {
|
244
246
|
try {
|
245
247
|
if (preparedData?.ethCallResults && ethCallContext) {
|
246
|
-
const iface = new Interface([
|
247
|
-
"function supportsInterface(bytes4) view returns (bool)",
|
248
|
-
]);
|
249
248
|
const calldata = iface.encodeFunctionData("supportsInterface", [
|
250
249
|
interfaceId,
|
251
250
|
]);
|
@@ -279,9 +278,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
279
278
|
): Promise<string> {
|
280
279
|
try {
|
281
280
|
if (preparedData?.ethCallResults && ethCallContext) {
|
282
|
-
const iface = new Interface([
|
283
|
-
"function uri(uint256) view returns (string)",
|
284
|
-
]);
|
285
281
|
const calldata = iface.encodeFunctionData("uri", [id]);
|
286
282
|
const ethCallKey = makeEthCallKey({
|
287
283
|
context: ethCallContext,
|
@@ -318,9 +314,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
318
314
|
): Promise<void> {
|
319
315
|
try {
|
320
316
|
if (preparedData?.ethCallResults && ethCallContext) {
|
321
|
-
const iface = new Interface([
|
322
|
-
"function safeBatchTransferFrom(address,address,uint256[],uint256[],bytes) nonpayable returns ()",
|
323
|
-
]);
|
324
317
|
const calldata = iface.encodeFunctionData("safeBatchTransferFrom", [
|
325
318
|
from,
|
326
319
|
to,
|
@@ -362,9 +355,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
362
355
|
): Promise<void> {
|
363
356
|
try {
|
364
357
|
if (preparedData?.ethCallResults && ethCallContext) {
|
365
|
-
const iface = new Interface([
|
366
|
-
"function safeTransferFrom(address,address,uint256,uint256,bytes) nonpayable returns ()",
|
367
|
-
]);
|
368
358
|
const calldata = iface.encodeFunctionData("safeTransferFrom", [
|
369
359
|
from,
|
370
360
|
to,
|
@@ -403,9 +393,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
403
393
|
): Promise<void> {
|
404
394
|
try {
|
405
395
|
if (preparedData?.ethCallResults && ethCallContext) {
|
406
|
-
const iface = new Interface([
|
407
|
-
"function setApprovalForAll(address,bool) nonpayable returns ()",
|
408
|
-
]);
|
409
396
|
const calldata = iface.encodeFunctionData("setApprovalForAll", [
|
410
397
|
operator,
|
411
398
|
approved,
|