@sentio/sdk 2.6.4-rc.2 → 2.6.4-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.js +19 -19
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.js +6 -6
- package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.js +9 -9
- package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.js +7 -7
- package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.js +10 -10
- package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.js +7 -7
- package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
- package/lib/eth/codegen/file.js +1 -1
- package/lib/eth/codegen/file.js.map +1 -1
- package/lib/eth/codegen/view-function.js +1 -1
- package/lib/eth/codegen/view-function.js.map +1 -1
- package/lib/eth/eth.d.ts +2 -2
- package/lib/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/package.json +5 -5
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +18 -19
- package/src/eth/builtin/internal/erc1155-processor.ts +5 -6
- package/src/eth/builtin/internal/erc20-processor.ts +8 -9
- package/src/eth/builtin/internal/erc20bytes-processor.ts +6 -7
- package/src/eth/builtin/internal/erc721-processor.ts +9 -10
- package/src/eth/builtin/internal/weth9-processor.ts +6 -7
- package/src/eth/codegen/file.ts +1 -1
- package/src/eth/codegen/view-function.ts +1 -1
- package/src/index.ts +3 -0
@@ -19,7 +19,6 @@ import {
|
|
19
19
|
ContractView,
|
20
20
|
DummyProvider,
|
21
21
|
TypedCallTrace,
|
22
|
-
toBlockTag,
|
23
22
|
} from "@sentio/sdk/eth";
|
24
23
|
import { EthFetchConfig } from "@sentio/protos";
|
25
24
|
|
@@ -174,7 +173,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
174
173
|
async name(overrides?: Overrides): Promise<string> {
|
175
174
|
if (!overrides && this.context) {
|
176
175
|
overrides = {
|
177
|
-
blockTag:
|
176
|
+
blockTag: this.context.blockNumber,
|
178
177
|
};
|
179
178
|
}
|
180
179
|
return await this.view.name(overrides || {});
|
@@ -183,7 +182,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
183
182
|
async totalSupply(overrides?: Overrides): Promise<bigint> {
|
184
183
|
if (!overrides && this.context) {
|
185
184
|
overrides = {
|
186
|
-
blockTag:
|
185
|
+
blockTag: this.context.blockNumber,
|
187
186
|
};
|
188
187
|
}
|
189
188
|
return await this.view.totalSupply(overrides || {});
|
@@ -192,7 +191,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
192
191
|
async decimals(overrides?: Overrides): Promise<bigint> {
|
193
192
|
if (!overrides && this.context) {
|
194
193
|
overrides = {
|
195
|
-
blockTag:
|
194
|
+
blockTag: this.context.blockNumber,
|
196
195
|
};
|
197
196
|
}
|
198
197
|
return await this.view.decimals(overrides || {});
|
@@ -201,7 +200,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
201
200
|
async balanceOf(who: string, overrides?: Overrides): Promise<bigint> {
|
202
201
|
if (!overrides && this.context) {
|
203
202
|
overrides = {
|
204
|
-
blockTag:
|
203
|
+
blockTag: this.context.blockNumber,
|
205
204
|
};
|
206
205
|
}
|
207
206
|
return await this.view.balanceOf(who, overrides || {});
|
@@ -210,7 +209,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
210
209
|
async symbol(overrides?: Overrides): Promise<string> {
|
211
210
|
if (!overrides && this.context) {
|
212
211
|
overrides = {
|
213
|
-
blockTag:
|
212
|
+
blockTag: this.context.blockNumber,
|
214
213
|
};
|
215
214
|
}
|
216
215
|
return await this.view.symbol(overrides || {});
|
@@ -223,7 +222,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
223
222
|
): Promise<bigint> {
|
224
223
|
if (!overrides && this.context) {
|
225
224
|
overrides = {
|
226
|
-
blockTag:
|
225
|
+
blockTag: this.context.blockNumber,
|
227
226
|
};
|
228
227
|
}
|
229
228
|
return await this.view.allowance(owner, spender, overrides || {});
|
@@ -19,7 +19,6 @@ import {
|
|
19
19
|
ContractView,
|
20
20
|
DummyProvider,
|
21
21
|
TypedCallTrace,
|
22
|
-
toBlockTag,
|
23
22
|
} from "@sentio/sdk/eth";
|
24
23
|
import { EthFetchConfig } from "@sentio/protos";
|
25
24
|
|
@@ -275,7 +274,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
275
274
|
async totalSupply(overrides?: Overrides): Promise<bigint> {
|
276
275
|
if (!overrides && this.context) {
|
277
276
|
overrides = {
|
278
|
-
blockTag:
|
277
|
+
blockTag: this.context.blockNumber,
|
279
278
|
};
|
280
279
|
}
|
281
280
|
return await this.view.totalSupply(overrides || {});
|
@@ -284,7 +283,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
284
283
|
async balanceOf(owner: string, overrides?: Overrides): Promise<bigint> {
|
285
284
|
if (!overrides && this.context) {
|
286
285
|
overrides = {
|
287
|
-
blockTag:
|
286
|
+
blockTag: this.context.blockNumber,
|
288
287
|
};
|
289
288
|
}
|
290
289
|
return await this.view.balanceOf(owner, overrides || {});
|
@@ -296,7 +295,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
296
295
|
): Promise<string> {
|
297
296
|
if (!overrides && this.context) {
|
298
297
|
overrides = {
|
299
|
-
blockTag:
|
298
|
+
blockTag: this.context.blockNumber,
|
300
299
|
};
|
301
300
|
}
|
302
301
|
return await this.view.getApproved(tokenId, overrides || {});
|
@@ -309,7 +308,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
309
308
|
): Promise<boolean> {
|
310
309
|
if (!overrides && this.context) {
|
311
310
|
overrides = {
|
312
|
-
blockTag:
|
311
|
+
blockTag: this.context.blockNumber,
|
313
312
|
};
|
314
313
|
}
|
315
314
|
return await this.view.isApprovedForAll(owner, operator, overrides || {});
|
@@ -318,7 +317,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
318
317
|
async name(overrides?: Overrides): Promise<string> {
|
319
318
|
if (!overrides && this.context) {
|
320
319
|
overrides = {
|
321
|
-
blockTag:
|
320
|
+
blockTag: this.context.blockNumber,
|
322
321
|
};
|
323
322
|
}
|
324
323
|
return await this.view.name(overrides || {});
|
@@ -327,7 +326,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
327
326
|
async ownerOf(tokenId: BigNumberish, overrides?: Overrides): Promise<string> {
|
328
327
|
if (!overrides && this.context) {
|
329
328
|
overrides = {
|
330
|
-
blockTag:
|
329
|
+
blockTag: this.context.blockNumber,
|
331
330
|
};
|
332
331
|
}
|
333
332
|
return await this.view.ownerOf(tokenId, overrides || {});
|
@@ -339,7 +338,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
339
338
|
): Promise<boolean> {
|
340
339
|
if (!overrides && this.context) {
|
341
340
|
overrides = {
|
342
|
-
blockTag:
|
341
|
+
blockTag: this.context.blockNumber,
|
343
342
|
};
|
344
343
|
}
|
345
344
|
return await this.view.supportsInterface(interfaceId, overrides || {});
|
@@ -348,7 +347,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
348
347
|
async symbol(overrides?: Overrides): Promise<string> {
|
349
348
|
if (!overrides && this.context) {
|
350
349
|
overrides = {
|
351
|
-
blockTag:
|
350
|
+
blockTag: this.context.blockNumber,
|
352
351
|
};
|
353
352
|
}
|
354
353
|
return await this.view.symbol(overrides || {});
|
@@ -360,7 +359,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
360
359
|
): Promise<string> {
|
361
360
|
if (!overrides && this.context) {
|
362
361
|
overrides = {
|
363
|
-
blockTag:
|
362
|
+
blockTag: this.context.blockNumber,
|
364
363
|
};
|
365
364
|
}
|
366
365
|
return await this.view.tokenURI(tokenId, overrides || {});
|
@@ -19,7 +19,6 @@ import {
|
|
19
19
|
ContractView,
|
20
20
|
DummyProvider,
|
21
21
|
TypedCallTrace,
|
22
|
-
toBlockTag,
|
23
22
|
} from "@sentio/sdk/eth";
|
24
23
|
import { EthFetchConfig } from "@sentio/protos";
|
25
24
|
|
@@ -184,7 +183,7 @@ export class WETH9BoundContractView extends BoundContractView<
|
|
184
183
|
async name(overrides?: Overrides): Promise<string> {
|
185
184
|
if (!overrides && this.context) {
|
186
185
|
overrides = {
|
187
|
-
blockTag:
|
186
|
+
blockTag: this.context.blockNumber,
|
188
187
|
};
|
189
188
|
}
|
190
189
|
return await this.view.name(overrides || {});
|
@@ -193,7 +192,7 @@ export class WETH9BoundContractView extends BoundContractView<
|
|
193
192
|
async totalSupply(overrides?: Overrides): Promise<bigint> {
|
194
193
|
if (!overrides && this.context) {
|
195
194
|
overrides = {
|
196
|
-
blockTag:
|
195
|
+
blockTag: this.context.blockNumber,
|
197
196
|
};
|
198
197
|
}
|
199
198
|
return await this.view.totalSupply(overrides || {});
|
@@ -202,7 +201,7 @@ export class WETH9BoundContractView extends BoundContractView<
|
|
202
201
|
async decimals(overrides?: Overrides): Promise<bigint> {
|
203
202
|
if (!overrides && this.context) {
|
204
203
|
overrides = {
|
205
|
-
blockTag:
|
204
|
+
blockTag: this.context.blockNumber,
|
206
205
|
};
|
207
206
|
}
|
208
207
|
return await this.view.decimals(overrides || {});
|
@@ -211,7 +210,7 @@ export class WETH9BoundContractView extends BoundContractView<
|
|
211
210
|
async balanceOf(arg0: string, overrides?: Overrides): Promise<bigint> {
|
212
211
|
if (!overrides && this.context) {
|
213
212
|
overrides = {
|
214
|
-
blockTag:
|
213
|
+
blockTag: this.context.blockNumber,
|
215
214
|
};
|
216
215
|
}
|
217
216
|
return await this.view.balanceOf(arg0, overrides || {});
|
@@ -220,7 +219,7 @@ export class WETH9BoundContractView extends BoundContractView<
|
|
220
219
|
async symbol(overrides?: Overrides): Promise<string> {
|
221
220
|
if (!overrides && this.context) {
|
222
221
|
overrides = {
|
223
|
-
blockTag:
|
222
|
+
blockTag: this.context.blockNumber,
|
224
223
|
};
|
225
224
|
}
|
226
225
|
return await this.view.symbol(overrides || {});
|
@@ -233,7 +232,7 @@ export class WETH9BoundContractView extends BoundContractView<
|
|
233
232
|
): Promise<bigint> {
|
234
233
|
if (!overrides && this.context) {
|
235
234
|
overrides = {
|
236
|
-
blockTag:
|
235
|
+
blockTag: this.context.blockNumber,
|
237
236
|
};
|
238
237
|
}
|
239
238
|
return await this.view.allowance(arg0, arg1, overrides || {});
|
package/src/eth/codegen/file.ts
CHANGED
@@ -162,7 +162,7 @@ export class ${contract.name}ProcessorTemplate extends BaseProcessorTemplate<${c
|
|
162
162
|
'ContractView',
|
163
163
|
'DummyProvider',
|
164
164
|
'TypedCallTrace',
|
165
|
-
'toBlockTag',
|
165
|
+
// 'toBlockTag',
|
166
166
|
],
|
167
167
|
'@sentio/protos': ['EthFetchConfig'],
|
168
168
|
'./common.js': ['PromiseOrValue'],
|
@@ -62,7 +62,7 @@ export function generateBoundViewFunction(fn: FunctionDeclaration, includeArgTyp
|
|
62
62
|
})}overrides?: Overrides): ${generateReturnTypes(fn)} {
|
63
63
|
if (!overrides && this.context) {
|
64
64
|
overrides = {
|
65
|
-
blockTag:
|
65
|
+
blockTag: this.context.blockNumber,
|
66
66
|
}
|
67
67
|
}
|
68
68
|
return await this.view.${declName}(${
|