@sentio/sdk 2.18.1-rc.9 → 2.18.2-rc.1

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 (29) hide show
  1. package/lib/eth/base-processor-template.js +1 -1
  2. package/lib/eth/base-processor-template.js.map +1 -1
  3. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js +46 -23
  4. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
  5. package/lib/eth/builtin/internal/erc1155-processor.js +16 -8
  6. package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
  7. package/lib/eth/builtin/internal/erc20-processor.js +36 -18
  8. package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
  9. package/lib/eth/builtin/internal/erc20bytes-processor.js +18 -9
  10. package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
  11. package/lib/eth/builtin/internal/erc721-processor.js +28 -14
  12. package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
  13. package/lib/eth/builtin/internal/weth9-processor.js +22 -11
  14. package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
  15. package/lib/eth/codegen/function-calls.js +2 -1
  16. package/lib/eth/codegen/function-calls.js.map +1 -1
  17. package/lib/eth/eth.d.ts +2 -2
  18. package/lib/eth/eth.js +8 -13
  19. package/lib/eth/eth.js.map +1 -1
  20. package/package.json +3 -3
  21. package/src/eth/base-processor-template.ts +1 -1
  22. package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +46 -23
  23. package/src/eth/builtin/internal/erc1155-processor.ts +16 -8
  24. package/src/eth/builtin/internal/erc20-processor.ts +36 -18
  25. package/src/eth/builtin/internal/erc20bytes-processor.ts +18 -9
  26. package/src/eth/builtin/internal/erc721-processor.ts +28 -14
  27. package/src/eth/builtin/internal/weth9-processor.ts +22 -11
  28. package/src/eth/codegen/function-calls.ts +2 -1
  29. package/src/eth/eth.ts +8 -13
@@ -197,36 +197,40 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
197
197
  }
198
198
 
199
199
  async accessController(overrides?: Overrides): Promise<string> {
200
+ const stack = new Error().stack;
200
201
  try {
201
202
  return await this.contract.getFunction("accessController()")(
202
203
  overrides || {}
203
204
  );
204
205
  } catch (e) {
205
- throw transformEtherError(e, undefined);
206
+ throw transformEtherError(e, undefined, stack);
206
207
  }
207
208
  }
208
209
 
209
210
  async aggregator(overrides?: Overrides): Promise<string> {
211
+ const stack = new Error().stack;
210
212
  try {
211
213
  return await this.contract.getFunction("aggregator()")(overrides || {});
212
214
  } catch (e) {
213
- throw transformEtherError(e, undefined);
215
+ throw transformEtherError(e, undefined, stack);
214
216
  }
215
217
  }
216
218
 
217
219
  async decimals(overrides?: Overrides): Promise<bigint> {
220
+ const stack = new Error().stack;
218
221
  try {
219
222
  return await this.contract.getFunction("decimals()")(overrides || {});
220
223
  } catch (e) {
221
- throw transformEtherError(e, undefined);
224
+ throw transformEtherError(e, undefined, stack);
222
225
  }
223
226
  }
224
227
 
225
228
  async description(overrides?: Overrides): Promise<string> {
229
+ const stack = new Error().stack;
226
230
  try {
227
231
  return await this.contract.getFunction("description()")(overrides || {});
228
232
  } catch (e) {
229
- throw transformEtherError(e, undefined);
233
+ throw transformEtherError(e, undefined, stack);
230
234
  }
231
235
  }
232
236
 
@@ -234,13 +238,14 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
234
238
  _roundId: BigNumberish,
235
239
  overrides?: Overrides
236
240
  ): Promise<bigint> {
241
+ const stack = new Error().stack;
237
242
  try {
238
243
  return await this.contract.getFunction("getAnswer(uint256)")(
239
244
  _roundId,
240
245
  overrides || {}
241
246
  );
242
247
  } catch (e) {
243
- throw transformEtherError(e, undefined);
248
+ throw transformEtherError(e, undefined, stack);
244
249
  }
245
250
  }
246
251
 
@@ -256,13 +261,14 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
256
261
  answeredInRound: bigint;
257
262
  }
258
263
  > {
264
+ const stack = new Error().stack;
259
265
  try {
260
266
  return await this.contract.getFunction("getRoundData(uint80)")(
261
267
  _roundId,
262
268
  overrides || {}
263
269
  );
264
270
  } catch (e) {
265
- throw transformEtherError(e, undefined);
271
+ throw transformEtherError(e, undefined, stack);
266
272
  }
267
273
  }
