@sentio/sdk 1.40.5 → 2.0.0-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 (240) hide show
  1. package/lib/builtin/eacaggregatorproxy/index.js +3 -16
  2. package/lib/builtin/eacaggregatorproxy/index.js.map +1 -1
  3. package/lib/builtin/eacaggregatorproxy/test-utils.d.ts +5 -5
  4. package/lib/builtin/eacaggregatorproxy/test-utils.js +8 -4
  5. package/lib/builtin/eacaggregatorproxy/test-utils.js.map +1 -1
  6. package/lib/builtin/erc1155/index.js +3 -16
  7. package/lib/builtin/erc1155/index.js.map +1 -1
  8. package/lib/builtin/erc1155/test-utils.d.ts +5 -5
  9. package/lib/builtin/erc1155/test-utils.js +8 -4
  10. package/lib/builtin/erc1155/test-utils.js.map +1 -1
  11. package/lib/builtin/erc20/index.js +3 -16
  12. package/lib/builtin/erc20/index.js.map +1 -1
  13. package/lib/builtin/erc20/test-utils.d.ts +4 -4
  14. package/lib/builtin/erc20/test-utils.js +6 -3
  15. package/lib/builtin/erc20/test-utils.js.map +1 -1
  16. package/lib/builtin/erc20bytes/index.js +3 -16
  17. package/lib/builtin/erc20bytes/index.js.map +1 -1
  18. package/lib/builtin/erc20bytes/test-utils.d.ts +3 -3
  19. package/lib/builtin/erc20bytes/test-utils.js +4 -2
  20. package/lib/builtin/erc20bytes/test-utils.js.map +1 -1
  21. package/lib/builtin/erc721/index.js +3 -16
  22. package/lib/builtin/erc721/index.js.map +1 -1
  23. package/lib/builtin/erc721/test-utils.d.ts +4 -4
  24. package/lib/builtin/erc721/test-utils.js +6 -3
  25. package/lib/builtin/erc721/test-utils.js.map +1 -1
  26. package/lib/builtin/index.js +5 -27
  27. package/lib/builtin/index.js.map +1 -1
  28. package/lib/builtin/internal/EACAggregatorProxy.d.ts +19 -430
  29. package/lib/builtin/internal/EACAggregatorProxy.js.map +1 -1
  30. package/lib/builtin/internal/ERC1155.d.ts +18 -161
  31. package/lib/builtin/internal/ERC1155.js.map +1 -1
  32. package/lib/builtin/internal/ERC20.d.ts +12 -279
  33. package/lib/builtin/internal/ERC20.js.map +1 -1
  34. package/lib/builtin/internal/ERC20Bytes.d.ts +11 -146
  35. package/lib/builtin/internal/ERC20Bytes.js.map +1 -1
  36. package/lib/builtin/internal/ERC721.d.ts +12 -222
  37. package/lib/builtin/internal/ERC721.js.map +1 -1
  38. package/lib/builtin/internal/WETH9.d.ts +16 -191
  39. package/lib/builtin/internal/WETH9.js.map +1 -1
  40. package/lib/builtin/internal/common.d.ts +3 -18
  41. package/lib/builtin/internal/common.js +6 -0
  42. package/lib/builtin/internal/common.js.map +1 -1
  43. package/lib/builtin/internal/eacaggregatorproxy_processor.d.ts +161 -168
  44. package/lib/builtin/internal/eacaggregatorproxy_processor.js +94 -288
  45. package/lib/builtin/internal/eacaggregatorproxy_processor.js.map +1 -1
  46. package/lib/builtin/internal/erc1155_processor.d.ts +45 -50
  47. package/lib/builtin/internal/erc1155_processor.js +68 -132
  48. package/lib/builtin/internal/erc1155_processor.js.map +1 -1
  49. package/lib/builtin/internal/erc20_processor.d.ts +59 -63
  50. package/lib/builtin/internal/erc20_processor.js +64 -155
  51. package/lib/builtin/internal/erc20_processor.js.map +1 -1
  52. package/lib/builtin/internal/erc20bytes_processor.d.ts +37 -40
  53. package/lib/builtin/internal/erc20bytes_processor.js +50 -118
  54. package/lib/builtin/internal/erc20bytes_processor.js.map +1 -1
  55. package/lib/builtin/internal/erc721_processor.d.ts +56 -60
  56. package/lib/builtin/internal/erc721_processor.js +66 -167
  57. package/lib/builtin/internal/erc721_processor.js.map +1 -1
  58. package/lib/builtin/internal/factories/EACAggregatorProxy__factory.d.ts +1 -2
  59. package/lib/builtin/internal/factories/EACAggregatorProxy__factory.js +1 -1
  60. package/lib/builtin/internal/factories/EACAggregatorProxy__factory.js.map +1 -1
  61. package/lib/builtin/internal/factories/ERC1155__factory.d.ts +1 -2
  62. package/lib/builtin/internal/factories/ERC1155__factory.js +1 -1
  63. package/lib/builtin/internal/factories/ERC1155__factory.js.map +1 -1
  64. package/lib/builtin/internal/factories/ERC20Bytes__factory.d.ts +1 -2
  65. package/lib/builtin/internal/factories/ERC20Bytes__factory.js +1 -1
  66. package/lib/builtin/internal/factories/ERC20Bytes__factory.js.map +1 -1
  67. package/lib/builtin/internal/factories/ERC20__factory.d.ts +1 -2
  68. package/lib/builtin/internal/factories/ERC20__factory.js +1 -1
  69. package/lib/builtin/internal/factories/ERC20__factory.js.map +1 -1
  70. package/lib/builtin/internal/factories/ERC721__factory.d.ts +1 -2
  71. package/lib/builtin/internal/factories/ERC721__factory.js +1 -1
  72. package/lib/builtin/internal/factories/ERC721__factory.js.map +1 -1
  73. package/lib/builtin/internal/factories/WETH9__factory.d.ts +1 -2
  74. package/lib/builtin/internal/factories/WETH9__factory.js +1 -1
  75. package/lib/builtin/internal/factories/WETH9__factory.js.map +1 -1
  76. package/lib/builtin/internal/index.js +2 -24
  77. package/lib/builtin/internal/index.js.map +1 -1
  78. package/lib/builtin/internal/weth9_processor.d.ts +44 -49
  79. package/lib/builtin/internal/weth9_processor.js +70 -144
  80. package/lib/builtin/internal/weth9_processor.js.map +1 -1
  81. package/lib/builtin/weth9/index.js +3 -16
  82. package/lib/builtin/weth9/index.js.map +1 -1
  83. package/lib/builtin/weth9/test-utils.d.ts +5 -5
  84. package/lib/builtin/weth9/test-utils.js +8 -4
  85. package/lib/builtin/weth9/test-utils.js.map +1 -1
  86. package/lib/core/big-decimal.d.ts +6 -0
  87. package/lib/core/big-decimal.js +6 -2
  88. package/lib/core/big-decimal.js.map +1 -1
  89. package/lib/core/bind-options.d.ts +1 -1
  90. package/lib/core/bind-options.js +2 -2
  91. package/lib/core/bind-options.js.map +1 -1
  92. package/lib/core/context.d.ts +8 -14
  93. package/lib/core/context.js +7 -6
  94. package/lib/core/context.js.map +1 -1
  95. package/lib/core/core-plugin.d.ts +1 -1
  96. package/lib/core/core-plugin.js +1 -1
  97. package/lib/core/core-plugin.js.map +1 -1
  98. package/lib/core/generic-processor.test.js.map +1 -1
  99. package/lib/core/index.d.ts +0 -5
  100. package/lib/core/index.js +1 -9
  101. package/lib/core/index.js.map +1 -1
  102. package/lib/core/numberish.d.ts +2 -3
  103. package/lib/core/numberish.js +35 -33
  104. package/lib/core/numberish.js.map +1 -1
  105. package/lib/core/numberish.test.js.map +1 -1
  106. package/lib/core/sui-plugin.d.ts +1 -1
  107. package/lib/core/sui-plugin.js +1 -1
  108. package/lib/core/sui-plugin.js.map +1 -1
  109. package/lib/error.js +2 -2
  110. package/lib/error.js.map +1 -1
  111. package/lib/eth/account-processor-state.d.ts +5 -0
  112. package/lib/eth/account-processor-state.js +9 -0
  113. package/lib/eth/account-processor-state.js.map +1 -0
  114. package/lib/{core → eth}/account-processor.d.ts +4 -8
  115. package/lib/{core → eth}/account-processor.js +33 -42
  116. package/lib/eth/account-processor.js.map +1 -0
  117. package/lib/{core → eth}/base-processor-template.d.ts +7 -8
  118. package/lib/{core → eth}/base-processor-template.js +3 -3
  119. package/lib/eth/base-processor-template.js.map +1 -0
  120. package/lib/{core → eth}/base-processor.d.ts +7 -7
  121. package/lib/{core → eth}/base-processor.js +13 -18
  122. package/lib/eth/base-processor.js.map +1 -0
  123. package/lib/{binds.d.ts → eth/binds.d.ts} +4 -3
  124. package/lib/{binds.js → eth/binds.js} +3 -3
  125. package/lib/eth/binds.js.map +1 -0
  126. package/lib/{core → eth}/eth-plugin.d.ts +2 -2
  127. package/lib/{core → eth}/eth-plugin.js +19 -13
  128. package/lib/eth/eth-plugin.js.map +1 -0
  129. package/lib/{core → eth}/generic-processor.d.ts +3 -3
  130. package/lib/{core → eth}/generic-processor.js +5 -5
  131. package/lib/eth/generic-processor.js.map +1 -0
  132. package/lib/eth/index.d.ts +6 -0
  133. package/lib/eth/index.js +15 -0
  134. package/lib/eth/index.js.map +1 -0
  135. package/lib/eth/provider.d.ts +4 -0
  136. package/lib/eth/provider.js +74 -0
  137. package/lib/eth/provider.js.map +1 -0
  138. package/lib/{core → eth}/trace.d.ts +2 -2
  139. package/lib/{core → eth}/trace.js +0 -0
  140. package/lib/eth/trace.js.map +1 -0
  141. package/lib/index.d.ts +2 -2
  142. package/lib/index.js +7 -23
  143. package/lib/index.js.map +1 -1
  144. package/lib/target-ethers-sentio/event-handler.d.ts +1 -0
  145. package/lib/target-ethers-sentio/event-handler.js +21 -5
  146. package/lib/target-ethers-sentio/event-handler.js.map +1 -1
  147. package/lib/target-ethers-sentio/file.js +59 -57
  148. package/lib/target-ethers-sentio/file.js.map +1 -1
  149. package/lib/target-ethers-sentio/functions-handler.js +7 -4
  150. package/lib/target-ethers-sentio/functions-handler.js.map +1 -1
  151. package/lib/target-ethers-sentio/index.d.ts +1 -1
  152. package/lib/target-ethers-sentio/index.js +3 -5
  153. package/lib/target-ethers-sentio/index.js.map +1 -1
  154. package/lib/target-ethers-sentio/view-function.js +15 -15
  155. package/lib/target-ethers-sentio/view-function.js.map +1 -1
  156. package/lib/testing/metric-utils.js +2 -2
  157. package/lib/testing/metric-utils.js.map +1 -1
  158. package/lib/testing/test-processor-server.d.ts +11 -11
  159. package/lib/testing/test-processor-server.js +7 -12
  160. package/lib/testing/test-processor-server.js.map +1 -1
  161. package/lib/testing/test-provider.js +1 -6
  162. package/lib/testing/test-provider.js.map +1 -1
  163. package/lib/utils/conversion.d.ts +2 -2
  164. package/lib/utils/conversion.js +12 -5
  165. package/lib/utils/conversion.js.map +1 -1
  166. package/lib/utils/dex-price.d.ts +1 -1
  167. package/lib/utils/dex-price.js +5 -6
  168. package/lib/utils/dex-price.js.map +1 -1
  169. package/lib/utils/dex-price.test.js.map +1 -1
  170. package/lib/utils/erc20.test.js.map +1 -1
  171. package/lib/utils/index.js +5 -27
  172. package/lib/utils/index.js.map +1 -1
  173. package/lib/utils/token.d.ts +2 -3
  174. package/lib/utils/token.js +5 -6
  175. package/lib/utils/token.js.map +1 -1
  176. package/lib/webpack.config.js +1 -1
  177. package/package.json +7 -13
  178. package/src/builtin/eacaggregatorproxy/test-utils.ts +13 -9
  179. package/src/builtin/erc1155/test-utils.ts +13 -9
  180. package/src/builtin/erc20/test-utils.ts +10 -7
  181. package/src/builtin/erc20bytes/test-utils.ts +7 -5
  182. package/src/builtin/erc721/test-utils.ts +10 -7
  183. package/src/builtin/internal/EACAggregatorProxy.ts +20 -815
  184. package/src/builtin/internal/ERC1155.ts +20 -483
  185. package/src/builtin/internal/ERC20.ts +15 -641
  186. package/src/builtin/internal/ERC20Bytes.ts +13 -357
  187. package/src/builtin/internal/ERC721.ts +15 -601
  188. package/src/builtin/internal/WETH9.ts +20 -439
  189. package/src/builtin/internal/common.ts +33 -33
  190. package/src/builtin/internal/eacaggregatorproxy_processor.ts +344 -425
  191. package/src/builtin/internal/erc1155_processor.ts +202 -209
  192. package/src/builtin/internal/erc20_processor.ts +191 -225
  193. package/src/builtin/internal/erc20bytes_processor.ts +136 -165
  194. package/src/builtin/internal/erc721_processor.ts +218 -242
  195. package/src/builtin/internal/factories/EACAggregatorProxy__factory.ts +2 -3
  196. package/src/builtin/internal/factories/ERC1155__factory.ts +2 -3
  197. package/src/builtin/internal/factories/ERC20Bytes__factory.ts +2 -3
  198. package/src/builtin/internal/factories/ERC20__factory.ts +2 -3
  199. package/src/builtin/internal/factories/ERC721__factory.ts +2 -3
  200. package/src/builtin/internal/factories/WETH9__factory.ts +2 -3
  201. package/src/builtin/internal/weth9_processor.ts +176 -208
  202. package/src/builtin/weth9/test-utils.ts +13 -9
  203. package/src/core/big-decimal.ts +11 -0
  204. package/src/core/bind-options.ts +2 -3
  205. package/src/core/context.ts +14 -13
  206. package/src/core/core-plugin.ts +1 -1
  207. package/src/core/index.ts +0 -6
  208. package/src/core/numberish.ts +39 -40
  209. package/src/core/sui-plugin.ts +1 -1
  210. package/src/error.ts +1 -1
  211. package/src/eth/account-processor-state.ts +6 -0
  212. package/src/{core → eth}/account-processor.ts +40 -50
  213. package/src/{core → eth}/base-processor-template.ts +11 -12
  214. package/src/{core → eth}/base-processor.ts +37 -31
  215. package/src/{binds.ts → eth/binds.ts} +6 -5
  216. package/src/{core → eth}/eth-plugin.ts +19 -12
  217. package/src/{core → eth}/generic-processor.ts +5 -5
  218. package/src/eth/index.ts +6 -0
  219. package/src/eth/provider.ts +82 -0
  220. package/src/{core → eth}/trace.ts +2 -3
  221. package/src/index.ts +2 -3
  222. package/src/target-ethers-sentio/event-handler.ts +22 -5
  223. package/src/target-ethers-sentio/file.ts +65 -65
  224. package/src/target-ethers-sentio/functions-handler.ts +8 -4
  225. package/src/target-ethers-sentio/index.ts +1 -1
  226. package/src/target-ethers-sentio/view-function.ts +17 -18
  227. package/src/testing/metric-utils.ts +2 -2
  228. package/src/testing/test-processor-server.ts +23 -24
  229. package/src/testing/test-provider.ts +2 -7
  230. package/src/utils/conversion.ts +12 -5
  231. package/src/utils/dex-price.ts +3 -3
  232. package/src/utils/token.ts +10 -11
  233. package/src/webpack.config.js +1 -1
  234. package/lib/binds.js.map +0 -1
  235. package/lib/core/account-processor.js.map +0 -1
  236. package/lib/core/base-processor-template.js.map +0 -1
  237. package/lib/core/base-processor.js.map +0 -1
  238. package/lib/core/eth-plugin.js.map +0 -1
  239. package/lib/core/generic-processor.js.map +0 -1
  240. package/lib/core/trace.js.map +0 -1
