@sentio/sdk 2.40.0 → 2.40.1-rc.2

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.
@@ -123,11 +123,11 @@ export class WETH9ContractView extends ContractView<WETH9> {
123
123
  if (preparedData?.ethCallResults && ethCallContext) {
124
124
  const iface = new Interface(["function name() view returns (string)"]);
125
125
  const calldata = iface.encodeFunctionData("name", []);
126
- const key = makeEthCallKey({
126
+ const ethCallKey = makeEthCallKey({
127
127
  context: ethCallContext,
128
128
  calldata,
129
129
  });
130
- const ret = preparedData.ethCallResults[key];
130
+ const ret = preparedData.ethCallResults[ethCallKey];
131
131
  if (ret) {
132
132
  const result = iface.decodeFunctionResult("name", ret).toArray();
133
133
  return result.length == 1 ? result[0] : result;
@@ -151,11 +151,11 @@ export class WETH9ContractView extends ContractView<WETH9> {
151
151
  "function totalSupply() view returns (uint256)",
152
152
  ]);
153
153
  const calldata = iface.encodeFunctionData("totalSupply", []);
154
- const key = makeEthCallKey({
154
+ const ethCallKey = makeEthCallKey({
155
155
  context: ethCallContext,
156
156
  calldata,
157
157
  });
158
- const ret = preparedData.ethCallResults[key];
158
+ const ret = preparedData.ethCallResults[ethCallKey];
159
159
  if (ret) {
160
160
  const result = iface
161
161
  .decodeFunctionResult("totalSupply", ret)
@@ -181,11 +181,11 @@ export class WETH9ContractView extends ContractView<WETH9> {
181
181
  "function decimals() view returns (uint8)",
182
182
  ]);
183
183
  const calldata = iface.encodeFunctionData("decimals", []);
184
- const key = makeEthCallKey({
184
+ const ethCallKey = makeEthCallKey({
185
185
  context: ethCallContext,
186
186
  calldata,
187
187
  });
188
- const ret = preparedData.ethCallResults[key];
188
+ const ret = preparedData.ethCallResults[ethCallKey];
189
189
  if (ret) {
190
190
  const result = iface.decodeFunctionResult("decimals", ret).toArray();
191
191
  return result.length == 1 ? result[0] : result;
@@ -210,11 +210,11 @@ export class WETH9ContractView extends ContractView<WETH9> {
210
210
  "function balanceOf(address) view returns (uint256)",
211
211
  ]);
212
212
  const calldata = iface.encodeFunctionData("balanceOf", [arg0]);
213
- const key = makeEthCallKey({
213
+ const ethCallKey = makeEthCallKey({
214
214
  context: ethCallContext,
215
215
  calldata,
216
216
  });
217
- const ret = preparedData.ethCallResults[key];
217
+ const ret = preparedData.ethCallResults[ethCallKey];
218
218
  if (ret) {
219
219
  const result = iface.decodeFunctionResult("balanceOf", ret).toArray();
220
220
  return result.length == 1 ? result[0] : result;
@@ -241,11 +241,11 @@ export class WETH9ContractView extends ContractView<WETH9> {
241
241
  "function symbol() view returns (string)",
242
242
  ]);
243
243
  const calldata = iface.encodeFunctionData("symbol", []);
244
- const key = makeEthCallKey({
244
+ const ethCallKey = makeEthCallKey({
245
245
  context: ethCallContext,
246
246
  calldata,
247
247
  });
248
- const ret = preparedData.ethCallResults[key];
248
+ const ret = preparedData.ethCallResults[ethCallKey];
249
249
  if (ret) {
250
250
  const result = iface.decodeFunctionResult("symbol", ret).toArray();
251
251
  return result.length == 1 ? result[0] : result;
@@ -271,11 +271,11 @@ export class WETH9ContractView extends ContractView<WETH9> {
271
271
  "function allowance(address,address) view returns (uint256)",
272
272
  ]);
273
273
  const calldata = iface.encodeFunctionData("allowance", [arg0, arg1]);
274
- const key = makeEthCallKey({
274
+ const ethCallKey = makeEthCallKey({
275
275
  context: ethCallContext,
276
276
  calldata,
277
277
  });
278
- const ret = preparedData.ethCallResults[key];
278
+ const ret = preparedData.ethCallResults[ethCallKey];
279
279
  if (ret) {
280
280
  const result = iface.decodeFunctionResult("allowance", ret).toArray();
281
281
  return result.length == 1 ? result[0] : result;
@@ -308,11 +308,11 @@ export class WETH9ContractView extends ContractView<WETH9> {
308
308
  "function approve(address,uint256) nonpayable returns (bool)",
309
309
  ]);
310
310
  const calldata = iface.encodeFunctionData("approve", [guy, wad]);
311
- const key = makeEthCallKey({
311
+ const ethCallKey = makeEthCallKey({
312
312
  context: ethCallContext,
313
313
  calldata,
314
314
  });
315
- const ret = preparedData.ethCallResults[key];
315
+ const ret = preparedData.ethCallResults[ethCallKey];
316
316
  if (ret) {
317
317
  const result = iface.decodeFunctionResult("approve", ret).toArray();
318
318
  return result.length == 1 ? result[0] : result;
@@ -344,11 +344,11 @@ export class WETH9ContractView extends ContractView<WETH9> {
344
344
  dst,
345
345
  wad,
346
346
  ]);
347
- const key = makeEthCallKey({
347
+ const ethCallKey = makeEthCallKey({
348
348
  context: ethCallContext,
349
349
  calldata,
350
350
  });
351
- const ret = preparedData.ethCallResults[key];
351
+ const ret = preparedData.ethCallResults[ethCallKey];
352
352
  if (ret) {
353
353
  const result = iface
354
354
  .decodeFunctionResult("transferFrom", ret)
@@ -376,11 +376,11 @@ export class WETH9ContractView extends ContractView<WETH9> {
376
376
  "function withdraw(uint256) nonpayable returns ()",
377
377
  ]);
378
378
  const calldata = iface.encodeFunctionData("withdraw", [wad]);
379
- const key = makeEthCallKey({
379
+ const ethCallKey = makeEthCallKey({
380
380
  context: ethCallContext,
381
381
  calldata,
382
382
  });
383
- const ret = preparedData.ethCallResults[key];
383
+ const ret = preparedData.ethCallResults[ethCallKey];
384
384
  if (ret) {
385
385
  const result = iface
386
386
  .decodeFunctionResult("withdraw", ret)
@@ -409,11 +409,11 @@ export class WETH9ContractView extends ContractView<WETH9> {
409
409
  "function transfer(address,uint256) nonpayable returns (bool)",
410
410
  ]);
411
411
  const calldata = iface.encodeFunctionData("transfer", [dst, wad]);
412
- const key = makeEthCallKey({
412
+ const ethCallKey = makeEthCallKey({
413
413
  context: ethCallContext,
414
414
  calldata,
415
415
  });
416
- const ret = preparedData.ethCallResults[key];
416
+ const ret = preparedData.ethCallResults[ethCallKey];
417
417
  if (ret) {
418
418
  const result = iface
419
419
  .decodeFunctionResult("transfer", ret)
@@ -440,11 +440,11 @@ export class WETH9ContractView extends ContractView<WETH9> {
440
440
  "function deposit() payable returns ()",
441
441
  ]);
442
442
  const calldata = iface.encodeFunctionData("deposit", []);
443
- const key = makeEthCallKey({
443
+ const ethCallKey = makeEthCallKey({
444
444
  context: ethCallContext,
445
445
  calldata,
446
446
  });
447
- const ret = preparedData.ethCallResults[key];
447
+ const ret = preparedData.ethCallResults[ethCallKey];
448
448
  if (ret) {
449
449
  const result = iface.decodeFunctionResult("deposit", ret).toArray();
450
450
  return result.length == 1 ? result[0] : result;
@@ -47,11 +47,11 @@ export function generateViewFunction(view: boolean, fn: FunctionDeclaration, inc
47
47
  fn.inputs.length > 0 ? fn.inputs.map((input, index) => input.name || `arg${index}`).join(',') + ',' : ''
48
48
  }]
49
49
  )
50
- const key = makeEthCallKey({
50
+ const ethCallKey = makeEthCallKey({
51
51
  context: ethCallContext,
52
52
  calldata
53
53
  })
54
- const ret = preparedData.ethCallResults[key]
54
+ const ret = preparedData.ethCallResults[ethCallKey]
55
55
  if (ret) {
56
56
  const result = iface.decodeFunctionResult("${fn.name}", ret).toArray()
57
57
  return result.length == 1? result[0]: result