268
274
 
@@ -270,29 +276,32 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
270
276
  _roundId: BigNumberish,
271
277
  overrides?: Overrides
272
278
  ): Promise<bigint> {
279
+ const stack = new Error().stack;
273
280
  try {
274
281
  return await this.contract.getFunction("getTimestamp(uint256)")(
275
282
  _roundId,
276
283
  overrides || {}
277
284
  );
278
285
  } catch (e) {
279
- throw transformEtherError(e, undefined);
286
+ throw transformEtherError(e, undefined, stack);
280
287
  }
281
288
  }
282
289
 
283
290
  async latestAnswer(overrides?: Overrides): Promise<bigint> {
291
+ const stack = new Error().stack;
284
292
  try {
285
293
  return await this.contract.getFunction("latestAnswer()")(overrides || {});
286
294
  } catch (e) {
287
- throw transformEtherError(e, undefined);
295
+ throw transformEtherError(e, undefined, stack);
288
296
  }
289
297
  }
290
298
 
291
299
  async latestRound(overrides?: Overrides): Promise<bigint> {
300
+ const stack = new Error().stack;
292
301
  try {
293
302
  return await this.contract.getFunction("latestRound()")(overrides || {});
294
303
  } catch (e) {
295
- throw transformEtherError(e, undefined);
304
+ throw transformEtherError(e, undefined, stack);
296
305
  }
297
306
  }
298
307
 
@@ -307,30 +316,33 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
307
316
  answeredInRound: bigint;
308
317
  }
309
318
  > {
319
+ const stack = new Error().stack;
310
320
  try {
311
321
  return await this.contract.getFunction("latestRoundData()")(
312
322
  overrides || {}
313
323
  );
314
324
  } catch (e) {
315
- throw transformEtherError(e, undefined);
325
+ throw transformEtherError(e, undefined, stack);
316
326
  }
317
327
  }
318
328
 
319
329
  async latestTimestamp(overrides?: Overrides): Promise<bigint> {
330
+ const stack = new Error().stack;
320
331
  try {
321
332
  return await this.contract.getFunction("latestTimestamp()")(
322
333
  overrides || {}
323
334
  );
324
335
  } catch (e) {
325
- throw transformEtherError(e, undefined);
336
+ throw transformEtherError(e, undefined, stack);
326
337
  }
327
338
  }
328
339
 
329
340
  async owner(overrides?: Overrides): Promise<string> {
341
+ const stack = new Error().stack;
330
342
  try {
331
343
  return await this.contract.getFunction("owner()")(overrides || {});
332
344
  } catch (e) {
333
- throw transformEtherError(e, undefined);
345
+ throw transformEtherError(e, undefined, stack);
334
346
  }
335
347
  }
336
348
 
@@ -338,31 +350,34 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
338
350
  arg0: BigNumberish,
339
351
  overrides?: Overrides
340
352
  ): Promise<string> {
353
+ const stack = new Error().stack;
341
354
  try {
342
355
  return await this.contract.getFunction("phaseAggregators(uint16)")(
343
356
  arg0,
344
357
  overrides || {}
345
358
  );
346
359
  } catch (e) {
347
- throw transformEtherError(e, undefined);
360
+ throw transformEtherError(e, undefined, stack);
348
361
  }
349
362
  }
350
363
 
351
364
  async phaseId(overrides?: Overrides): Promise<bigint> {
365
+ const stack = new Error().stack;
352
366
  try {
353
367
  return await this.contract.getFunction("phaseId()")(overrides || {});
354
368
  } catch (e) {
355
- throw transformEtherError(e, undefined);
369
+ throw transformEtherError(e, undefined, stack);
356
370
  }
357
371
  }
358
372
 
359
373
  async proposedAggregator(overrides?: Overrides): Promise<string> {
374
+ const stack = new Error().stack;
360
375
  try {
361
376
  return await this.contract.getFunction("proposedAggregator()")(
362
377
  overrides || {}
363
378
  );
364
379
  } catch (e) {
365
- throw transformEtherError(e, undefined);
380
+ throw transformEtherError(e, undefined, stack);
366
381
  }
367
382
  }
368
383
 
@@ -378,13 +393,14 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
378
393
  answeredInRound: bigint;
379
394
  }