@@ -3,8 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
 
6
- import { Contract, Signer, utils } from "ethers";
7
- import type { Provider } from "@ethersproject/providers";
6
+ import { Contract, Signer, Provider, Interface } from "ethers";
8
7
  import type {
9
8
  EACAggregatorProxy,
10
9
  EACAggregatorProxyInterface,
@@ -523,7 +522,7 @@ const _abi = [
523
522
  export class EACAggregatorProxy__factory {
524
523
  static readonly abi = _abi;
525
524
  static createInterface(): EACAggregatorProxyInterface {
526
- return new utils.Interface(_abi) as EACAggregatorProxyInterface;
525
+ return new Interface(_abi) as EACAggregatorProxyInterface;
527
526
  }
528
527
  static connect(
529
528
  address: string,
@@ -3,8 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
 
6
- import { Contract, Signer, utils } from "ethers";
7
- import type { Provider } from "@ethersproject/providers";
6
+ import { Contract, Signer, Provider, Interface } from "ethers";
8
7
  import type { ERC1155, ERC1155Interface } from "../ERC1155";
9
8
 
10
9
  const _abi = [
@@ -325,7 +324,7 @@ const _abi = [
325
324
  export class ERC1155__factory {
326
325
  static readonly abi = _abi;
327
326
  static createInterface(): ERC1155Interface {
328
- return new utils.Interface(_abi) as ERC1155Interface;
327
+ return new Interface(_abi) as ERC1155Interface;
329
328
  }
330
329
  static connect(
331
330
  address: string,
@@ -3,8 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
 
6
- import { Contract, Signer, utils } from "ethers";
7
- import type { Provider } from "@ethersproject/providers";
6
+ import { Contract, Signer, Provider, Interface } from "ethers";
8
7
  import type { ERC20Bytes, ERC20BytesInterface } from "../ERC20Bytes";
9
8
 
10
9
  const _abi = [
@@ -247,7 +246,7 @@ const _abi = [
247
246
  export class ERC20Bytes__factory {
248
247
  static readonly abi = _abi;
249
248
  static createInterface(): ERC20BytesInterface {
250
- return new utils.Interface(_abi) as ERC20BytesInterface;
249
+ return new Interface(_abi) as ERC20BytesInterface;
251
250
  }
252
251
  static connect(
253
252
  address: string,
@@ -3,8 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
 
6
- import { Contract, Signer, utils } from "ethers";
7
- import type { Provider } from "@ethersproject/providers";
6
+ import { Contract, Signer, Provider, Interface } from "ethers";
8
7
  import type { ERC20, ERC20Interface } from "../ERC20";
9
8
 
10
9
  const _abi = [
@@ -397,7 +396,7 @@ const _abi = [
397
396
  export class ERC20__factory {
398
397
  static readonly abi = _abi;
399
398
  static createInterface(): ERC20Interface {
400
- return new utils.Interface(_abi) as ERC20Interface;
399
+ return new Interface(_abi) as ERC20Interface;
401
400
  }
402
401
  static connect(address: string, signerOrProvider: Signer | Provider): ERC20 {
403
402
  return new Contract(address, _abi, signerOrProvider) as ERC20;
@@ -3,8 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
 
6
- import { Contract, Signer, utils } from "ethers";
7
- import type { Provider } from "@ethersproject/providers";
6
+ import { Contract, Signer, Provider, Interface } from "ethers";
8
7
  import type { ERC721, ERC721Interface } from "../ERC721";
9
8
 
10
9
  const _abi = [
@@ -357,7 +356,7 @@ const _abi = [
357
356
  export class ERC721__factory {
358
357
  static readonly abi = _abi;
359
358
  static createInterface(): ERC721Interface {
360
- return new utils.Interface(_abi) as ERC721Interface;
359
+ return new Interface(_abi) as ERC721Interface;
361
360
  }
362
361
  static connect(address: string, signerOrProvider: Signer | Provider): ERC721 {
363
362
  return new Contract(address, _abi, signerOrProvider) as ERC721;
@@ -3,8 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
 
6
- import { Contract, Signer, utils } from "ethers";
7
- import type { Provider } from "@ethersproject/providers";
6
+ import { Contract, Signer, Provider, Interface } from "ethers";
8
7
  import type { WETH9, WETH9Interface } from "../WETH9";
9
8
 
10
9
  const _abi = [
@@ -290,7 +289,7 @@ const _abi = [
290
289
  export class WETH9__factory {
291
290
  static readonly abi = _abi;
292
291
  static createInterface(): WETH9Interface {
293
- return new utils.Interface(_abi) as WETH9Interface;
292
+ return new Interface(_abi) as WETH9Interface;
294
293
  }
295
294
  static connect(address: string, signerOrProvider: Signer | Provider): WETH9 {
296
295
  return new Contract(address, _abi, signerOrProvider) as WETH9;