380
395
  > {
396
+ const stack = new Error().stack;
381
397
  try {
382
398
  return await this.contract.getFunction("proposedGetRoundData(uint80)")(
383
399
  _roundId,
384
400
  overrides || {}
385
401
  );
386
402
  } catch (e) {
387
- throw transformEtherError(e, undefined);
403
+ throw transformEtherError(e, undefined, stack);
388
404
  }
389
405
  }
390
406
 
@@ -399,20 +415,22 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
399
415
  answeredInRound: bigint;
400
416
  }
401
417
  > {
418
+ const stack = new Error().stack;
402
419
  try {
403
420
  return await this.contract.getFunction("proposedLatestRoundData()")(
404
421
  overrides || {}
405
422
  );
406
423
  } catch (e) {
407
- throw transformEtherError(e, undefined);
424
+ throw transformEtherError(e, undefined, stack);
408
425
  }
409
426
  }
410
427
 
411
428
  async version(overrides?: Overrides): Promise<bigint> {
429
+ const stack = new Error().stack;
412
430
  try {
413
431
  return await this.contract.getFunction("version()")(overrides || {});
414
432
  } catch (e) {
415
- throw transformEtherError(e, undefined);
433
+ throw transformEtherError(e, undefined, stack);
416
434
  }
417
435
  }
418
436
 
@@ -420,57 +438,62 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
420
438
  contract: this.contract,
421
439
 
422
440
  async acceptOwnership(overrides?: Overrides): Promise<void> {
441
+ const stack = new Error().stack;
423
442
  try {
424
443
  return await this.contract
425
444
  .getFunction("acceptOwnership()")
426
445
  .staticCall(overrides || {});
427
446
  } catch (e) {
428
- throw transformEtherError(e, undefined);
447
+ throw transformEtherError(e, undefined, stack);
429
448
  }
430
449
  },
431
450
  async confirmAggregator(
432
451
  _aggregator: string,
433
452
  overrides?: Overrides
434
453
  ): Promise<void> {
454
+ const stack = new Error().stack;
435
455
  try {
436
456
  return await this.contract
437
457
  .getFunction("confirmAggregator(address)")
438
458
  .staticCall(_aggregator, overrides || {});
439
459
  } catch (e) {
440
- throw transformEtherError(e, undefined);
460
+ throw transformEtherError(e, undefined, stack);
441
461
  }
442
462
  },
443
463
  async proposeAggregator(
444
464
  _aggregator: string,
445
465
  overrides?: Overrides
446
466
  ): Promise<void> {
467
+ const stack = new Error().stack;
447
468
  try {
448
469
  return await this.contract
449
470
  .getFunction("proposeAggregator(address)")
450
471
  .staticCall(_aggregator, overrides || {});
451
472
  } catch (e) {
452
- throw transformEtherError(e, undefined);
473
+ throw transformEtherError(e, undefined, stack);
453
474
  }
454
475
  },
455
476
  async setController(
456
477
  _accessController: string,
457
478
  overrides?: Overrides
458
479
  ): Promise<void> {
480
+ const stack = new Error().stack;
459
481
  try {
460
482
  return await this.contract
461
483
  .getFunction("setController(address)")
462
484
  .staticCall(_accessController, overrides || {});
463
485
  } catch (e) {
464
- throw transformEtherError(e, undefined);
486
+ throw transformEtherError(e, undefined, stack);
465
487
  }
466
488
  },
467
489
  async transferOwnership(_to: string, overrides?: Overrides): Promise<void> {
490
+ const stack = new Error().stack;
468
491
  try {
469
492
  return await this.contract
470
493
  .getFunction("transferOwnership(address)")
471
494
  .staticCall(_to, overrides || {});
472
495
  } catch (e) {
473
- throw transformEtherError(e, undefined);
496
+ throw transformEtherError(e, undefined, stack);
474
497
  }
475
498
  },
476
499
  };
@@ -129,6 +129,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
129
129
  id: BigNumberish,
130
130
  overrides?: Overrides
131
131
  ): Promise<bigint> {
132
+ const stack = new Error().stack;
132
133
  try {
133
134
  return await this.contract.getFunction("balanceOf(address,uint256)")(
134
135
  account,
@@ -136,7 +137,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
136
137
  overrides || {}
137
138
  );
138
139
  } catch (e) {
139
- throw transformEtherError(e, undefined);
140
+ throw transformEtherError(e, undefined, stack);
140
141
  }
141
142
  }
142
143
 
@@ -145,12 +146,13 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
145
146
  ids: BigNumberish[],
146
147
  overrides?: Overrides
147
148
  ): Promise<bigint[]> {
149
+ const stack = new Error().stack;
148
150
  try {
149
151
  return await this.contract.getFunction(
150
152
  "balanceOfBatch(address[],uint256[])"
151
153
  )(accounts, ids, overrides || {});
152
154
  } catch (e) {
153
- throw transformEtherError(e, undefined);
155
+ throw transformEtherError(e, undefined, stack);
154
156
  }
155
157
  }
156
158
 
@@ -159,12 +161,13 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
159
161
  operator: string,
160
162
  overrides?: Overrides
161
163
  ): Promise<boolean> {
164
+ const stack = new Error().stack;
162
165
  try {
163
166
  return await this.contract.getFunction(
164
167
  "isApprovedForAll(address,address)"
165
168
  )(account, operator, overrides || {});
166
169
  } catch (e) {
167
- throw transformEtherError(e, undefined);
170
+ throw transformEtherError(e, undefined, stack);
168
171
  }
169
172
  }
170
173
 
@@ -172,24 +175,26 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
172
175
  interfaceId: BytesLike,
173
176
  overrides?: Overrides
174
177
  ): Promise<boolean> {
178
+ const stack = new Error().stack;
175
179
  try {
176
180
  return await this.contract.getFunction("supportsInterface(bytes4)")(
177
181
  interfaceId,
178
182
  overrides || {}
179
183
  );
180
184
  } catch (e) {
181
- throw transformEtherError(e, undefined);
185
+ throw transformEtherError(e, undefined, stack);
182
186
  }
183
187
  }
184
188
 
185
189
  async uri(id: BigNumberish, overrides?: Overrides): Promise<string> {
190
+ const stack = new Error().stack;
186
191
  try {
187
192
  return await this.contract.getFunction("uri(uint256)")(
188
193
  id,
189
194
  overrides || {}
190
195
  );
191
196
  } catch (e) {
192
- throw transformEtherError(e, undefined);
197
+ throw transformEtherError(e, undefined, stack);
193
198
  }
194
199
  }
195
200
 
@@ -204,6 +209,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
204
209
  data: BytesLike,
205
210
  overrides?: Overrides
206
211
  ): Promise<void> {
212
+ const stack = new Error().stack;
207
213
  try {
208
214
  return await this.contract
209
215
  .getFunction(
@@ -211,7 +217,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
211
217
  )
212
218
  .staticCall(from, to, ids, amounts, data, overrides || {});
213
219
  } catch (e) {
214
- throw transformEtherError(e, undefined);
220
+ throw transformEtherError(e, undefined, stack);
215
221
  }
216
222
  },
217
223
  async safeTransferFrom(
@@ -222,6 +228,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
222
228
  data: BytesLike,
223
229
  overrides?: Overrides
224
230
  ): Promise<void> {
231
+ const stack = new Error().stack;
225
232
  try {
226
233
  return await this.contract
227
234
  .getFunction(
@@ -229,7 +236,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
229
236
  )
230
237
  .staticCall(from, to, id, amount, data, overrides || {});
231
238
  } catch (e) {
232
- throw transformEtherError(e, undefined);
239
+ throw transformEtherError(e, undefined, stack);
233
240
  }
234
241
  },
235
242
  async setApprovalForAll(
@@ -237,12 +244,13 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
237
244
  approved: boolean,
238
245
  overrides?: Overrides
239
246
  ): Promise<void> {
247
+ const stack = new Error().stack;
240
248
  try {
241
249
  return await this.contract
242
250
  .getFunction("setApprovalForAll(address,bool)")
243
251
  .staticCall(operator, approved, overrides || {});
244
252
  } catch (e) {
245
- throw transformEtherError(e, undefined);
253
+ throw transformEtherError(e, undefined, stack);
246
254
  }
247
255
  },
248
256
  };
@@ -175,6 +175,7 @@ export class ERC20ContractView extends ContractView<ERC20> {
175
175
  spender: string,
176
176
  overrides?: Overrides
177
177
  ): Promise<bigint> {
178
+ const stack = new Error().stack;
178
179
  try {
179
180
  return await this.contract.getFunction("allowance(address,address)")(
180
181
  owner,
@@ -182,66 +183,73 @@ export class ERC20ContractView extends ContractView<ERC20> {
182
183
  overrides || {}
183
184
  );
184
185
  } catch (e) {
185
- throw transformEtherError(e, undefined);
186
+ throw transformEtherError(e, undefined, stack);
186
187
  }
187
188
  }
188
189
 
189
190
  async balanceOf(account: string, overrides?: Overrides): Promise<bigint> {
191
+ const stack = new Error().stack;
190
192
  try {
191
193
  return await this.contract.getFunction("balanceOf(address)")(
192
194
  account,
193
195
  overrides || {}
194
196
  );
195
197
  } catch (e) {
196
- throw transformEtherError(e, undefined);
198
+ throw transformEtherError(e, undefined, stack);
197
199
  }
198
200
  }
199
201
 
200
202
  async decimals(overrides?: Overrides): Promise<bigint> {
203
+ const stack = new Error().stack;
201
204
  try {
202
205
  return await this.contract.getFunction("decimals()")(overrides || {});
203
206
  } catch (e) {
204
- throw transformEtherError(e, undefined);
207
+ throw transformEtherError(e, undefined, stack);
205
208
  }
206
209
  }
207
210
 
208
211
  async locker(overrides?: Overrides): Promise<string> {
212
+ const stack = new Error().stack;
209
213
  try {
210
214
  return await this.contract.getFunction("locker()")(overrides || {});
211
215
  } catch (e) {
212
- throw transformEtherError(e, undefined);
216
+ throw transformEtherError(e, undefined, stack);
213
217
  }
214
218
  }
215
219
 
216
220
  async name(overrides?: Overrides): Promise<string> {
221
+ const stack = new Error().stack;
217
222
  try {
218
223
  return await this.contract.getFunction("name()")(overrides || {});
219
224
  } catch (e) {
220
- throw transformEtherError(e, undefined);
225
+ throw transformEtherError(e, undefined, stack);
221
226
  }
222
227
  }
223
228
 
224
229
  async owner(overrides?: Overrides): Promise<string> {
230
+ const stack = new Error().stack;
225
231
  try {
226
232
  return await this.contract.getFunction("owner()")(overrides || {});
227
233
  } catch (e) {
228
- throw transformEtherError(e, undefined);
234
+ throw transformEtherError(e, undefined, stack);
229
235
  }
230
236
  }
231
237
 
232
238
  async symbol(overrides?: Overrides): Promise<string> {
239
+ const stack = new Error().stack;
233
240
  try {
234
241
  return await this.contract.getFunction("symbol()")(overrides || {});
235
242
  } catch (e) {
236
- throw transformEtherError(e, undefined);
243
+ throw transformEtherError(e, undefined, stack);
237
244
  }
238
245
  }
239
246
 
240
247
  async totalSupply(overrides?: Overrides): Promise<bigint> {
248
+ const stack = new Error().stack;
241
249
  try {
242
250
  return await this.contract.getFunction("totalSupply()")(overrides || {});
243
251
  } catch (e) {
244
- throw transformEtherError(e, undefined);
252
+ throw transformEtherError(e, undefined, stack);
245
253
  }
246
254
  }
247
255
 
@@ -253,21 +261,23 @@ export class ERC20ContractView extends ContractView<ERC20> {
253
261
  amount: BigNumberish,
254
262
  overrides?: Overrides
255
263
  ): Promise<boolean> {
264
+ const stack = new Error().stack;
256
265
  try {
257
266
  return await this.contract
258
267
  .getFunction("approve(address,uint256)")
259
268
  .staticCall(spender, amount, overrides || {});
260
269
  } catch (e) {
261
- throw transformEtherError(e, undefined);
270
+ throw transformEtherError(e, undefined, stack);
262
271
  }
263
272
  },
264
273
  async burn(amount: BigNumberish, overrides?: Overrides): Promise<void> {
274
+ const stack = new Error().stack;
265
275
  try {
266
276
  return await this.contract
267
277
  .getFunction("burn(uint256)")
268
278
  .staticCall(amount, overrides || {});
269
279
  } catch (e) {
270
- throw transformEtherError(e, undefined);
280
+ throw transformEtherError(e, undefined, stack);
271
281
  }
272
282
  },
273
283
  async burnFrom(
@@ -275,12 +285,13 @@ export class ERC20ContractView extends ContractView<ERC20> {
275
285
  amount: BigNumberish,
276
286
  overrides?: Overrides
277
287
  ): Promise<void> {
288
+ const stack = new Error().stack;
278
289
  try {
279
290
  return await this.contract
280
291
  .getFunction("burnFrom(address,uint256)")
281
292
  .staticCall(account, amount, overrides || {});
282
293
  } catch (e) {
283
- throw transformEtherError(e, undefined);
294
+ throw transformEtherError(e, undefined, stack);
284
295
  }
285
296
  },
286
297
  async decreaseAllowance(
@@ -288,12 +299,13 @@ export class ERC20ContractView extends ContractView<ERC20> {
288
299
  subtractedValue: BigNumberish,
289
300
  overrides?: Overrides
290
301
  ): Promise<boolean> {
302
+ const stack = new Error().stack;
291
303
  try {
292
304
  return await this.contract
293
305
  .getFunction("decreaseAllowance(address,uint256)")
294
306
  .staticCall(spender, subtractedValue, overrides || {});
295
307
  } catch (e) {
296
- throw transformEtherError(e, undefined);
308
+ throw transformEtherError(e, undefined, stack);
297
309
  }
298
310
  },
299
311
  async increaseAllowance(
@@ -301,30 +313,33 @@ export class ERC20ContractView extends ContractView<ERC20> {
301
313
  addedValue: BigNumberish,
302
314
  overrides?: Overrides
303
315
  ): Promise<boolean> {
316
+ const stack = new Error().stack;
304
317
  try {
305
318
  return await this.contract
306
319
  .getFunction("increaseAllowance(address,uint256)")
307
320
  .staticCall(spender, addedValue, overrides || {});
308
321
  } catch (e) {
309
- throw transformEtherError(e, undefined);
322
+ throw transformEtherError(e, undefined, stack);
310
323
  }
311
324
  },
312
325
  async renounceOwnership(overrides?: Overrides): Promise<void> {
326
+ const stack = new Error().stack;
313
327
  try {
314
328
  return await this.contract
315
329
  .getFunction("renounceOwnership()")
316
330
  .staticCall(overrides || {});
317
331
  } catch (e) {
318
- throw transformEtherError(e, undefined);
332
+ throw transformEtherError(e, undefined, stack);
319
333
  }
320
334
  },
321
335
  async setLocker(_locker: string, overrides?: Overrides): Promise<void> {
336
+ const stack = new Error().stack;
322
337
  try {
323
338
  return await this.contract
324
339
  .getFunction("setLocker(address)")
325
340
  .staticCall(_locker, overrides || {});
326
341
  } catch (e) {
327
- throw transformEtherError(e, undefined);
342
+ throw transformEtherError(e, undefined, stack);
328
343
  }
329
344
  },
330
345
  async transfer(
@@ -332,12 +347,13 @@ export class ERC20ContractView extends ContractView<ERC20> {
332
347
  amount: BigNumberish,
333
348
  overrides?: Overrides
334
349
  ): Promise<boolean> {
350
+ const stack = new Error().stack;
335
351
  try {
336
352
  return await this.contract
337
353
  .getFunction("transfer(address,uint256)")
338
354
  .staticCall(recipient, amount, overrides || {});
339
355
  } catch (e) {
340
- throw transformEtherError(e, undefined);
356
+ throw transformEtherError(e, undefined, stack);
341
357
  }
342
358
  },
343
359
  async transferFrom(
@@ -346,24 +362,26 @@ export class ERC20ContractView extends ContractView<ERC20> {
346
362
  amount: BigNumberish,
347
363
  overrides?: Overrides
348
364
  ): Promise<boolean> {
365
+ const stack = new Error().stack;
349
366
  try {
350
367
  return await this.contract
351
368
  .getFunction("transferFrom(address,address,uint256)")
352
369
  .staticCall(sender, recipient, amount, overrides || {});
353
370
  } catch (e) {
354
- throw transformEtherError(e, undefined);
371
+ throw transformEtherError(e, undefined, stack);
355
372
  }
356
373
  },
357
374
  async transferOwnership(
358
375
  newOwner: string,
359
376
  overrides?: Overrides
360
377
  ): Promise<void> {
378
+ const stack = new Error().stack;
361
379
  try {
362
380
  return await this.contract
363
381
  .getFunction("transferOwnership(address)")
364
382
  .staticCall(newOwner, overrides || {});
365
383
  } catch (e) {
366
- throw transformEtherError(e, undefined);
384
+ throw transformEtherError(e, undefined, stack);
367
385
  }
368
386
  },
369
387
  };