@0xtorch/evm 0.0.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 (642) hide show
  1. package/README.md +15 -0
  2. package/dist/import/abis/erc1155.d.ts +245 -0
  3. package/dist/import/abis/erc1155.d.ts.map +1 -0
  4. package/dist/import/abis/erc20.d.ts +169 -0
  5. package/dist/import/abis/erc20.d.ts.map +1 -0
  6. package/dist/import/abis/erc721.d.ts +267 -0
  7. package/dist/import/abis/erc721.d.ts.map +1 -0
  8. package/dist/import/abis/index.d.ts +5 -0
  9. package/dist/import/abis/index.d.ts.map +1 -0
  10. package/dist/import/abis/weth.d.ts +214 -0
  11. package/dist/import/abis/weth.d.ts.map +1 -0
  12. package/dist/import/absoluteValue.d.mts +3 -0
  13. package/dist/import/absoluteValue.d.mts.map +1 -0
  14. package/dist/import/absoluteValue.d.ts +3 -0
  15. package/dist/import/absoluteValue.d.ts.map +1 -0
  16. package/dist/import/analyzer/analyze.d.ts +18 -0
  17. package/dist/import/analyzer/analyze.d.ts.map +1 -0
  18. package/dist/import/analyzer/analyzer.d.ts +4 -0
  19. package/dist/import/analyzer/analyzer.d.ts.map +1 -0
  20. package/dist/import/analyzer/axieMarketplace/analyze.d.ts +4 -0
  21. package/dist/import/analyzer/axieMarketplace/analyze.d.ts.map +1 -0
  22. package/dist/import/analyzer/axieMarketplace/index.d.ts +2 -0
  23. package/dist/import/analyzer/axieMarketplace/index.d.ts.map +1 -0
  24. package/dist/import/analyzer/createAccountActionByAction/addLiquidity.d.ts +59 -0
  25. package/dist/import/analyzer/createAccountActionByAction/addLiquidity.d.ts.map +1 -0
  26. package/dist/import/analyzer/createAccountActionByAction/atomicArbitrage.d.ts +59 -0
  27. package/dist/import/analyzer/createAccountActionByAction/atomicArbitrage.d.ts.map +1 -0
  28. package/dist/import/analyzer/createAccountActionByAction/bridgeFrom.d.ts +59 -0
  29. package/dist/import/analyzer/createAccountActionByAction/bridgeFrom.d.ts.map +1 -0
  30. package/dist/import/analyzer/createAccountActionByAction/bridgeTo.d.ts +59 -0
  31. package/dist/import/analyzer/createAccountActionByAction/bridgeTo.d.ts.map +1 -0
  32. package/dist/import/analyzer/createAccountActionByAction/buyNft.d.ts +59 -0
  33. package/dist/import/analyzer/createAccountActionByAction/buyNft.d.ts.map +1 -0
  34. package/dist/import/analyzer/createAccountActionByAction/createAccountActionByAction.d.ts +59 -0
  35. package/dist/import/analyzer/createAccountActionByAction/createAccountActionByAction.d.ts.map +1 -0
  36. package/dist/import/analyzer/createAccountActionByAction/deposit.d.ts +59 -0
  37. package/dist/import/analyzer/createAccountActionByAction/deposit.d.ts.map +1 -0
  38. package/dist/import/analyzer/createAccountActionByAction/depositWithBond.d.ts +59 -0
  39. package/dist/import/analyzer/createAccountActionByAction/depositWithBond.d.ts.map +1 -0
  40. package/dist/import/analyzer/createAccountActionByAction/freeMintNft.d.ts +53 -0
  41. package/dist/import/analyzer/createAccountActionByAction/freeMintNft.d.ts.map +1 -0
  42. package/dist/import/analyzer/createAccountActionByAction/index.d.ts +2 -0
  43. package/dist/import/analyzer/createAccountActionByAction/index.d.ts.map +1 -0
  44. package/dist/import/analyzer/createAccountActionByAction/removeLiquidity.d.ts +59 -0
  45. package/dist/import/analyzer/createAccountActionByAction/removeLiquidity.d.ts.map +1 -0
  46. package/dist/import/analyzer/createAccountActionByAction/spam.d.ts +59 -0
  47. package/dist/import/analyzer/createAccountActionByAction/spam.d.ts.map +1 -0
  48. package/dist/import/analyzer/createAccountActionByAction/trade.d.ts +59 -0
  49. package/dist/import/analyzer/createAccountActionByAction/trade.d.ts.map +1 -0
  50. package/dist/import/analyzer/createAccountActionByAction/transactionFee.d.ts +59 -0
  51. package/dist/import/analyzer/createAccountActionByAction/transactionFee.d.ts.map +1 -0
  52. package/dist/import/analyzer/createAccountActionByAction/transfer.d.ts +59 -0
  53. package/dist/import/analyzer/createAccountActionByAction/transfer.d.ts.map +1 -0
  54. package/dist/import/analyzer/createAccountActionByAction/withdraw.d.ts +59 -0
  55. package/dist/import/analyzer/createAccountActionByAction/withdraw.d.ts.map +1 -0
  56. package/dist/import/analyzer/createAccountActionByAction/withdrawWithBond.d.ts +59 -0
  57. package/dist/import/analyzer/createAccountActionByAction/withdrawWithBond.d.ts.map +1 -0
  58. package/dist/import/analyzer/gasFee/analyze.d.ts +4 -0
  59. package/dist/import/analyzer/gasFee/analyze.d.ts.map +1 -0
  60. package/dist/import/analyzer/gasFee/index.d.ts +2 -0
  61. package/dist/import/analyzer/gasFee/index.d.ts.map +1 -0
  62. package/dist/import/analyzer/index.d.ts +10 -0
  63. package/dist/import/analyzer/index.d.ts.map +1 -0
  64. package/dist/import/analyzer/json/analyze.d.ts +5 -0
  65. package/dist/import/analyzer/json/analyze.d.ts.map +1 -0
  66. package/dist/import/analyzer/json/generatorAnyLog.d.ts +55 -0
  67. package/dist/import/analyzer/json/generatorAnyLog.d.ts.map +1 -0
  68. package/dist/import/analyzer/json/generatorAnyTokenTransfer.d.ts +54 -0
  69. package/dist/import/analyzer/json/generatorAnyTokenTransfer.d.ts.map +1 -0
  70. package/dist/import/analyzer/json/generatorSpecificTokenTransfer.d.ts +55 -0
  71. package/dist/import/analyzer/json/generatorSpecificTokenTransfer.d.ts.map +1 -0
  72. package/dist/import/analyzer/json/index.d.ts +2 -0
  73. package/dist/import/analyzer/json/index.d.ts.map +1 -0
  74. package/dist/import/analyzer/json/types.d.ts +177 -0
  75. package/dist/import/analyzer/json/types.d.ts.map +1 -0
  76. package/dist/import/analyzer/seaport/analyze.d.ts +4 -0
  77. package/dist/import/analyzer/seaport/analyze.d.ts.map +1 -0
  78. package/dist/import/analyzer/seaport/index.d.ts +2 -0
  79. package/dist/import/analyzer/seaport/index.d.ts.map +1 -0
  80. package/dist/import/analyzer/seaport/orderFulfilled.d.ts +139 -0
  81. package/dist/import/analyzer/seaport/orderFulfilled.d.ts.map +1 -0
  82. package/dist/import/analyzer/spam/analyze.d.ts +4 -0
  83. package/dist/import/analyzer/spam/analyze.d.ts.map +1 -0
  84. package/dist/import/analyzer/spam/index.d.ts +2 -0
  85. package/dist/import/analyzer/spam/index.d.ts.map +1 -0
  86. package/dist/import/analyzer/swap/analyze.d.ts +4 -0
  87. package/dist/import/analyzer/swap/analyze.d.ts.map +1 -0
  88. package/dist/import/analyzer/swap/index.d.ts +2 -0
  89. package/dist/import/analyzer/swap/index.d.ts.map +1 -0
  90. package/dist/import/analyzer/swap/traderJoeLBPairSwap.d.ts +108 -0
  91. package/dist/import/analyzer/swap/traderJoeLBPairSwap.d.ts.map +1 -0
  92. package/dist/import/analyzer/swap/univ2PairSwap.d.ts +84 -0
  93. package/dist/import/analyzer/swap/univ2PairSwap.d.ts.map +1 -0
  94. package/dist/import/analyzer/swap/univ3PoolSwap.d.ts +96 -0
  95. package/dist/import/analyzer/swap/univ3PoolSwap.d.ts.map +1 -0
  96. package/dist/import/analyzer/swap/wrappedDeposit.d.ts +36 -0
  97. package/dist/import/analyzer/swap/wrappedDeposit.d.ts.map +1 -0
  98. package/dist/import/analyzer/swap/wrappedWithdrawal.d.ts +36 -0
  99. package/dist/import/analyzer/swap/wrappedWithdrawal.d.ts.map +1 -0
  100. package/dist/import/analyzer/transfer/analyze.d.ts +4 -0
  101. package/dist/import/analyzer/transfer/analyze.d.ts.map +1 -0
  102. package/dist/import/analyzer/transfer/index.d.ts +2 -0
  103. package/dist/import/analyzer/transfer/index.d.ts.map +1 -0
  104. package/dist/import/analyzer/types.d.ts +17 -0
  105. package/dist/import/analyzer/types.d.ts.map +1 -0
  106. package/dist/import/apps/index.d.ts +2 -0
  107. package/dist/import/apps/index.d.ts.map +1 -0
  108. package/dist/import/apps/types.d.ts +6 -0
  109. package/dist/import/apps/types.d.ts.map +1 -0
  110. package/dist/import/chains/definitions/arbitrumOne.d.ts +99 -0
  111. package/dist/import/chains/definitions/arbitrumOne.d.ts.map +1 -0
  112. package/dist/import/chains/definitions/astar.d.ts +64 -0
  113. package/dist/import/chains/definitions/astar.d.ts.map +1 -0
  114. package/dist/import/chains/definitions/avalancheC.d.ts +84 -0
  115. package/dist/import/chains/definitions/avalancheC.d.ts.map +1 -0
  116. package/dist/import/chains/definitions/base.d.ts +94 -0
  117. package/dist/import/chains/definitions/base.d.ts.map +1 -0
  118. package/dist/import/chains/definitions/bsc.d.ts +144 -0
  119. package/dist/import/chains/definitions/bsc.d.ts.map +1 -0
  120. package/dist/import/chains/definitions/defineChain.d.ts +3 -0
  121. package/dist/import/chains/definitions/defineChain.d.ts.map +1 -0
  122. package/dist/import/chains/definitions/ethereum.d.ts +129 -0
  123. package/dist/import/chains/definitions/ethereum.d.ts.map +1 -0
  124. package/dist/import/chains/definitions/fantom.d.ts +89 -0
  125. package/dist/import/chains/definitions/fantom.d.ts.map +1 -0
  126. package/dist/import/chains/definitions/index.d.ts +16 -0
  127. package/dist/import/chains/definitions/index.d.ts.map +1 -0
  128. package/dist/import/chains/definitions/linea.d.ts +69 -0
  129. package/dist/import/chains/definitions/linea.d.ts.map +1 -0
  130. package/dist/import/chains/definitions/mantle.d.ts +62 -0
  131. package/dist/import/chains/definitions/mantle.d.ts.map +1 -0
  132. package/dist/import/chains/definitions/metis.d.ts +52 -0
  133. package/dist/import/chains/definitions/metis.d.ts.map +1 -0
  134. package/dist/import/chains/definitions/moonbeam.d.ts +84 -0
  135. package/dist/import/chains/definitions/moonbeam.d.ts.map +1 -0
  136. package/dist/import/chains/definitions/moonriver.d.ts +64 -0
  137. package/dist/import/chains/definitions/moonriver.d.ts.map +1 -0
  138. package/dist/import/chains/definitions/optimism.d.ts +104 -0
  139. package/dist/import/chains/definitions/optimism.d.ts.map +1 -0
  140. package/dist/import/chains/definitions/polygonPos.d.ts +84 -0
  141. package/dist/import/chains/definitions/polygonPos.d.ts.map +1 -0
  142. package/dist/import/chains/definitions/ronin.d.ts +49 -0
  143. package/dist/import/chains/definitions/ronin.d.ts.map +1 -0
  144. package/dist/import/chains/externals/defillama/constants.d.ts +2 -0
  145. package/dist/import/chains/externals/defillama/constants.d.ts.map +1 -0
  146. package/dist/import/chains/externals/defillama/getBlockOfTimestamp.d.ts +10 -0
  147. package/dist/import/chains/externals/defillama/getBlockOfTimestamp.d.ts.map +1 -0
  148. package/dist/import/chains/externals/defillama/index.d.ts +2 -0
  149. package/dist/import/chains/externals/defillama/index.d.ts.map +1 -0
  150. package/dist/import/chains/externals/index.d.ts +2 -0
  151. package/dist/import/chains/externals/index.d.ts.map +1 -0
  152. package/dist/import/chains/index.d.ts +4 -0
  153. package/dist/import/chains/index.d.ts.map +1 -0
  154. package/dist/import/chains/types/chain.d.ts +22 -0
  155. package/dist/import/chains/types/chain.d.ts.map +1 -0
  156. package/dist/import/chains/types/index.d.ts +3 -0
  157. package/dist/import/chains/types/index.d.ts.map +1 -0
  158. package/dist/import/chains/types/rpc.d.ts +7 -0
  159. package/dist/import/chains/types/rpc.d.ts.map +1 -0
  160. package/dist/import/clients/definitions/defineClient.d.ts +3 -0
  161. package/dist/import/clients/definitions/defineClient.d.ts.map +1 -0
  162. package/dist/import/clients/definitions/index.d.ts +2 -0
  163. package/dist/import/clients/definitions/index.d.ts.map +1 -0
  164. package/dist/import/clients/definitions/viemClient.d.ts +59 -0
  165. package/dist/import/clients/definitions/viemClient.d.ts.map +1 -0
  166. package/dist/import/clients/externals/viem/estimateFeesPerGas.d.ts +13 -0
  167. package/dist/import/clients/externals/viem/estimateFeesPerGas.d.ts.map +1 -0
  168. package/dist/import/clients/externals/viem/getBalance.d.ts +15 -0
  169. package/dist/import/clients/externals/viem/getBalance.d.ts.map +1 -0
  170. package/dist/import/clients/externals/viem/getBlock.d.ts +14 -0
  171. package/dist/import/clients/externals/viem/getBlock.d.ts.map +1 -0
  172. package/dist/import/clients/externals/viem/getBlockNumber.d.ts +13 -0
  173. package/dist/import/clients/externals/viem/getBlockNumber.d.ts.map +1 -0
  174. package/dist/import/clients/externals/viem/getEventLogs.d.ts +19 -0
  175. package/dist/import/clients/externals/viem/getEventLogs.d.ts.map +1 -0
  176. package/dist/import/clients/externals/viem/getTransaction.d.ts +15 -0
  177. package/dist/import/clients/externals/viem/getTransaction.d.ts.map +1 -0
  178. package/dist/import/clients/externals/viem/getTransactionCount.d.ts +15 -0
  179. package/dist/import/clients/externals/viem/getTransactionCount.d.ts.map +1 -0
  180. package/dist/import/clients/externals/viem/getTransactionReceipt.d.ts +15 -0
  181. package/dist/import/clients/externals/viem/getTransactionReceipt.d.ts.map +1 -0
  182. package/dist/import/clients/externals/viem/index.d.ts +11 -0
  183. package/dist/import/clients/externals/viem/index.d.ts.map +1 -0
  184. package/dist/import/clients/externals/viem/middleware.d.ts +23 -0
  185. package/dist/import/clients/externals/viem/middleware.d.ts.map +1 -0
  186. package/dist/import/clients/externals/viem/multicall.d.ts +14 -0
  187. package/dist/import/clients/externals/viem/multicall.d.ts.map +1 -0
  188. package/dist/import/clients/externals/viem/readContract.d.ts +14 -0
  189. package/dist/import/clients/externals/viem/readContract.d.ts.map +1 -0
  190. package/dist/import/clients/index.d.ts +3 -0
  191. package/dist/import/clients/index.d.ts.map +1 -0
  192. package/dist/import/clients/types.d.ts +64 -0
  193. package/dist/import/clients/types.d.ts.map +1 -0
  194. package/dist/import/createBigDecimal.d.mts +6 -0
  195. package/dist/import/createBigDecimal.d.mts.map +1 -0
  196. package/dist/import/createBigDecimal.d.ts +3 -0
  197. package/dist/import/createBigDecimal.d.ts.map +1 -0
  198. package/dist/import/creates/createEvmAccount.d.ts +5 -0
  199. package/dist/import/creates/createEvmAccount.d.ts.map +1 -0
  200. package/dist/import/decoder/decode.d.ts +3 -0
  201. package/dist/import/decoder/decode.d.ts.map +1 -0
  202. package/dist/import/decoder/decoder.d.ts +3 -0
  203. package/dist/import/decoder/decoder.d.ts.map +1 -0
  204. package/dist/import/decoder/index.d.ts +6 -0
  205. package/dist/import/decoder/index.d.ts.map +1 -0
  206. package/dist/import/decoder/parseErc1155TransferSingleLogs.d.ts +4 -0
  207. package/dist/import/decoder/parseErc1155TransferSingleLogs.d.ts.map +1 -0
  208. package/dist/import/decoder/parseErc20TransferLogs.d.ts +8 -0
  209. package/dist/import/decoder/parseErc20TransferLogs.d.ts.map +1 -0
  210. package/dist/import/decoder/parseErc721TransferLogs.d.ts +8 -0
  211. package/dist/import/decoder/parseErc721TransferLogs.d.ts.map +1 -0
  212. package/dist/import/decoder/types.d.ts +16 -0
  213. package/dist/import/decoder/types.d.ts.map +1 -0
  214. package/dist/import/divide.d.mts +8 -0
  215. package/dist/import/divide.d.mts.map +1 -0
  216. package/dist/import/divide.d.ts +3 -0
  217. package/dist/import/divide.d.ts.map +1 -0
  218. package/dist/import/equals.d.mts +3 -0
  219. package/dist/import/equals.d.mts.map +1 -0
  220. package/dist/import/equals.d.ts +3 -0
  221. package/dist/import/equals.d.ts.map +1 -0
  222. package/dist/import/explorers/definitions/blockscout.d.ts +60 -0
  223. package/dist/import/explorers/definitions/blockscout.d.ts.map +1 -0
  224. package/dist/import/explorers/definitions/defineExplorer.d.ts +3 -0
  225. package/dist/import/explorers/definitions/defineExplorer.d.ts.map +1 -0
  226. package/dist/import/explorers/definitions/etherscan.d.ts +61 -0
  227. package/dist/import/explorers/definitions/etherscan.d.ts.map +1 -0
  228. package/dist/import/explorers/definitions/index.d.ts +5 -0
  229. package/dist/import/explorers/definitions/index.d.ts.map +1 -0
  230. package/dist/import/explorers/definitions/roninExplorer.d.ts +62 -0
  231. package/dist/import/explorers/definitions/roninExplorer.d.ts.map +1 -0
  232. package/dist/import/explorers/definitions/routescan.d.ts +19 -0
  233. package/dist/import/explorers/definitions/routescan.d.ts.map +1 -0
  234. package/dist/import/explorers/externals/blockscout/getBlockNumberOfTimestamp.d.ts +11 -0
  235. package/dist/import/explorers/externals/blockscout/getBlockNumberOfTimestamp.d.ts.map +1 -0
  236. package/dist/import/explorers/externals/blockscout/getContractByAddress.d.ts +30 -0
  237. package/dist/import/explorers/externals/blockscout/getContractByAddress.d.ts.map +1 -0
  238. package/dist/import/explorers/externals/blockscout/getInternalTransactionsByAddress.d.ts +62 -0
  239. package/dist/import/explorers/externals/blockscout/getInternalTransactionsByAddress.d.ts.map +1 -0
  240. package/dist/import/explorers/externals/blockscout/getInternalTransactionsByTransactionHash.d.ts +54 -0
  241. package/dist/import/explorers/externals/blockscout/getInternalTransactionsByTransactionHash.d.ts.map +1 -0
  242. package/dist/import/explorers/externals/blockscout/getNormalTransactionsByAddress.d.ts +77 -0
  243. package/dist/import/explorers/externals/blockscout/getNormalTransactionsByAddress.d.ts.map +1 -0
  244. package/dist/import/explorers/externals/blockscout/getTokenTransfersByAddress.d.ts +80 -0
  245. package/dist/import/explorers/externals/blockscout/getTokenTransfersByAddress.d.ts.map +1 -0
  246. package/dist/import/explorers/externals/blockscout/index.d.ts +7 -0
  247. package/dist/import/explorers/externals/blockscout/index.d.ts.map +1 -0
  248. package/dist/import/explorers/externals/blockscout/middleware.d.ts +7 -0
  249. package/dist/import/explorers/externals/blockscout/middleware.d.ts.map +1 -0
  250. package/dist/import/explorers/externals/etherscan/getBlockNumberOfTimestamp.d.ts +12 -0
  251. package/dist/import/explorers/externals/etherscan/getBlockNumberOfTimestamp.d.ts.map +1 -0
  252. package/dist/import/explorers/externals/etherscan/getContractByAddress.d.ts +55 -0
  253. package/dist/import/explorers/externals/etherscan/getContractByAddress.d.ts.map +1 -0
  254. package/dist/import/explorers/externals/etherscan/getErc1155TokenTransfersByAddress.d.ts +83 -0
  255. package/dist/import/explorers/externals/etherscan/getErc1155TokenTransfersByAddress.d.ts.map +1 -0
  256. package/dist/import/explorers/externals/etherscan/getErc20TokenTransfersByAddress.d.ts +81 -0
  257. package/dist/import/explorers/externals/etherscan/getErc20TokenTransfersByAddress.d.ts.map +1 -0
  258. package/dist/import/explorers/externals/etherscan/getErc721TokenTransfersByAddress.d.ts +81 -0
  259. package/dist/import/explorers/externals/etherscan/getErc721TokenTransfersByAddress.d.ts.map +1 -0
  260. package/dist/import/explorers/externals/etherscan/getInternalTransactionsByAddress.d.ts +62 -0
  261. package/dist/import/explorers/externals/etherscan/getInternalTransactionsByAddress.d.ts.map +1 -0
  262. package/dist/import/explorers/externals/etherscan/getInternalTransactionsByTransactionHash.d.ts +55 -0
  263. package/dist/import/explorers/externals/etherscan/getInternalTransactionsByTransactionHash.d.ts.map +1 -0
  264. package/dist/import/explorers/externals/etherscan/getNormalTransactionsByAddress.d.ts +84 -0
  265. package/dist/import/explorers/externals/etherscan/getNormalTransactionsByAddress.d.ts.map +1 -0
  266. package/dist/import/explorers/externals/etherscan/index.d.ts +9 -0
  267. package/dist/import/explorers/externals/etherscan/index.d.ts.map +1 -0
  268. package/dist/import/explorers/externals/etherscan/middleware.d.ts +7 -0
  269. package/dist/import/explorers/externals/etherscan/middleware.d.ts.map +1 -0
  270. package/dist/import/explorers/externals/roninExplorer/getInternalTransactionByHash.d.ts +57 -0
  271. package/dist/import/explorers/externals/roninExplorer/getInternalTransactionByHash.d.ts.map +1 -0
  272. package/dist/import/explorers/externals/roninExplorer/getNormalTransactionsByAddress.d.ts +70 -0
  273. package/dist/import/explorers/externals/roninExplorer/getNormalTransactionsByAddress.d.ts.map +1 -0
  274. package/dist/import/explorers/externals/roninExplorer/getTokenTransfersByAddress.d.ts +64 -0
  275. package/dist/import/explorers/externals/roninExplorer/getTokenTransfersByAddress.d.ts.map +1 -0
  276. package/dist/import/explorers/externals/roninExplorer/index.d.ts +4 -0
  277. package/dist/import/explorers/externals/roninExplorer/index.d.ts.map +1 -0
  278. package/dist/import/explorers/externals/roninExplorer/middleware.d.ts +5 -0
  279. package/dist/import/explorers/externals/roninExplorer/middleware.d.ts.map +1 -0
  280. package/dist/import/explorers/index.d.ts +3 -0
  281. package/dist/import/explorers/index.d.ts.map +1 -0
  282. package/dist/import/explorers/types.d.ts +43 -0
  283. package/dist/import/explorers/types.d.ts.map +1 -0
  284. package/dist/import/fix.d.mts +7 -0
  285. package/dist/import/fix.d.mts.map +1 -0
  286. package/dist/import/fix.d.ts +3 -0
  287. package/dist/import/fix.d.ts.map +1 -0
  288. package/dist/import/getAccountsTransactionFulls/getAccountsTransactionFulls.d.ts +15 -0
  289. package/dist/import/getAccountsTransactionFulls/getAccountsTransactionFulls.d.ts.map +1 -0
  290. package/dist/import/getAccountsTransactionFulls/getAccountsTransactionFullsCustom.d.ts +4 -0
  291. package/dist/import/getAccountsTransactionFulls/getAccountsTransactionFullsCustom.d.ts.map +1 -0
  292. package/dist/import/getAccountsTransactionFulls/getDecodedTransactionsPrices.d.ts +5 -0
  293. package/dist/import/getAccountsTransactionFulls/getDecodedTransactionsPrices.d.ts.map +1 -0
  294. package/dist/import/getAccountsTransactionFulls/getHashesAndInternalTxs.d.ts +8 -0
  295. package/dist/import/getAccountsTransactionFulls/getHashesAndInternalTxs.d.ts.map +1 -0
  296. package/dist/import/getAccountsTransactionFulls/getTransactionDetail.d.ts +5 -0
  297. package/dist/import/getAccountsTransactionFulls/getTransactionDetail.d.ts.map +1 -0
  298. package/dist/import/getAccountsTransactionFulls/getTransactionDetails.d.ts +5 -0
  299. package/dist/import/getAccountsTransactionFulls/getTransactionDetails.d.ts.map +1 -0
  300. package/dist/import/getAccountsTransactionFulls/getTransactionsApps.d.ts +8 -0
  301. package/dist/import/getAccountsTransactionFulls/getTransactionsApps.d.ts.map +1 -0
  302. package/dist/import/getAccountsTransactionFulls/index.d.ts +3 -0
  303. package/dist/import/getAccountsTransactionFulls/index.d.ts.map +1 -0
  304. package/dist/import/getAccountsTransactionFulls/types.d.ts +87 -0
  305. package/dist/import/getAccountsTransactionFulls/types.d.ts.map +1 -0
  306. package/dist/import/getAccountsTransactionFulls/withD.d.ts +4 -0
  307. package/dist/import/getAccountsTransactionFulls/withD.d.ts.map +1 -0
  308. package/dist/import/getAccountsTransactionFulls/withDA.d.ts +4 -0
  309. package/dist/import/getAccountsTransactionFulls/withDA.d.ts.map +1 -0
  310. package/dist/import/getAccountsTransactionFulls/withP.d.ts +4 -0
  311. package/dist/import/getAccountsTransactionFulls/withP.d.ts.map +1 -0
  312. package/dist/import/getAccountsTransactionFulls/withPD.d.ts +4 -0
  313. package/dist/import/getAccountsTransactionFulls/withPD.d.ts.map +1 -0
  314. package/dist/import/getAccountsTransactionFulls/withPDA.d.ts +4 -0
  315. package/dist/import/getAccountsTransactionFulls/withPDA.d.ts.map +1 -0
  316. package/dist/import/getAccountsTransactionFulls/withUndefined.d.ts +4 -0
  317. package/dist/import/getAccountsTransactionFulls/withUndefined.d.ts.map +1 -0
  318. package/dist/import/getTransactionFull/getTransactionDetail.d.ts +5 -0
  319. package/dist/import/getTransactionFull/getTransactionDetail.d.ts.map +1 -0
  320. package/dist/import/getTransactionFull/getTransactionFull.d.ts +11 -0
  321. package/dist/import/getTransactionFull/getTransactionFull.d.ts.map +1 -0
  322. package/dist/import/getTransactionFull/getTransactionFullCustom.d.ts +4 -0
  323. package/dist/import/getTransactionFull/getTransactionFullCustom.d.ts.map +1 -0
  324. package/dist/import/getTransactionFull/index.d.ts +3 -0
  325. package/dist/import/getTransactionFull/index.d.ts.map +1 -0
  326. package/dist/import/getTransactionFull/types.d.ts +63 -0
  327. package/dist/import/getTransactionFull/types.d.ts.map +1 -0
  328. package/dist/import/getTransactionFull/withD.d.ts +4 -0
  329. package/dist/import/getTransactionFull/withD.d.ts.map +1 -0
  330. package/dist/import/getTransactionFull/withDA.d.ts +4 -0
  331. package/dist/import/getTransactionFull/withDA.d.ts.map +1 -0
  332. package/dist/import/getTransactionFull/withP.d.ts +4 -0
  333. package/dist/import/getTransactionFull/withP.d.ts.map +1 -0
  334. package/dist/import/getTransactionFull/withPD.d.ts +4 -0
  335. package/dist/import/getTransactionFull/withPD.d.ts.map +1 -0
  336. package/dist/import/getTransactionFull/withPDA.d.ts +4 -0
  337. package/dist/import/getTransactionFull/withPDA.d.ts.map +1 -0
  338. package/dist/import/getTransactionFull/withUndefined.d.ts +4 -0
  339. package/dist/import/getTransactionFull/withUndefined.d.ts.map +1 -0
  340. package/dist/import/greaterThan.d.mts +3 -0
  341. package/dist/import/greaterThan.d.mts.map +1 -0
  342. package/dist/import/greaterThan.d.ts +3 -0
  343. package/dist/import/greaterThan.d.ts.map +1 -0
  344. package/dist/import/index.d.mts +15 -0
  345. package/dist/import/index.d.mts.map +1 -0
  346. package/dist/import/index.d.ts +11 -0
  347. package/dist/import/index.d.ts.map +1 -0
  348. package/dist/import/index.mjs +1 -0
  349. package/dist/import/minus.d.mts +3 -0
  350. package/dist/import/minus.d.mts.map +1 -0
  351. package/dist/import/minus.d.ts +3 -0
  352. package/dist/import/minus.d.ts.map +1 -0
  353. package/dist/import/plus.d.mts +3 -0
  354. package/dist/import/plus.d.mts.map +1 -0
  355. package/dist/import/plus.d.ts +3 -0
  356. package/dist/import/plus.d.ts.map +1 -0
  357. package/dist/import/removeTrailingZeros.d.mts +6 -0
  358. package/dist/import/removeTrailingZeros.d.mts.map +1 -0
  359. package/dist/import/removeTrailingZeros.d.ts +3 -0
  360. package/dist/import/removeTrailingZeros.d.ts.map +1 -0
  361. package/dist/import/times.d.ts +3 -0
  362. package/dist/import/times.d.ts.map +1 -0
  363. package/dist/import/toStringBigDecimal.d.mts +6 -0
  364. package/dist/import/toStringBigDecimal.d.mts.map +1 -0
  365. package/dist/import/toStringBigDecimal.d.ts +3 -0
  366. package/dist/import/toStringBigDecimal.d.ts.map +1 -0
  367. package/dist/import/type.d.mts +5 -0
  368. package/dist/import/type.d.mts.map +1 -0
  369. package/dist/import/type.d.ts +5 -0
  370. package/dist/import/type.d.ts.map +1 -0
  371. package/dist/import/types/erc1155.d.ts +16 -0
  372. package/dist/import/types/erc1155.d.ts.map +1 -0
  373. package/dist/import/types/erc20.d.ts +19 -0
  374. package/dist/import/types/erc20.d.ts.map +1 -0
  375. package/dist/import/types/erc721.d.ts +18 -0
  376. package/dist/import/types/erc721.d.ts.map +1 -0
  377. package/dist/import/types/evmAccount.d.ts +10 -0
  378. package/dist/import/types/evmAccount.d.ts.map +1 -0
  379. package/dist/import/types/hex.d.ts +5 -0
  380. package/dist/import/types/hex.d.ts.map +1 -0
  381. package/dist/import/types/index.d.ts +12 -0
  382. package/dist/import/types/index.d.ts.map +1 -0
  383. package/dist/import/types/input.d.ts +26 -0
  384. package/dist/import/types/input.d.ts.map +1 -0
  385. package/dist/import/types/internalTransaction.d.ts +18 -0
  386. package/dist/import/types/internalTransaction.d.ts.map +1 -0
  387. package/dist/import/types/log.d.ts +118 -0
  388. package/dist/import/types/log.d.ts.map +1 -0
  389. package/dist/import/types/transaction.d.ts +44 -0
  390. package/dist/import/types/transaction.d.ts.map +1 -0
  391. package/dist/import/utils/bigint.d.ts +3 -0
  392. package/dist/import/utils/bigint.d.ts.map +1 -0
  393. package/dist/import/utils/index.d.ts +4 -0
  394. package/dist/import/utils/index.d.ts.map +1 -0
  395. package/dist/import/utils/timeout.d.ts +2 -0
  396. package/dist/import/utils/timeout.d.ts.map +1 -0
  397. package/dist/import/utils/types.d.ts +12 -0
  398. package/dist/import/utils/types.d.ts.map +1 -0
  399. package/dist/require/absoluteValue.d.ts +3 -0
  400. package/dist/require/absoluteValue.d.ts.map +1 -0
  401. package/dist/require/createBigDecimal.d.ts +6 -0
  402. package/dist/require/createBigDecimal.d.ts.map +1 -0
  403. package/dist/require/divide.d.ts +2 -0
  404. package/dist/require/divide.d.ts.map +1 -0
  405. package/dist/require/equals.d.ts +3 -0
  406. package/dist/require/equals.d.ts.map +1 -0
  407. package/dist/require/fix.d.ts +7 -0
  408. package/dist/require/fix.d.ts.map +1 -0
  409. package/dist/require/greaterThan.d.ts +3 -0
  410. package/dist/require/greaterThan.d.ts.map +1 -0
  411. package/dist/require/index.cjs +46 -0
  412. package/dist/require/index.d.cts +2 -0
  413. package/dist/require/index.d.cts.map +1 -0
  414. package/dist/require/index.d.ts +11 -0
  415. package/dist/require/index.d.ts.map +1 -0
  416. package/dist/require/minus.d.ts +3 -0
  417. package/dist/require/minus.d.ts.map +1 -0
  418. package/dist/require/plus.d.ts +3 -0
  419. package/dist/require/plus.d.ts.map +1 -0
  420. package/dist/require/removeTrailingZeros.d.ts +6 -0
  421. package/dist/require/removeTrailingZeros.d.ts.map +1 -0
  422. package/dist/require/times.d.ts +8 -0
  423. package/dist/require/times.d.ts.map +1 -0
  424. package/dist/require/toStringBigDecimal.d.ts +6 -0
  425. package/dist/require/toStringBigDecimal.d.ts.map +1 -0
  426. package/dist/require/type.d.ts +5 -0
  427. package/dist/require/type.d.ts.map +1 -0
  428. package/package.json +85 -0
  429. package/src/abis/erc1155.ts +314 -0
  430. package/src/abis/erc20.ts +222 -0
  431. package/src/abis/erc721.ts +346 -0
  432. package/src/abis/index.ts +4 -0
  433. package/src/abis/weth.ts +153 -0
  434. package/src/analyzer/analyze.ts +85 -0
  435. package/src/analyzer/analyzer.ts +5 -0
  436. package/src/analyzer/axieMarketplace/analyze.ts +326 -0
  437. package/src/analyzer/axieMarketplace/index.ts +1 -0
  438. package/src/analyzer/createAccountActionByAction/addLiquidity.ts +60 -0
  439. package/src/analyzer/createAccountActionByAction/atomicArbitrage.ts +115 -0
  440. package/src/analyzer/createAccountActionByAction/bridgeFrom.ts +61 -0
  441. package/src/analyzer/createAccountActionByAction/bridgeTo.ts +61 -0
  442. package/src/analyzer/createAccountActionByAction/buyNft.ts +106 -0
  443. package/src/analyzer/createAccountActionByAction/createAccountActionByAction.ts +181 -0
  444. package/src/analyzer/createAccountActionByAction/deposit.ts +64 -0
  445. package/src/analyzer/createAccountActionByAction/depositWithBond.ts +60 -0
  446. package/src/analyzer/createAccountActionByAction/freeMintNft.ts +54 -0
  447. package/src/analyzer/createAccountActionByAction/index.ts +1 -0
  448. package/src/analyzer/createAccountActionByAction/removeLiquidity.ts +60 -0
  449. package/src/analyzer/createAccountActionByAction/spam.ts +79 -0
  450. package/src/analyzer/createAccountActionByAction/trade.ts +105 -0
  451. package/src/analyzer/createAccountActionByAction/transactionFee.ts +51 -0
  452. package/src/analyzer/createAccountActionByAction/transfer.ts +95 -0
  453. package/src/analyzer/createAccountActionByAction/withdraw.ts +61 -0
  454. package/src/analyzer/createAccountActionByAction/withdrawWithBond.ts +60 -0
  455. package/src/analyzer/gasFee/analyze.test.ts +6 -0
  456. package/src/analyzer/gasFee/analyze.ts +72 -0
  457. package/src/analyzer/gasFee/index.ts +1 -0
  458. package/src/analyzer/index.ts +9 -0
  459. package/src/analyzer/json/analyze.test.ts +1819 -0
  460. package/src/analyzer/json/analyze.ts +536 -0
  461. package/src/analyzer/json/generatorAnyLog.ts +207 -0
  462. package/src/analyzer/json/generatorAnyTokenTransfer.ts +118 -0
  463. package/src/analyzer/json/generatorSpecificTokenTransfer.ts +425 -0
  464. package/src/analyzer/json/index.ts +1 -0
  465. package/src/analyzer/json/types.ts +239 -0
  466. package/src/analyzer/seaport/analyze.test.ts +2323 -0
  467. package/src/analyzer/seaport/analyze.ts +917 -0
  468. package/src/analyzer/seaport/index.ts +1 -0
  469. package/src/analyzer/seaport/orderFulfilled.ts +131 -0
  470. package/src/analyzer/spam/analyze.ts +219 -0
  471. package/src/analyzer/spam/index.ts +1 -0
  472. package/src/analyzer/swap/analyze.test.ts +2401 -0
  473. package/src/analyzer/swap/analyze.ts +939 -0
  474. package/src/analyzer/swap/index.ts +1 -0
  475. package/src/analyzer/swap/traderJoeLBPairSwap.ts +92 -0
  476. package/src/analyzer/swap/univ2PairSwap.ts +77 -0
  477. package/src/analyzer/swap/univ3PoolSwap.ts +83 -0
  478. package/src/analyzer/swap/wrappedDeposit.ts +51 -0
  479. package/src/analyzer/swap/wrappedWithdrawal.ts +53 -0
  480. package/src/analyzer/tests.ts +2 -0
  481. package/src/analyzer/transfer/analyze.test.ts +6 -0
  482. package/src/analyzer/transfer/analyze.ts +209 -0
  483. package/src/analyzer/transfer/index.ts +1 -0
  484. package/src/analyzer/types.ts +44 -0
  485. package/src/apps/index.ts +1 -0
  486. package/src/apps/types.ts +10 -0
  487. package/src/chains/definitions/arbitrumOne.test.ts +50 -0
  488. package/src/chains/definitions/arbitrumOne.ts +133 -0
  489. package/src/chains/definitions/astar.test.ts +51 -0
  490. package/src/chains/definitions/astar.ts +93 -0
  491. package/src/chains/definitions/avalancheC.test.ts +50 -0
  492. package/src/chains/definitions/avalancheC.ts +115 -0
  493. package/src/chains/definitions/base.test.ts +50 -0
  494. package/src/chains/definitions/base.ts +125 -0
  495. package/src/chains/definitions/bsc.test.ts +50 -0
  496. package/src/chains/definitions/bsc.ts +182 -0
  497. package/src/chains/definitions/defineChain.ts +7 -0
  498. package/src/chains/definitions/ethereum.test.ts +50 -0
  499. package/src/chains/definitions/ethereum.ts +169 -0
  500. package/src/chains/definitions/fantom.test.ts +50 -0
  501. package/src/chains/definitions/fantom.ts +123 -0
  502. package/src/chains/definitions/index.ts +88 -0
  503. package/src/chains/definitions/linea.test.ts +50 -0
  504. package/src/chains/definitions/linea.ts +95 -0
  505. package/src/chains/definitions/mantle.test.ts +50 -0
  506. package/src/chains/definitions/mantle.ts +75 -0
  507. package/src/chains/definitions/metis.test.ts +50 -0
  508. package/src/chains/definitions/metis.ts +60 -0
  509. package/src/chains/definitions/moonbeam.test.ts +50 -0
  510. package/src/chains/definitions/moonbeam.ts +117 -0
  511. package/src/chains/definitions/moonriver.test.ts +50 -0
  512. package/src/chains/definitions/moonriver.ts +94 -0
  513. package/src/chains/definitions/optimism.test.ts +50 -0
  514. package/src/chains/definitions/optimism.ts +139 -0
  515. package/src/chains/definitions/polygonPos.test.ts +50 -0
  516. package/src/chains/definitions/polygonPos.ts +121 -0
  517. package/src/chains/definitions/ronin.test.ts +50 -0
  518. package/src/chains/definitions/ronin.ts +75 -0
  519. package/src/chains/definitions/tests.ts +2884 -0
  520. package/src/chains/externals/defillama/constants.ts +1 -0
  521. package/src/chains/externals/defillama/getBlockOfTimestamp.test.ts +12 -0
  522. package/src/chains/externals/defillama/getBlockOfTimestamp.ts +26 -0
  523. package/src/chains/externals/defillama/index.ts +1 -0
  524. package/src/chains/externals/index.ts +1 -0
  525. package/src/chains/index.ts +62 -0
  526. package/src/chains/types/chain.ts +22 -0
  527. package/src/chains/types/index.ts +2 -0
  528. package/src/chains/types/rpc.ts +6 -0
  529. package/src/clients/definitions/defineClient.ts +7 -0
  530. package/src/clients/definitions/index.ts +1 -0
  531. package/src/clients/definitions/viemClient.ts +86 -0
  532. package/src/clients/externals/viem/estimateFeesPerGas.ts +23 -0
  533. package/src/clients/externals/viem/getBalance.ts +25 -0
  534. package/src/clients/externals/viem/getBlock.ts +29 -0
  535. package/src/clients/externals/viem/getBlockNumber.ts +23 -0
  536. package/src/clients/externals/viem/getEventLogs.test.ts +22 -0
  537. package/src/clients/externals/viem/getEventLogs.ts +40 -0
  538. package/src/clients/externals/viem/getTransaction.ts +25 -0
  539. package/src/clients/externals/viem/getTransactionCount.ts +25 -0
  540. package/src/clients/externals/viem/getTransactionReceipt.ts +25 -0
  541. package/src/clients/externals/viem/index.ts +10 -0
  542. package/src/clients/externals/viem/middleware.ts +437 -0
  543. package/src/clients/externals/viem/multicall.test.ts +26 -0
  544. package/src/clients/externals/viem/multicall.ts +27 -0
  545. package/src/clients/externals/viem/readContract.test.ts +20 -0
  546. package/src/clients/externals/viem/readContract.ts +38 -0
  547. package/src/clients/externals/viem/tests.ts +957 -0
  548. package/src/clients/index.ts +2 -0
  549. package/src/clients/types.ts +113 -0
  550. package/src/creates/createEvmAccount.ts +12 -0
  551. package/src/decoder/decode.test.ts +324 -0
  552. package/src/decoder/decode.ts +716 -0
  553. package/src/decoder/decoder.ts +6 -0
  554. package/src/decoder/index.ts +5 -0
  555. package/src/decoder/parseErc1155TransferSingleLogs.ts +40 -0
  556. package/src/decoder/parseErc20TransferLogs.ts +35 -0
  557. package/src/decoder/parseErc721TransferLogs.ts +40 -0
  558. package/src/decoder/tests.ts +502 -0
  559. package/src/decoder/types.ts +21 -0
  560. package/src/explorers/definitions/blockscout.test.ts +124 -0
  561. package/src/explorers/definitions/blockscout.ts +205 -0
  562. package/src/explorers/definitions/defineExplorer.ts +7 -0
  563. package/src/explorers/definitions/etherscan.test.ts +123 -0
  564. package/src/explorers/definitions/etherscan.ts +279 -0
  565. package/src/explorers/definitions/index.ts +4 -0
  566. package/src/explorers/definitions/roninExplorer.ts +150 -0
  567. package/src/explorers/definitions/routescan.ts +57 -0
  568. package/src/explorers/externals/blockscout/getBlockNumberOfTimestamp.ts +67 -0
  569. package/src/explorers/externals/blockscout/getContractByAddress.ts +81 -0
  570. package/src/explorers/externals/blockscout/getInternalTransactionsByAddress.ts +120 -0
  571. package/src/explorers/externals/blockscout/getInternalTransactionsByTransactionHash.ts +87 -0
  572. package/src/explorers/externals/blockscout/getNormalTransactionsByAddress.ts +116 -0
  573. package/src/explorers/externals/blockscout/getTokenTransfersByAddress.ts +127 -0
  574. package/src/explorers/externals/blockscout/index.ts +6 -0
  575. package/src/explorers/externals/blockscout/middleware.ts +56 -0
  576. package/src/explorers/externals/defillama/getBlockNumberOfTimestamp.ts +28 -0
  577. package/src/explorers/externals/defillama/index.ts +1 -0
  578. package/src/explorers/externals/etherscan/getBlockNumberOfTimestamp.ts +66 -0
  579. package/src/explorers/externals/etherscan/getContractByAddress.ts +86 -0
  580. package/src/explorers/externals/etherscan/getErc1155TokenTransfersByAddress.ts +133 -0
  581. package/src/explorers/externals/etherscan/getErc20TokenTransfersByAddress.ts +125 -0
  582. package/src/explorers/externals/etherscan/getErc721TokenTransfersByAddress.ts +125 -0
  583. package/src/explorers/externals/etherscan/getInternalTransactionsByAddress.ts +117 -0
  584. package/src/explorers/externals/etherscan/getInternalTransactionsByTransactionHash.ts +91 -0
  585. package/src/explorers/externals/etherscan/getNormalTransactionsByAddress.ts +122 -0
  586. package/src/explorers/externals/etherscan/index.ts +8 -0
  587. package/src/explorers/externals/etherscan/middleware.ts +77 -0
  588. package/src/explorers/externals/roninExplorer/getInternalTransactionByHash.ts +80 -0
  589. package/src/explorers/externals/roninExplorer/getNormalTransactionsByAddress.ts +79 -0
  590. package/src/explorers/externals/roninExplorer/getTokenTransfersByAddress.ts +81 -0
  591. package/src/explorers/externals/roninExplorer/index.ts +3 -0
  592. package/src/explorers/externals/roninExplorer/middleware.ts +49 -0
  593. package/src/explorers/index.ts +7 -0
  594. package/src/explorers/types.ts +56 -0
  595. package/src/getAccountsTransactionFulls/getAccountsTransactionFulls.test.ts +22 -0
  596. package/src/getAccountsTransactionFulls/getAccountsTransactionFulls.ts +46 -0
  597. package/src/getAccountsTransactionFulls/getAccountsTransactionFullsCustom.ts +106 -0
  598. package/src/getAccountsTransactionFulls/getDecodedTransactionsPrices.ts +97 -0
  599. package/src/getAccountsTransactionFulls/getHashesAndInternalTxs.ts +65 -0
  600. package/src/getAccountsTransactionFulls/getTransactionDetail.ts +49 -0
  601. package/src/getAccountsTransactionFulls/getTransactionDetails.ts +39 -0
  602. package/src/getAccountsTransactionFulls/getTransactionsApps.ts +42 -0
  603. package/src/getAccountsTransactionFulls/index.ts +2 -0
  604. package/src/getAccountsTransactionFulls/types.ts +122 -0
  605. package/src/getAccountsTransactionFulls/withD.ts +80 -0
  606. package/src/getAccountsTransactionFulls/withDA.ts +112 -0
  607. package/src/getAccountsTransactionFulls/withP.ts +120 -0
  608. package/src/getAccountsTransactionFulls/withPD.ts +141 -0
  609. package/src/getAccountsTransactionFulls/withPDA.ts +167 -0
  610. package/src/getAccountsTransactionFulls/withUndefined.ts +88 -0
  611. package/src/getContractAbi.ts +15 -0
  612. package/src/getTransactionFull/getTransactionDetail.ts +47 -0
  613. package/src/getTransactionFull/getTransactionFull.test.ts +34 -0
  614. package/src/getTransactionFull/getTransactionFull.ts +30 -0
  615. package/src/getTransactionFull/getTransactionFullCustom.ts +91 -0
  616. package/src/getTransactionFull/index.ts +2 -0
  617. package/src/getTransactionFull/types.ts +98 -0
  618. package/src/getTransactionFull/withD.ts +57 -0
  619. package/src/getTransactionFull/withDA.ts +78 -0
  620. package/src/getTransactionFull/withP.ts +69 -0
  621. package/src/getTransactionFull/withPD.ts +119 -0
  622. package/src/getTransactionFull/withPDA.ts +147 -0
  623. package/src/getTransactionFull/withUndefined.ts +39 -0
  624. package/src/index.cts +1 -0
  625. package/src/index.mts +110 -0
  626. package/src/tests.ts +1 -0
  627. package/src/types/erc1155.ts +17 -0
  628. package/src/types/erc20.ts +22 -0
  629. package/src/types/erc721.ts +19 -0
  630. package/src/types/evmAccount.ts +12 -0
  631. package/src/types/hex.test.ts +10 -0
  632. package/src/types/hex.ts +9 -0
  633. package/src/types/index.ts +16 -0
  634. package/src/types/input.ts +27 -0
  635. package/src/types/internalTransaction.ts +19 -0
  636. package/src/types/log.ts +68 -0
  637. package/src/types/transaction.ts +78 -0
  638. package/src/utils/bigint.ts +5 -0
  639. package/src/utils/index.ts +3 -0
  640. package/src/utils/timeout.ts +5 -0
  641. package/src/utils/types.ts +12 -0
  642. package/tsconfig.json +28 -0
@@ -0,0 +1,1819 @@
1
+ /* eslint-disable unicorn/no-null */
2
+ import type { CryptoCurrencyPrice } from '@0xtorch/core'
3
+ import { describe, expect, it } from 'bun:test'
4
+ import { createAnalyzeByJsonRule } from '.'
5
+ import { createPolygonPosChain } from '../../chains'
6
+ import type { TransactionDecoded } from '../../types'
7
+
8
+ describe('createAnalyzeByJsonRule', () => {
9
+ it('137 (Polygon PoS) > 0x55b361a55e7a6147b9f4fe29568960162b77612d56a826e6a3405e0947650de3', async () => {
10
+ // https://polygonscan.com/tx/0xa1fff8f026be89090dc89698cd55e8794c1c433a8a7189e98d9706e1c0211266
11
+ // logsPattern: exact
12
+ // generators: specific-token-transfer
13
+ const chain = createPolygonPosChain('')
14
+ const transaction: TransactionDecoded<CryptoCurrencyPrice | undefined> = {
15
+ app: undefined,
16
+ blockHash:
17
+ '0x55b361a55e7a6147b9f4fe29568960162b77612d56a826e6a3405e0947650de3',
18
+ blockNumber: 37_622_540n,
19
+ from: '0x161619839ebbada5d3c279e1a79c50f7fc4274d6',
20
+ gas: 116_994n,
21
+ gasPrice: 53_915_174_165n,
22
+ maxFeePerGas: 67_183_268_848n,
23
+ maxPriorityFeePerGas: 30_000_000_000n,
24
+ hash: '0xa1fff8f026be89090dc89698cd55e8794c1c433a8a7189e98d9706e1c0211266',
25
+ input:
26
+ '0x0c01a2fd0000000000000000000000003d8c06e65ebf06a9d40f313a35353be06bd460380000000000000000000000000000000000000000000000000000000000018bb500000000000000000000000000000000000000000000000000000000000000c087a362c8ee173b99c559aa18d3ab3db9cc86483b890fea4bc7db6ad28f41bbd3658fdb3d00c75a17f3a87d1f5830f9b555a5928d19e036c500a8211786cfd913000000000000000000000000000000000000000000000000000000000000001b0000000000000000000000000000000000000000000000000000000000000015476974636f696e446f6e6174696f6e436f756e74310000000000000000000000',
27
+ nonce: 437,
28
+ to: '0x754e78bc0f7b487d304552810a5254497084970c',
29
+ transactionIndex: 35,
30
+ value: 0n,
31
+ type: 'eip1559',
32
+ accessList: [],
33
+ chainId: 137,
34
+ v: 1n,
35
+ r: '0x1d1bf8eb9ae59af118f9f4a361a3bef4fde04845f711693b3fc4fb17f930ced4',
36
+ s: '0x14508548158c2ef7b1b06ee2e5e23178a6d362c741adea04527d8b44783f64ac',
37
+ yParity: 1,
38
+ typeHex: '0x2',
39
+ contractAddress: null,
40
+ cumulativeGasUsed: 7_821_681n,
41
+ effectiveGasPrice: 53_915_174_165n,
42
+ gasUsed: 111_393n,
43
+ logs: [
44
+ {
45
+ type: 'decoded',
46
+ log: {
47
+ address: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
48
+ blockHash:
49
+ '0x55b361a55e7a6147b9f4fe29568960162b77612d56a826e6a3405e0947650de3',
50
+ blockNumber: 37_622_540n,
51
+ data: '0x0000000000000000000000000000000000000000000000000000000000018bb50000000000000000000000000000000000000000000000000000000000000001',
52
+ logIndex: 133,
53
+ transactionHash:
54
+ '0xa1fff8f026be89090dc89698cd55e8794c1c433a8a7189e98d9706e1c0211266',
55
+ transactionIndex: 35,
56
+ removed: false,
57
+ topics: [
58
+ '0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62',
59
+ '0x000000000000000000000000754e78bc0f7b487d304552810a5254497084970c',
60
+ '0x0000000000000000000000000000000000000000000000000000000000000000',
61
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
62
+ ],
63
+ eventName: 'TransferSingle',
64
+ args: [
65
+ {
66
+ indexed: true,
67
+ name: 'operator',
68
+ type: 'address',
69
+ value: '0x754e78bC0f7B487D304552810A5254497084970C',
70
+ },
71
+ {
72
+ indexed: true,
73
+ name: 'from',
74
+ type: 'address',
75
+ value: '0x0000000000000000000000000000000000000000',
76
+ },
77
+ {
78
+ indexed: true,
79
+ name: 'to',
80
+ type: 'address',
81
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
82
+ },
83
+ { indexed: false, name: 'id', type: 'uint256', value: 101_301n },
84
+ { indexed: false, name: 'value', type: 'uint256', value: 1n },
85
+ ],
86
+ type: 'DecodedLog',
87
+ },
88
+ source: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
89
+ },
90
+ {
91
+ type: 'decoded',
92
+ log: {
93
+ address: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
94
+ blockHash:
95
+ '0x55b361a55e7a6147b9f4fe29568960162b77612d56a826e6a3405e0947650de3',
96
+ blockNumber: 37_622_540n,
97
+ data: '0x0000000000000000000000000000000000000000000000000000000000018bb5',
98
+ logIndex: 134,
99
+ transactionHash:
100
+ '0xa1fff8f026be89090dc89698cd55e8794c1c433a8a7189e98d9706e1c0211266',
101
+ transactionIndex: 35,
102
+ removed: false,
103
+ topics: [
104
+ '0x1005698e1e4c39769b4d3f2e39e7331d2184323220b8d3860d5f888a7c58b817',
105
+ '0x000000000000000000000000754e78bc0f7b487d304552810a5254497084970c',
106
+ ],
107
+ eventName: 'LogGetQuestObject',
108
+ args: [
109
+ {
110
+ indexed: true,
111
+ name: 'sender',
112
+ type: 'address',
113
+ value: '0x754e78bC0f7B487D304552810A5254497084970C',
114
+ },
115
+ {
116
+ indexed: false,
117
+ name: 'tokenId',
118
+ type: 'uint256',
119
+ value: 101_301n,
120
+ },
121
+ ],
122
+ type: 'DecodedLog',
123
+ },
124
+ source: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
125
+ },
126
+ {
127
+ type: 'decoded',
128
+ log: {
129
+ address: '0x754e78bc0f7b487d304552810a5254497084970c',
130
+ blockHash:
131
+ '0x55b361a55e7a6147b9f4fe29568960162b77612d56a826e6a3405e0947650de3',
132
+ blockNumber: 37_622_540n,
133
+ data: '0x0000000000000000000000000000000000000000000000000000000000018bb5',
134
+ logIndex: 135,
135
+ transactionHash:
136
+ '0xa1fff8f026be89090dc89698cd55e8794c1c433a8a7189e98d9706e1c0211266',
137
+ transactionIndex: 35,
138
+ removed: false,
139
+ topics: [
140
+ '0xa7257a8b02d81b3fb6715b360a5b4f02dcdc4a4b36e79108b7738ee77706d8cb',
141
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
142
+ ],
143
+ eventName: 'LogClaimObject',
144
+ args: [
145
+ {
146
+ indexed: true,
147
+ name: 'sender',
148
+ type: 'address',
149
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
150
+ },
151
+ {
152
+ indexed: false,
153
+ name: 'tokenid',
154
+ type: 'uint256',
155
+ value: 101_301n,
156
+ },
157
+ ],
158
+ type: 'DecodedLog',
159
+ },
160
+ source: '0x0a5f67617f197eb134a53bca5a17c105599a691c',
161
+ },
162
+ {
163
+ type: 'decoded',
164
+ log: {
165
+ address: '0x0000000000000000000000000000000000001010',
166
+ blockHash:
167
+ '0x55b361a55e7a6147b9f4fe29568960162b77612d56a826e6a3405e0947650de3',
168
+ blockNumber: 37_622_540n,
169
+ data: '0x000000000000000000000000000000000000000000000000000bdf571ddd2c000000000000000000000000000000000000000000000000006b02ee17f5701ea3000000000000000000000000000000000000000000000316479271f95f2a09ad0000000000000000000000000000000000000000000000006af70ec0d792f2a3000000000000000000000000000000000000000000000316479e51507d0735ad',
170
+ logIndex: 136,
171
+ transactionHash:
172
+ '0xa1fff8f026be89090dc89698cd55e8794c1c433a8a7189e98d9706e1c0211266',
173
+ transactionIndex: 35,
174
+ removed: false,
175
+ topics: [
176
+ '0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63',
177
+ '0x0000000000000000000000000000000000000000000000000000000000001010',
178
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
179
+ '0x00000000000000000000000046a3a41bd932244dd08186e4c19f1a7e48cbcdf4',
180
+ ],
181
+ eventName: 'LogFeeTransfer',
182
+ args: [
183
+ {
184
+ indexed: true,
185
+ name: 'token',
186
+ type: 'address',
187
+ value: '0x0000000000000000000000000000000000001010',
188
+ },
189
+ {
190
+ indexed: true,
191
+ name: 'from',
192
+ type: 'address',
193
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
194
+ },
195
+ {
196
+ indexed: true,
197
+ name: 'to',
198
+ type: 'address',
199
+ value: '0x46a3A41bd932244Dd08186e4c19F1a7E48cbcDf4',
200
+ },
201
+ {
202
+ indexed: false,
203
+ name: 'amount',
204
+ type: 'uint256',
205
+ value: 3_341_790_000_000_000n,
206
+ },
207
+ {
208
+ indexed: false,
209
+ name: 'input1',
210
+ type: 'uint256',
211
+ value: 7_710_987_298_681_134_755n,
212
+ },
213
+ {
214
+ indexed: false,
215
+ name: 'input2',
216
+ type: 'uint256',
217
+ value: 14_578_085_128_069_695_801_773n,
218
+ },
219
+ {
220
+ indexed: false,
221
+ name: 'output1',
222
+ type: 'uint256',
223
+ value: 7_707_645_508_681_134_755n,
224
+ },
225
+ {
226
+ indexed: false,
227
+ name: 'output2',
228
+ type: 'uint256',
229
+ value: 14_578_088_469_859_695_801_773n,
230
+ },
231
+ ],
232
+ type: 'DecodedLog',
233
+ },
234
+ source: '0x0000000000000000000000000000000000001010',
235
+ },
236
+ ],
237
+ logsBloom:
238
+ '0x00000000000000000000000000000000000000000000000000000000000000004000000040000000020000000000000000008000000000000000020000002000000000008004400000000000000000800000800800000000000100000000000000000000020000000000000000040800000000000000000080000000000000000000000000000004000000400000000000400000000000000000000000000000200000000000800000000000000000000000000000000000000000000000004000000000800008000001800000000000000000000008004000100800000020000000000000000000000000000000000000000000000000002000080000100002',
239
+ status: 'success',
240
+ transactionHash:
241
+ '0xa1fff8f026be89090dc89698cd55e8794c1c433a8a7189e98d9706e1c0211266',
242
+ block: {
243
+ blobGasUsed: 0n,
244
+ excessBlobGas: 0n,
245
+ sealFields: [],
246
+ baseFeePerGas: 23_915_174_165n,
247
+ difficulty: 24n,
248
+ extraData:
249
+ '0xd682030083626f7288676f312e31392e34856c696e757800000000000000000008535dfce40b6bac139f4e18dc5fb1fadac26108239387ecfa9fb010ac0af77478ee5f1e4ccab4668a59679aeeb915d6cd8e1671815f32fbc562ef53cf73a59b00',
250
+ gasLimit: 27_822_572n,
251
+ gasUsed: 9_233_877n,
252
+ hash: '0x55b361a55e7a6147b9f4fe29568960162b77612d56a826e6a3405e0947650de3',
253
+ logsBloom:
254
+ '0xa3204401051036404405c86000003b300020090020f2801113024528c802b00346ae304a4026904763408152340200010124d2620802a82221000aba0024284030093023f116c6482086014d30682ac4c031e4288f1496255813c700860c2aa022126045369200a04000192801071d486804c0012892d269a5586a10205c0450a308a40445a8000e80882d48b442a810a0772da9171842040050c001518600442be885525503815002008000201a0391c245c50608a88a24900828601730a8c00002250b9700391a088db81053c98d4142750245906bac400030b95f01a46410109533fb0100c3880a0911c01340984bc4de091104aa4664240808530234088b',
255
+ miner: '0x0000000000000000000000000000000000000000',
256
+ mixHash:
257
+ '0x0000000000000000000000000000000000000000000000000000000000000000',
258
+ nonce: '0x0000000000000000',
259
+ number: 37_622_540n,
260
+ parentHash:
261
+ '0xde820e47b0a6cbaa4fec89f6a6b87b167e1da0d39f96db7cf21dcddce4636d5b',
262
+ receiptsRoot:
263
+ '0xa25e98a9ad94043efbee63004dcbfcc820e279c1ec0b53865b4392dc2d1dd17d',
264
+ sha3Uncles:
265
+ '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',
266
+ size: 40_588n,
267
+ stateRoot:
268
+ '0x5625e5c244af6bfcebafc47e5f32e0852ed3df30bafda87de0420bc575ef5d2d',
269
+ timestamp: 1_672_749_502n,
270
+ totalDifficulty: 600_157_053n,
271
+ transactions: [],
272
+ transactionsRoot:
273
+ '0xbbc7a3179c5ec6f8bee3006760def70577e872fc57e7c11c79337cfed6a4791f',
274
+ uncles: [],
275
+ },
276
+ internalTransactions: [],
277
+ function: {
278
+ name: 'claimQuestObject',
279
+ args: [
280
+ {
281
+ name: 'contractAddress',
282
+ type: 'address',
283
+ value: '0x3D8C06e65ebf06A9d40F313a35353be06BD46038',
284
+ },
285
+ { name: 'tokenId', type: 'uint256', value: 101_301n },
286
+ { name: 'condition', type: 'string', value: 'GitcoinDonationCount1' },
287
+ {
288
+ name: 'coupon',
289
+ type: 'tuple',
290
+ value: {
291
+ r: '0x87a362c8ee173b99c559aa18d3ab3db9cc86483b890fea4bc7db6ad28f41bbd3',
292
+ s: '0x658fdb3d00c75a17f3a87d1f5830f9b555a5928d19e036c500a8211786cfd913',
293
+ v: 27,
294
+ },
295
+ },
296
+ ],
297
+ },
298
+ erc20Transfers: [],
299
+ erc721Transfers: [],
300
+ erc1155Transfers: [
301
+ {
302
+ type: 'Erc1155Transfer',
303
+ logIndex: 133,
304
+ token: {
305
+ contractAddress: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
306
+ },
307
+ from: '0x0000000000000000000000000000000000000000',
308
+ to: '0x161619839ebbada5d3c279e1a79c50f7fc4274d6',
309
+ id: 101_301n,
310
+ value: 1n,
311
+ nft: {
312
+ type: 'Nft',
313
+ id: 'evm_137_0x3d8c06e65ebf06a9d40f313a35353be06bd46038_101301',
314
+ },
315
+ },
316
+ ],
317
+ nativeTokenPrice: {
318
+ cryptoCurrencyId: 'matic-network',
319
+ crypto: undefined,
320
+ fiatCurrencyId: 'usd',
321
+ price: { value: 779_950_891_982_566_016n, decimals: 18 },
322
+ timestamp: 1_672_750_931_000,
323
+ },
324
+ }
325
+ const analyze = createAnalyzeByJsonRule({
326
+ chainId: 137,
327
+ from: undefined,
328
+ to: ['0x754e78bc0f7b487d304552810a5254497084970c'],
329
+ value: undefined,
330
+ functionSignature: '0x0c01a2fd',
331
+ functionInterface: 'claimQuestObject(address, uint256, string, tuple)',
332
+ logsPatterns: [
333
+ {
334
+ matchType: 'exact',
335
+ items: [
336
+ {
337
+ signature:
338
+ '0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62',
339
+ indexedCount: 3,
340
+ args: [
341
+ {
342
+ type: 'to-lower-string-value',
343
+ index: 1,
344
+ value: '0x0000000000000000000000000000000000000000',
345
+ },
346
+ ],
347
+ },
348
+ {
349
+ signature:
350
+ '0x1005698e1e4c39769b4d3f2e39e7331d2184323220b8d3860d5f888a7c58b817',
351
+ indexedCount: 1,
352
+ args: undefined,
353
+ },
354
+ {
355
+ signature:
356
+ '0xa7257a8b02d81b3fb6715b360a5b4f02dcdc4a4b36e79108b7738ee77706d8cb',
357
+ indexedCount: 1,
358
+ args: undefined,
359
+ },
360
+ {
361
+ signature:
362
+ '0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63',
363
+ indexedCount: 3,
364
+ args: undefined,
365
+ },
366
+ ],
367
+ },
368
+ ],
369
+ internalsPatterns: undefined,
370
+ parameterMatchPatterns: undefined,
371
+ generators: [
372
+ {
373
+ type: 'specific-token-transfer',
374
+ action: 'free-mint-nft',
375
+ comment: undefined,
376
+ transfers: [
377
+ {
378
+ type: 'token-transfer',
379
+ token: 'erc1155',
380
+ transferIndex: 0,
381
+ target: 'to',
382
+ },
383
+ ],
384
+ },
385
+ ],
386
+ })
387
+ const result = await analyze({
388
+ chain,
389
+ transaction,
390
+ accountAddresses: ['0x161619839ebbada5d3c279e1a79c50f7fc4274d6'],
391
+ })
392
+ expect(result).toBeDefined()
393
+ })
394
+
395
+ it('137 (Polygon PoS) > 0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e', async () => {
396
+ // https://polygonscan.com/tx/0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e
397
+ // logsPattern: partial
398
+ // generators: any-token-transfer
399
+ const chain = createPolygonPosChain('')
400
+ const transaction: TransactionDecoded<CryptoCurrencyPrice | undefined> = {
401
+ app: undefined,
402
+ nativeTokenPrice: undefined,
403
+ blockHash:
404
+ '0x5495ca6987b830c41a0994a2706bf2cb5d6d242431792f5ac39d453097b280f8',
405
+ blockNumber: 37_622_619n,
406
+ from: '0x161619839ebbada5d3c279e1a79c50f7fc4274d6',
407
+ gas: 1_129_315n,
408
+ gasPrice: 45_008_384_688n,
409
+ maxFeePerGas: 49_821_436_944n,
410
+ maxPriorityFeePerGas: 30_000_000_000n,
411
+ hash: '0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e',
412
+ input:
413
+ '0xcef0ff60000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000006746872656566000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000000000000003d8c06e65ebf06a9d40f313a35353be06bd460380000000000000000000000003d8c06e65ebf06a9d40f313a35353be06bd460380000000000000000000000003d8c06e65ebf06a9d40f313a35353be06bd460380000000000000000000000003d8c06e65ebf06a9d40f313a35353be06bd460380000000000000000000000003d8c06e65ebf06a9d40f313a35353be06bd460380000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000001876a00000000000000000000000000000000000000000000000000000000000187d000000000000000000000000000000000000000000000000000000000000188fc00000000000000000000000000000000000000000000000000000000000188fd0000000000000000000000000000000000000000000000000000000000018bb5000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001',
414
+ nonce: 441,
415
+ to: '0xe8b6395d223c9d3d85e162f2cb2023bc9088a908',
416
+ transactionIndex: 63,
417
+ value: 0n,
418
+ type: 'eip1559',
419
+ accessList: [],
420
+ chainId: 137,
421
+ v: 0n,
422
+ r: '0x64c28580def8e4bec09067258974cd5675e087dd3c287b0d4de170f3ebc7146c',
423
+ s: '0x13470ea4c610452754693d2b32696f0d784f5fa28435f8aff150df700027d8d7',
424
+ yParity: 0,
425
+ typeHex: '0x2',
426
+ contractAddress: null,
427
+ cumulativeGasUsed: 14_954_595n,
428
+ effectiveGasPrice: 45_008_384_688n,
429
+ gasUsed: 1_088_227n,
430
+ logs: [
431
+ {
432
+ type: 'decoded',
433
+ log: {
434
+ address: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
435
+ blockHash:
436
+ '0x5495ca6987b830c41a0994a2706bf2cb5d6d242431792f5ac39d453097b280f8',
437
+ blockNumber: 37_622_619n,
438
+ data: '0x000000000000000000000000000000000000000000000000000000000001876a0000000000000000000000000000000000000000000000000000000000000001',
439
+ logIndex: 570,
440
+ transactionHash:
441
+ '0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e',
442
+ transactionIndex: 63,
443
+ removed: false,
444
+ topics: [
445
+ '0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62',
446
+ '0x000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a908',
447
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
448
+ '0x000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a908',
449
+ ],
450
+ eventName: 'TransferSingle',
451
+ args: [
452
+ {
453
+ indexed: true,
454
+ name: 'operator',
455
+ type: 'address',
456
+ value: '0xe8b6395d223C9D3D85e162f2cb2023bC9088a908',
457
+ },
458
+ {
459
+ indexed: true,
460
+ name: 'from',
461
+ type: 'address',
462
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
463
+ },
464
+ {
465
+ indexed: true,
466
+ name: 'to',
467
+ type: 'address',
468
+ value: '0xe8b6395d223C9D3D85e162f2cb2023bC9088a908',
469
+ },
470
+ { indexed: false, name: 'id', type: 'uint256', value: 100_202n },
471
+ { indexed: false, name: 'value', type: 'uint256', value: 1n },
472
+ ],
473
+ type: 'DecodedLog',
474
+ },
475
+ source: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
476
+ },
477
+ {
478
+ type: 'decoded',
479
+ log: {
480
+ address: '0xe8b6395d223c9d3d85e162f2cb2023bc9088a908',
481
+ blockHash:
482
+ '0x5495ca6987b830c41a0994a2706bf2cb5d6d242431792f5ac39d453097b280f8',
483
+ blockNumber: 37_622_619n,
484
+ data: '0x00000000000000000000000000000000000000000000000000000000000000800000000000000000000000003d8c06e65ebf06a9d40f313a35353be06bd46038000000000000000000000000000000000000000000000000000000000001876a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000067468726565660000000000000000000000000000000000000000000000000000',
485
+ logIndex: 571,
486
+ transactionHash:
487
+ '0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e',
488
+ transactionIndex: 63,
489
+ removed: false,
490
+ topics: [
491
+ '0x1f0203141ac020f145b95f3cbed883b1ee8fa74625a730a476135945f58dfafb',
492
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
493
+ ],
494
+ eventName: 'DepositSuccess',
495
+ args: [
496
+ {
497
+ indexed: true,
498
+ name: 'sender',
499
+ type: 'address',
500
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
501
+ },
502
+ { indexed: false, name: 'name', type: 'string', value: 'threef' },
503
+ {
504
+ indexed: false,
505
+ name: 'contractAddress',
506
+ type: 'address',
507
+ value: '0x3D8C06e65ebf06A9d40F313a35353be06BD46038',
508
+ },
509
+ {
510
+ indexed: false,
511
+ name: 'tokenId',
512
+ type: 'uint256',
513
+ value: 100_202n,
514
+ },
515
+ { indexed: false, name: 'amount', type: 'uint256', value: 1n },
516
+ ],
517
+ type: 'DecodedLog',
518
+ },
519
+ source: '0xacd22ce66be20adbc47abff85cfd2c32a479874a',
520
+ },
521
+ {
522
+ type: 'decoded',
523
+ log: {
524
+ address: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
525
+ blockHash:
526
+ '0x5495ca6987b830c41a0994a2706bf2cb5d6d242431792f5ac39d453097b280f8',
527
+ blockNumber: 37_622_619n,
528
+ data: '0x00000000000000000000000000000000000000000000000000000000000187d00000000000000000000000000000000000000000000000000000000000000001',
529
+ logIndex: 572,
530
+ transactionHash:
531
+ '0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e',
532
+ transactionIndex: 63,
533
+ removed: false,
534
+ topics: [
535
+ '0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62',
536
+ '0x000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a908',
537
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
538
+ '0x000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a908',
539
+ ],
540
+ eventName: 'TransferSingle',
541
+ args: [
542
+ {
543
+ indexed: true,
544
+ name: 'operator',
545
+ type: 'address',
546
+ value: '0xe8b6395d223C9D3D85e162f2cb2023bC9088a908',
547
+ },
548
+ {
549
+ indexed: true,
550
+ name: 'from',
551
+ type: 'address',
552
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
553
+ },
554
+ {
555
+ indexed: true,
556
+ name: 'to',
557
+ type: 'address',
558
+ value: '0xe8b6395d223C9D3D85e162f2cb2023bC9088a908',
559
+ },
560
+ { indexed: false, name: 'id', type: 'uint256', value: 100_304n },
561
+ { indexed: false, name: 'value', type: 'uint256', value: 1n },
562
+ ],
563
+ type: 'DecodedLog',
564
+ },
565
+ source: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
566
+ },
567
+ {
568
+ type: 'decoded',
569
+ log: {
570
+ address: '0xe8b6395d223c9d3d85e162f2cb2023bc9088a908',
571
+ blockHash:
572
+ '0x5495ca6987b830c41a0994a2706bf2cb5d6d242431792f5ac39d453097b280f8',
573
+ blockNumber: 37_622_619n,
574
+ data: '0x00000000000000000000000000000000000000000000000000000000000000800000000000000000000000003d8c06e65ebf06a9d40f313a35353be06bd4603800000000000000000000000000000000000000000000000000000000000187d0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000067468726565660000000000000000000000000000000000000000000000000000',
575
+ logIndex: 573,
576
+ transactionHash:
577
+ '0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e',
578
+ transactionIndex: 63,
579
+ removed: false,
580
+ topics: [
581
+ '0x1f0203141ac020f145b95f3cbed883b1ee8fa74625a730a476135945f58dfafb',
582
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
583
+ ],
584
+ eventName: 'DepositSuccess',
585
+ args: [
586
+ {
587
+ indexed: true,
588
+ name: 'sender',
589
+ type: 'address',
590
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
591
+ },
592
+ { indexed: false, name: 'name', type: 'string', value: 'threef' },
593
+ {
594
+ indexed: false,
595
+ name: 'contractAddress',
596
+ type: 'address',
597
+ value: '0x3D8C06e65ebf06A9d40F313a35353be06BD46038',
598
+ },
599
+ {
600
+ indexed: false,
601
+ name: 'tokenId',
602
+ type: 'uint256',
603
+ value: 100_304n,
604
+ },
605
+ { indexed: false, name: 'amount', type: 'uint256', value: 1n },
606
+ ],
607
+ type: 'DecodedLog',
608
+ },
609
+ source: '0xacd22ce66be20adbc47abff85cfd2c32a479874a',
610
+ },
611
+ {
612
+ type: 'decoded',
613
+ log: {
614
+ address: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
615
+ blockHash:
616
+ '0x5495ca6987b830c41a0994a2706bf2cb5d6d242431792f5ac39d453097b280f8',
617
+ blockNumber: 37_622_619n,
618
+ data: '0x00000000000000000000000000000000000000000000000000000000000188fc0000000000000000000000000000000000000000000000000000000000000001',
619
+ logIndex: 574,
620
+ transactionHash:
621
+ '0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e',
622
+ transactionIndex: 63,
623
+ removed: false,
624
+ topics: [
625
+ '0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62',
626
+ '0x000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a908',
627
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
628
+ '0x000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a908',
629
+ ],
630
+ eventName: 'TransferSingle',
631
+ args: [
632
+ {
633
+ indexed: true,
634
+ name: 'operator',
635
+ type: 'address',
636
+ value: '0xe8b6395d223C9D3D85e162f2cb2023bC9088a908',
637
+ },
638
+ {
639
+ indexed: true,
640
+ name: 'from',
641
+ type: 'address',
642
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
643
+ },
644
+ {
645
+ indexed: true,
646
+ name: 'to',
647
+ type: 'address',
648
+ value: '0xe8b6395d223C9D3D85e162f2cb2023bC9088a908',
649
+ },
650
+ { indexed: false, name: 'id', type: 'uint256', value: 100_604n },
651
+ { indexed: false, name: 'value', type: 'uint256', value: 1n },
652
+ ],
653
+ type: 'DecodedLog',
654
+ },
655
+ source: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
656
+ },
657
+ {
658
+ type: 'decoded',
659
+ log: {
660
+ address: '0xe8b6395d223c9d3d85e162f2cb2023bc9088a908',
661
+ blockHash:
662
+ '0x5495ca6987b830c41a0994a2706bf2cb5d6d242431792f5ac39d453097b280f8',
663
+ blockNumber: 37_622_619n,
664
+ data: '0x00000000000000000000000000000000000000000000000000000000000000800000000000000000000000003d8c06e65ebf06a9d40f313a35353be06bd4603800000000000000000000000000000000000000000000000000000000000188fc000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000067468726565660000000000000000000000000000000000000000000000000000',
665
+ logIndex: 575,
666
+ transactionHash:
667
+ '0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e',
668
+ transactionIndex: 63,
669
+ removed: false,
670
+ topics: [
671
+ '0x1f0203141ac020f145b95f3cbed883b1ee8fa74625a730a476135945f58dfafb',
672
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
673
+ ],
674
+ eventName: 'DepositSuccess',
675
+ args: [
676
+ {
677
+ indexed: true,
678
+ name: 'sender',
679
+ type: 'address',
680
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
681
+ },
682
+ { indexed: false, name: 'name', type: 'string', value: 'threef' },
683
+ {
684
+ indexed: false,
685
+ name: 'contractAddress',
686
+ type: 'address',
687
+ value: '0x3D8C06e65ebf06A9d40F313a35353be06BD46038',
688
+ },
689
+ {
690
+ indexed: false,
691
+ name: 'tokenId',
692
+ type: 'uint256',
693
+ value: 100_604n,
694
+ },
695
+ { indexed: false, name: 'amount', type: 'uint256', value: 1n },
696
+ ],
697
+ type: 'DecodedLog',
698
+ },
699
+ source: '0xacd22ce66be20adbc47abff85cfd2c32a479874a',
700
+ },
701
+ {
702
+ type: 'decoded',
703
+ log: {
704
+ address: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
705
+ blockHash:
706
+ '0x5495ca6987b830c41a0994a2706bf2cb5d6d242431792f5ac39d453097b280f8',
707
+ blockNumber: 37_622_619n,
708
+ data: '0x00000000000000000000000000000000000000000000000000000000000188fd0000000000000000000000000000000000000000000000000000000000000001',
709
+ logIndex: 576,
710
+ transactionHash:
711
+ '0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e',
712
+ transactionIndex: 63,
713
+ removed: false,
714
+ topics: [
715
+ '0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62',
716
+ '0x000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a908',
717
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
718
+ '0x000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a908',
719
+ ],
720
+ eventName: 'TransferSingle',
721
+ args: [
722
+ {
723
+ indexed: true,
724
+ name: 'operator',
725
+ type: 'address',
726
+ value: '0xe8b6395d223C9D3D85e162f2cb2023bC9088a908',
727
+ },
728
+ {
729
+ indexed: true,
730
+ name: 'from',
731
+ type: 'address',
732
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
733
+ },
734
+ {
735
+ indexed: true,
736
+ name: 'to',
737
+ type: 'address',
738
+ value: '0xe8b6395d223C9D3D85e162f2cb2023bC9088a908',
739
+ },
740
+ { indexed: false, name: 'id', type: 'uint256', value: 100_605n },
741
+ { indexed: false, name: 'value', type: 'uint256', value: 1n },
742
+ ],
743
+ type: 'DecodedLog',
744
+ },
745
+ source: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
746
+ },
747
+ {
748
+ type: 'decoded',
749
+ log: {
750
+ address: '0xe8b6395d223c9d3d85e162f2cb2023bc9088a908',
751
+ blockHash:
752
+ '0x5495ca6987b830c41a0994a2706bf2cb5d6d242431792f5ac39d453097b280f8',
753
+ blockNumber: 37_622_619n,
754
+ data: '0x00000000000000000000000000000000000000000000000000000000000000800000000000000000000000003d8c06e65ebf06a9d40f313a35353be06bd4603800000000000000000000000000000000000000000000000000000000000188fd000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000067468726565660000000000000000000000000000000000000000000000000000',
755
+ logIndex: 577,
756
+ transactionHash:
757
+ '0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e',
758
+ transactionIndex: 63,
759
+ removed: false,
760
+ topics: [
761
+ '0x1f0203141ac020f145b95f3cbed883b1ee8fa74625a730a476135945f58dfafb',
762
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
763
+ ],
764
+ eventName: 'DepositSuccess',
765
+ args: [
766
+ {
767
+ indexed: true,
768
+ name: 'sender',
769
+ type: 'address',
770
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
771
+ },
772
+ { indexed: false, name: 'name', type: 'string', value: 'threef' },
773
+ {
774
+ indexed: false,
775
+ name: 'contractAddress',
776
+ type: 'address',
777
+ value: '0x3D8C06e65ebf06A9d40F313a35353be06BD46038',
778
+ },
779
+ {
780
+ indexed: false,
781
+ name: 'tokenId',
782
+ type: 'uint256',
783
+ value: 100_605n,
784
+ },
785
+ { indexed: false, name: 'amount', type: 'uint256', value: 1n },
786
+ ],
787
+ type: 'DecodedLog',
788
+ },
789
+ source: '0xacd22ce66be20adbc47abff85cfd2c32a479874a',
790
+ },
791
+ {
792
+ type: 'decoded',
793
+ log: {
794
+ address: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
795
+ blockHash:
796
+ '0x5495ca6987b830c41a0994a2706bf2cb5d6d242431792f5ac39d453097b280f8',
797
+ blockNumber: 37_622_619n,
798
+ data: '0x0000000000000000000000000000000000000000000000000000000000018bb50000000000000000000000000000000000000000000000000000000000000001',
799
+ logIndex: 578,
800
+ transactionHash:
801
+ '0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e',
802
+ transactionIndex: 63,
803
+ removed: false,
804
+ topics: [
805
+ '0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62',
806
+ '0x000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a908',
807
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
808
+ '0x000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a908',
809
+ ],
810
+ eventName: 'TransferSingle',
811
+ args: [
812
+ {
813
+ indexed: true,
814
+ name: 'operator',
815
+ type: 'address',
816
+ value: '0xe8b6395d223C9D3D85e162f2cb2023bC9088a908',
817
+ },
818
+ {
819
+ indexed: true,
820
+ name: 'from',
821
+ type: 'address',
822
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
823
+ },
824
+ {
825
+ indexed: true,
826
+ name: 'to',
827
+ type: 'address',
828
+ value: '0xe8b6395d223C9D3D85e162f2cb2023bC9088a908',
829
+ },
830
+ { indexed: false, name: 'id', type: 'uint256', value: 101_301n },
831
+ { indexed: false, name: 'value', type: 'uint256', value: 1n },
832
+ ],
833
+ type: 'DecodedLog',
834
+ },
835
+ source: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
836
+ },
837
+ {
838
+ type: 'decoded',
839
+ log: {
840
+ address: '0xe8b6395d223c9d3d85e162f2cb2023bc9088a908',
841
+ blockHash:
842
+ '0x5495ca6987b830c41a0994a2706bf2cb5d6d242431792f5ac39d453097b280f8',
843
+ blockNumber: 37_622_619n,
844
+ data: '0x00000000000000000000000000000000000000000000000000000000000000800000000000000000000000003d8c06e65ebf06a9d40f313a35353be06bd460380000000000000000000000000000000000000000000000000000000000018bb5000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000067468726565660000000000000000000000000000000000000000000000000000',
845
+ logIndex: 579,
846
+ transactionHash:
847
+ '0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e',
848
+ transactionIndex: 63,
849
+ removed: false,
850
+ topics: [
851
+ '0x1f0203141ac020f145b95f3cbed883b1ee8fa74625a730a476135945f58dfafb',
852
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
853
+ ],
854
+ eventName: 'DepositSuccess',
855
+ args: [
856
+ {
857
+ indexed: true,
858
+ name: 'sender',
859
+ type: 'address',
860
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
861
+ },
862
+ { indexed: false, name: 'name', type: 'string', value: 'threef' },
863
+ {
864
+ indexed: false,
865
+ name: 'contractAddress',
866
+ type: 'address',
867
+ value: '0x3D8C06e65ebf06A9d40F313a35353be06BD46038',
868
+ },
869
+ {
870
+ indexed: false,
871
+ name: 'tokenId',
872
+ type: 'uint256',
873
+ value: 101_301n,
874
+ },
875
+ { indexed: false, name: 'amount', type: 'uint256', value: 1n },
876
+ ],
877
+ type: 'DecodedLog',
878
+ },
879
+ source: '0xacd22ce66be20adbc47abff85cfd2c32a479874a',
880
+ },
881
+ {
882
+ type: 'decoded',
883
+ log: {
884
+ address: '0x0000000000000000000000000000000000001010',
885
+ blockHash:
886
+ '0x5495ca6987b830c41a0994a2706bf2cb5d6d242431792f5ac39d453097b280f8',
887
+ blockNumber: 37_622_619n,
888
+ data: '0x0000000000000000000000000000000000000000000000000073fc19c91984000000000000000000000000000000000000000000000000006ab5b0c58c0442170000000000000000000000000000000000000000000003fa4abf9a4b503483e00000000000000000000000000000000000000000000000006a41b4abc2eabe170000000000000000000000000000000000000000000003fa4b339665194e07e0',
889
+ logIndex: 580,
890
+ transactionHash:
891
+ '0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e',
892
+ transactionIndex: 63,
893
+ removed: false,
894
+ topics: [
895
+ '0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63',
896
+ '0x0000000000000000000000000000000000000000000000000000000000001010',
897
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
898
+ '0x000000000000000000000000f0245f6251bef9447a08766b9da2b07b28ad80b0',
899
+ ],
900
+ eventName: 'LogFeeTransfer',
901
+ args: [
902
+ {
903
+ indexed: true,
904
+ name: 'token',
905
+ type: 'address',
906
+ value: '0x0000000000000000000000000000000000001010',
907
+ },
908
+ {
909
+ indexed: true,
910
+ name: 'from',
911
+ type: 'address',
912
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
913
+ },
914
+ {
915
+ indexed: true,
916
+ name: 'to',
917
+ type: 'address',
918
+ value: '0xF0245F6251Bef9447A08766b9DA2B07b28aD80B0',
919
+ },
920
+ {
921
+ indexed: false,
922
+ name: 'amount',
923
+ type: 'uint256',
924
+ value: 32_646_810_000_000_000n,
925
+ },
926
+ {
927
+ indexed: false,
928
+ name: 'input1',
929
+ type: 'uint256',
930
+ value: 7_689_246_301_309_125_143n,
931
+ },
932
+ {
933
+ indexed: false,
934
+ name: 'input2',
935
+ type: 'uint256',
936
+ value: 18_784_171_660_363_940_791_264n,
937
+ },
938
+ {
939
+ indexed: false,
940
+ name: 'output1',
941
+ type: 'uint256',
942
+ value: 7_656_599_491_309_125_143n,
943
+ },
944
+ {
945
+ indexed: false,
946
+ name: 'output2',
947
+ type: 'uint256',
948
+ value: 18_784_204_307_173_940_791_264n,
949
+ },
950
+ ],
951
+ type: 'DecodedLog',
952
+ },
953
+ source: '0x0000000000000000000000000000000000001010',
954
+ },
955
+ ],
956
+ logsBloom:
957
+ '0x00000000000000000000000000000000000000000000000000000000004000000000000000008000000004000000000000008000000000008000020000002000000080000000400000000000000000800000000000001000000102000000000000000000000000000000000000000000000000000000000080000000000000000000000000100004000000000000000000400000000000000000000000080000200000000000000080000000004000000000000000000000000000000000004000000000000008002001000000000000000000000008000000100800000000000000000000000000000000000000000000000000000000000000080000100000',
958
+ status: 'success',
959
+ transactionHash:
960
+ '0x22e0f5c41dd3354160031cc01b254d053db2a60c2e48baeae99556021653dd4e',
961
+ block: {
962
+ blobGasUsed: 0n,
963
+ excessBlobGas: 0n,
964
+ sealFields: [],
965
+ baseFeePerGas: 15_008_384_688n,
966
+ difficulty: 24n,
967
+ extraData:
968
+ '0xd682021083626f7288676f312e31382e33856c696e7578000000000000000000e844167facf207014524b1f7301b2a6ddff563d8c764916c895c74176324871642e6e646813ecc95be515b550afebbd1f3b092c12f94e6306c66db43d1c54f8900',
969
+ gasLimit: 27_203_627n,
970
+ gasUsed: 18_035_676n,
971
+ hash: '0x5495ca6987b830c41a0994a2706bf2cb5d6d242431792f5ac39d453097b280f8',
972
+ logsBloom:
973
+ '0xb76dcdce68f45e7f9ef9f87af0ad7b2f281550fb2473879efc58e5fb7fc9681ff05b9d0adb61a6a31e495f95a7c4eed19723cc6df22ee73ff75ab35e70b62cbf0bfef679b6d7e07d258bbf9f816daae8f939aded47c4d67c482bbf1bf2fcbba56ada23a1733ffa70a3f47ffebfcc9975b62750a36cb2f6cbf77fefdc67595ffd229b95beffbbfbef6bfdc8e27f5f6956bd7b8cbd8916783f6ffbeb57caae5738ebc6feef3517db55e769e3e0ec5067cf7767d27f2f9ec990f93afcbe093d697ccbd99703877f5e8fbc1379c6a7f7f75dffd79513ef7fb77eb2f88b77d6eeee085d7f1efc79e8397fbeab4adb095a2f77f8d84dff778667c77de5fb378b9f3fbe',
974
+ miner: '0x0000000000000000000000000000000000000000',
975
+ mixHash:
976
+ '0x0000000000000000000000000000000000000000000000000000000000000000',
977
+ nonce: '0x0000000000000000',
978
+ number: 37_622_619n,
979
+ parentHash:
980
+ '0xdfe90ffe439f348590182c5acc54223b86011a1cdeafd2c83079947207811bca',
981
+ receiptsRoot:
982
+ '0xc103d04b62409428c3e8dac70dc163ed38ff395650057a3f90c6fea09ce15981',
983
+ sha3Uncles:
984
+ '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',
985
+ size: 88_539n,
986
+ stateRoot:
987
+ '0x453c90fa597a5eef28a06c7b9a87aa3e590a5aa363a3176b7fcf58c4e48a2f03',
988
+ timestamp: 1_672_749_664n,
989
+ totalDifficulty: 600_158_949n,
990
+ transactions: [],
991
+ transactionsRoot:
992
+ '0xc029f3b586aff316adb28d2f1c333c6ab2d0d5b51a39a2162a2803e2d29c2159',
993
+ uncles: [],
994
+ },
995
+ internalTransactions: [],
996
+ function: {
997
+ name: 'batchDepositObject',
998
+ args: [
999
+ { name: 'name', type: 'string', value: 'threef' },
1000
+ {
1001
+ name: 'contractAddresses',
1002
+ type: 'address[]',
1003
+ value: [
1004
+ '0x3D8C06e65ebf06A9d40F313a35353be06BD46038',
1005
+ '0x3D8C06e65ebf06A9d40F313a35353be06BD46038',
1006
+ '0x3D8C06e65ebf06A9d40F313a35353be06BD46038',
1007
+ '0x3D8C06e65ebf06A9d40F313a35353be06BD46038',
1008
+ '0x3D8C06e65ebf06A9d40F313a35353be06BD46038',
1009
+ ],
1010
+ },
1011
+ {
1012
+ name: 'tokenIds',
1013
+ type: 'uint256[]',
1014
+ value: ['100202', '100304', '100604', '100605', '101301'],
1015
+ },
1016
+ {
1017
+ name: 'amounts',
1018
+ type: 'uint256[]',
1019
+ value: ['1', '1', '1', '1', '1'],
1020
+ },
1021
+ ],
1022
+ },
1023
+ erc20Transfers: [],
1024
+ erc721Transfers: [],
1025
+ erc1155Transfers: [
1026
+ {
1027
+ type: 'Erc1155Transfer',
1028
+ logIndex: 570,
1029
+ token: {
1030
+ contractAddress: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
1031
+ },
1032
+ from: '0x161619839ebbada5d3c279e1a79c50f7fc4274d6',
1033
+ to: '0xe8b6395d223c9d3d85e162f2cb2023bc9088a908',
1034
+ id: 100_202n,
1035
+ value: 1n,
1036
+ nft: {
1037
+ type: 'Nft',
1038
+ id: 'evm_137_0x3d8c06e65ebf06a9d40f313a35353be06bd46038_100202',
1039
+ },
1040
+ },
1041
+ {
1042
+ type: 'Erc1155Transfer',
1043
+ logIndex: 572,
1044
+ token: {
1045
+ contractAddress: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
1046
+ },
1047
+ from: '0x161619839ebbada5d3c279e1a79c50f7fc4274d6',
1048
+ to: '0xe8b6395d223c9d3d85e162f2cb2023bc9088a908',
1049
+ id: 100_304n,
1050
+ value: 1n,
1051
+ nft: {
1052
+ type: 'Nft',
1053
+ id: 'evm_137_0x3d8c06e65ebf06a9d40f313a35353be06bd46038_100304',
1054
+ },
1055
+ },
1056
+ {
1057
+ type: 'Erc1155Transfer',
1058
+ logIndex: 574,
1059
+ token: {
1060
+ contractAddress: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
1061
+ },
1062
+ from: '0x161619839ebbada5d3c279e1a79c50f7fc4274d6',
1063
+ to: '0xe8b6395d223c9d3d85e162f2cb2023bc9088a908',
1064
+ id: 100_604n,
1065
+ value: 1n,
1066
+ nft: {
1067
+ type: 'Nft',
1068
+ id: 'evm_137_0x3d8c06e65ebf06a9d40f313a35353be06bd46038_100604',
1069
+ },
1070
+ },
1071
+ {
1072
+ type: 'Erc1155Transfer',
1073
+ logIndex: 576,
1074
+ token: {
1075
+ contractAddress: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
1076
+ },
1077
+ from: '0x161619839ebbada5d3c279e1a79c50f7fc4274d6',
1078
+ to: '0xe8b6395d223c9d3d85e162f2cb2023bc9088a908',
1079
+ id: 100_605n,
1080
+ value: 1n,
1081
+ nft: {
1082
+ type: 'Nft',
1083
+ id: 'evm_137_0x3d8c06e65ebf06a9d40f313a35353be06bd46038_100605',
1084
+ },
1085
+ },
1086
+ {
1087
+ type: 'Erc1155Transfer',
1088
+ logIndex: 578,
1089
+ token: {
1090
+ contractAddress: '0x3d8c06e65ebf06a9d40f313a35353be06bd46038',
1091
+ },
1092
+ from: '0x161619839ebbada5d3c279e1a79c50f7fc4274d6',
1093
+ to: '0xe8b6395d223c9d3d85e162f2cb2023bc9088a908',
1094
+ id: 101_301n,
1095
+ value: 1n,
1096
+ nft: {
1097
+ type: 'Nft',
1098
+ id: 'evm_137_0x3d8c06e65ebf06a9d40f313a35353be06bd46038_101301',
1099
+ },
1100
+ },
1101
+ ],
1102
+ }
1103
+ const analyze = createAnalyzeByJsonRule({
1104
+ chainId: 137,
1105
+ from: undefined,
1106
+ to: ['0xe8b6395d223c9d3d85e162f2cb2023bc9088a908'],
1107
+ value: undefined,
1108
+ functionSignature: '0xcef0ff60',
1109
+ functionInterface:
1110
+ 'batchDepositObject(string, address[], uint256[], uint256[])',
1111
+ logsPatterns: [
1112
+ {
1113
+ matchType: 'partial',
1114
+ signature:
1115
+ '0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62',
1116
+ indexedCount: 3,
1117
+ logCount: undefined,
1118
+ args: undefined,
1119
+ },
1120
+ ],
1121
+ internalsPatterns: undefined,
1122
+ parameterMatchPatterns: undefined,
1123
+ generators: [
1124
+ {
1125
+ type: 'any-token-transfer',
1126
+ token: 'erc1155',
1127
+ action: 'deposit',
1128
+ target: 'from',
1129
+ comment: undefined,
1130
+ },
1131
+ ],
1132
+ })
1133
+ const result = await analyze({
1134
+ chain,
1135
+ transaction,
1136
+ accountAddresses: ['0x161619839ebbada5d3c279e1a79c50f7fc4274d6'],
1137
+ })
1138
+ expect(result).toBeDefined()
1139
+ })
1140
+
1141
+ it('137 (Polygon PoS) > 0x18468f1bc0a94948941fbba66444437232698a2aae0cc2da305e31acee2075af', async () => {
1142
+ // https://polygonscan.com/tx/0x18468f1bc0a94948941fbba66444437232698a2aae0cc2da305e31acee2075af
1143
+ // value: plus
1144
+ // logsPattern: partial
1145
+ // parameterMatchPatterns: require
1146
+ const chain = createPolygonPosChain('')
1147
+ const transaction: TransactionDecoded<CryptoCurrencyPrice | undefined> = {
1148
+ app: undefined,
1149
+ nativeTokenPrice: undefined,
1150
+ blockHash:
1151
+ '0xe7685f80646a2d2eb7c3f8231776fad692330739b48cd77f5a392be3763d4826',
1152
+ blockNumber: 37_087_362n,
1153
+ from: '0x161619839ebbada5d3c279e1a79c50f7fc4274d6',
1154
+ gas: 287_667n,
1155
+ gasPrice: 90_042_497_029n,
1156
+ maxFeePerGas: 114_930_978_733n,
1157
+ maxPriorityFeePerGas: 30_000_000_000n,
1158
+ hash: '0x18468f1bc0a94948941fbba66444437232698a2aae0cc2da305e31acee2075af',
1159
+ input:
1160
+ '0xcab5c30e0000000000000000000000005e4a089e855083f937698a3cb917e274d680615c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000dfdd84f4fff7bbe1b9e90e9bdc342cf28e3a510000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000001060000000000000000000000000000000000000000000000000000000000001a7e',
1161
+ nonce: 420,
1162
+ to: '0x430dd9a4e7f4ad04e6c07eea27111e9e237ca334',
1163
+ transactionIndex: 32,
1164
+ value: 6_700_000_000_000_000_000n,
1165
+ type: 'eip1559',
1166
+ accessList: [],
1167
+ chainId: 137,
1168
+ v: 1n,
1169
+ r: '0x2ecde54ea3c2f742198fb5c7bbd35b4032eebd86fa50d79104838dc19e6787c6',
1170
+ s: '0x747d35e9c667525deea7772ba1503405d93273cebeb1a8babc4d8ede55df565',
1171
+ yParity: 1,
1172
+ typeHex: '0x2',
1173
+ transactionHash:
1174
+ '0x18468f1bc0a94948941fbba66444437232698a2aae0cc2da305e31acee2075af',
1175
+ logs: [
1176
+ {
1177
+ type: 'decoded',
1178
+ log: {
1179
+ address: '0x0000000000000000000000000000000000001010',
1180
+ blockHash:
1181
+ '0xe7685f80646a2d2eb7c3f8231776fad692330739b48cd77f5a392be3763d4826',
1182
+ blockNumber: 37_087_362n,
1183
+ data: '0x0000000000000000000000000000000000000000000000005cfb2e807b1e0000000000000000000000000000000000000000000000000000fd94643eb8f160250000000000000000000000000000000000000000000000002160fca81dc50000000000000000000000000000000000000000000000000000a09935be3dd360250000000000000000000000000000000000000000000000007e5c2b2898e30000',
1184
+ logIndex: 138,
1185
+ transactionHash:
1186
+ '0x18468f1bc0a94948941fbba66444437232698a2aae0cc2da305e31acee2075af',
1187
+ transactionIndex: 32,
1188
+ removed: false,
1189
+ topics: [
1190
+ '0xe6497e3ee548a3372136af2fcb0696db31fc6cf20260707645068bd3fe97f3c4',
1191
+ '0x0000000000000000000000000000000000000000000000000000000000001010',
1192
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
1193
+ '0x000000000000000000000000430dd9a4e7f4ad04e6c07eea27111e9e237ca334',
1194
+ ],
1195
+ eventName: 'LogTransfer',
1196
+ args: [
1197
+ {
1198
+ indexed: true,
1199
+ name: 'token',
1200
+ type: 'address',
1201
+ value: '0x0000000000000000000000000000000000001010',
1202
+ },
1203
+ {
1204
+ indexed: true,
1205
+ name: 'from',
1206
+ type: 'address',
1207
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
1208
+ },
1209
+ {
1210
+ indexed: true,
1211
+ name: 'to',
1212
+ type: 'address',
1213
+ value: '0x430DD9A4e7f4AD04e6C07eea27111E9E237ca334',
1214
+ },
1215
+ {
1216
+ indexed: false,
1217
+ name: 'amount',
1218
+ type: 'uint256',
1219
+ value: 6_700_000_000_000_000_000n,
1220
+ },
1221
+ {
1222
+ indexed: false,
1223
+ name: 'input1',
1224
+ type: 'uint256',
1225
+ value: 18_272_339_808_702_521_381n,
1226
+ },
1227
+ {
1228
+ indexed: false,
1229
+ name: 'input2',
1230
+ type: 'uint256',
1231
+ value: 2_405_200_000_000_000_000n,
1232
+ },
1233
+ {
1234
+ indexed: false,
1235
+ name: 'output1',
1236
+ type: 'uint256',
1237
+ value: 11_572_339_808_702_521_381n,
1238
+ },
1239
+ {
1240
+ indexed: false,
1241
+ name: 'output2',
1242
+ type: 'uint256',
1243
+ value: 9_105_200_000_000_000_000n,
1244
+ },
1245
+ ],
1246
+ type: 'DecodedLog',
1247
+ },
1248
+ source: '0x0000000000000000000000000000000000001010',
1249
+ },
1250
+ {
1251
+ type: 'decoded',
1252
+ log: {
1253
+ address: '0x0000000000000000000000000000000000001010',
1254
+ blockHash:
1255
+ '0xe7685f80646a2d2eb7c3f8231776fad692330739b48cd77f5a392be3763d4826',
1256
+ blockNumber: 37_087_362n,
1257
+ data: '0x0000000000000000000000000000000000000000000000005cfb2e807b1e00000000000000000000000000000000000000000000000000007e5c2b2898e3000000000000000000000000000000000000000000000000000081103cb9fb2200000000000000000000000000000000000000000000000000002160fca81dc50000000000000000000000000000000000000000000000000000de0b6b3a76400000',
1258
+ logIndex: 139,
1259
+ transactionHash:
1260
+ '0x18468f1bc0a94948941fbba66444437232698a2aae0cc2da305e31acee2075af',
1261
+ transactionIndex: 32,
1262
+ removed: false,
1263
+ topics: [
1264
+ '0xe6497e3ee548a3372136af2fcb0696db31fc6cf20260707645068bd3fe97f3c4',
1265
+ '0x0000000000000000000000000000000000000000000000000000000000001010',
1266
+ '0x000000000000000000000000430dd9a4e7f4ad04e6c07eea27111e9e237ca334',
1267
+ '0x0000000000000000000000005e4a089e855083f937698a3cb917e274d680615c',
1268
+ ],
1269
+ eventName: 'LogTransfer',
1270
+ args: [
1271
+ {
1272
+ indexed: true,
1273
+ name: 'token',
1274
+ type: 'address',
1275
+ value: '0x0000000000000000000000000000000000001010',
1276
+ },
1277
+ {
1278
+ indexed: true,
1279
+ name: 'from',
1280
+ type: 'address',
1281
+ value: '0x430DD9A4e7f4AD04e6C07eea27111E9E237ca334',
1282
+ },
1283
+ {
1284
+ indexed: true,
1285
+ name: 'to',
1286
+ type: 'address',
1287
+ value: '0x5E4a089e855083F937698a3cB917e274D680615C',
1288
+ },
1289
+ {
1290
+ indexed: false,
1291
+ name: 'amount',
1292
+ type: 'uint256',
1293
+ value: 6_700_000_000_000_000_000n,
1294
+ },
1295
+ {
1296
+ indexed: false,
1297
+ name: 'input1',
1298
+ type: 'uint256',
1299
+ value: 9_105_200_000_000_000_000n,
1300
+ },
1301
+ {
1302
+ indexed: false,
1303
+ name: 'input2',
1304
+ type: 'uint256',
1305
+ value: 9_300_000_000_000_000_000n,
1306
+ },
1307
+ {
1308
+ indexed: false,
1309
+ name: 'output1',
1310
+ type: 'uint256',
1311
+ value: 2_405_200_000_000_000_000n,
1312
+ },
1313
+ {
1314
+ indexed: false,
1315
+ name: 'output2',
1316
+ type: 'uint256',
1317
+ value: 16_000_000_000_000_000_000n,
1318
+ },
1319
+ ],
1320
+ type: 'DecodedLog',
1321
+ },
1322
+ source: '0x0000000000000000000000000000000000001010',
1323
+ },
1324
+ {
1325
+ type: 'decoded',
1326
+ log: {
1327
+ address: '0x48679e8b22648e8ca1177a7dd0dd51b841912cec',
1328
+ blockHash:
1329
+ '0xe7685f80646a2d2eb7c3f8231776fad692330739b48cd77f5a392be3763d4826',
1330
+ blockNumber: 37_087_362n,
1331
+ data: '0x',
1332
+ logIndex: 140,
1333
+ transactionHash:
1334
+ '0x18468f1bc0a94948941fbba66444437232698a2aae0cc2da305e31acee2075af',
1335
+ transactionIndex: 32,
1336
+ removed: false,
1337
+ topics: [
1338
+ '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925',
1339
+ '0x0000000000000000000000005e4a089e855083f937698a3cb917e274d680615c',
1340
+ '0x0000000000000000000000000000000000000000000000000000000000000000',
1341
+ '0x0000000000000000000000000000000000000000000000000000000000000106',
1342
+ ],
1343
+ eventName: 'Approval',
1344
+ args: [
1345
+ {
1346
+ indexed: true,
1347
+ name: 'owner',
1348
+ type: 'address',
1349
+ value: '0x5E4a089e855083F937698a3cB917e274D680615C',
1350
+ },
1351
+ {
1352
+ indexed: true,
1353
+ name: 'approved',
1354
+ type: 'address',
1355
+ value: '0x0000000000000000000000000000000000000000',
1356
+ },
1357
+ { indexed: true, name: 'tokenId', type: 'uint256', value: 262n },
1358
+ ],
1359
+ type: 'DecodedLog',
1360
+ },
1361
+ source: '0x48679e8b22648e8ca1177a7dd0dd51b841912cec',
1362
+ },
1363
+ {
1364
+ type: 'decoded',
1365
+ log: {
1366
+ address: '0x48679e8b22648e8ca1177a7dd0dd51b841912cec',
1367
+ blockHash:
1368
+ '0xe7685f80646a2d2eb7c3f8231776fad692330739b48cd77f5a392be3763d4826',
1369
+ blockNumber: 37_087_362n,
1370
+ data: '0x',
1371
+ logIndex: 141,
1372
+ transactionHash:
1373
+ '0x18468f1bc0a94948941fbba66444437232698a2aae0cc2da305e31acee2075af',
1374
+ transactionIndex: 32,
1375
+ removed: false,
1376
+ topics: [
1377
+ '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
1378
+ '0x0000000000000000000000005e4a089e855083f937698a3cb917e274d680615c',
1379
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
1380
+ '0x0000000000000000000000000000000000000000000000000000000000000106',
1381
+ ],
1382
+ eventName: 'Transfer',
1383
+ args: [
1384
+ {
1385
+ indexed: true,
1386
+ name: 'from',
1387
+ type: 'address',
1388
+ value: '0x5E4a089e855083F937698a3cB917e274D680615C',
1389
+ },
1390
+ {
1391
+ indexed: true,
1392
+ name: 'to',
1393
+ type: 'address',
1394
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
1395
+ },
1396
+ { indexed: true, name: 'tokenId', type: 'uint256', value: 262n },
1397
+ ],
1398
+ type: 'DecodedLog',
1399
+ },
1400
+ source: '0x48679e8b22648e8ca1177a7dd0dd51b841912cec',
1401
+ },
1402
+ {
1403
+ type: 'decoded',
1404
+ log: {
1405
+ address: '0x48679e8b22648e8ca1177a7dd0dd51b841912cec',
1406
+ blockHash:
1407
+ '0xe7685f80646a2d2eb7c3f8231776fad692330739b48cd77f5a392be3763d4826',
1408
+ blockNumber: 37_087_362n,
1409
+ data: '0x',
1410
+ logIndex: 142,
1411
+ transactionHash:
1412
+ '0x18468f1bc0a94948941fbba66444437232698a2aae0cc2da305e31acee2075af',
1413
+ transactionIndex: 32,
1414
+ removed: false,
1415
+ topics: [
1416
+ '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925',
1417
+ '0x0000000000000000000000005e4a089e855083f937698a3cb917e274d680615c',
1418
+ '0x0000000000000000000000000000000000000000000000000000000000000000',
1419
+ '0x0000000000000000000000000000000000000000000000000000000000001a7e',
1420
+ ],
1421
+ eventName: 'Approval',
1422
+ args: [
1423
+ {
1424
+ indexed: true,
1425
+ name: 'owner',
1426
+ type: 'address',
1427
+ value: '0x5E4a089e855083F937698a3cB917e274D680615C',
1428
+ },
1429
+ {
1430
+ indexed: true,
1431
+ name: 'approved',
1432
+ type: 'address',
1433
+ value: '0x0000000000000000000000000000000000000000',
1434
+ },
1435
+ {
1436
+ indexed: true,
1437
+ name: 'tokenId',
1438
+ type: 'uint256',
1439
+ value: 6782n,
1440
+ },
1441
+ ],
1442
+ type: 'DecodedLog',
1443
+ },
1444
+ source: '0x48679e8b22648e8ca1177a7dd0dd51b841912cec',
1445
+ },
1446
+ {
1447
+ type: 'decoded',
1448
+ log: {
1449
+ address: '0x48679e8b22648e8ca1177a7dd0dd51b841912cec',
1450
+ blockHash:
1451
+ '0xe7685f80646a2d2eb7c3f8231776fad692330739b48cd77f5a392be3763d4826',
1452
+ blockNumber: 37_087_362n,
1453
+ data: '0x',
1454
+ logIndex: 143,
1455
+ transactionHash:
1456
+ '0x18468f1bc0a94948941fbba66444437232698a2aae0cc2da305e31acee2075af',
1457
+ transactionIndex: 32,
1458
+ removed: false,
1459
+ topics: [
1460
+ '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
1461
+ '0x0000000000000000000000005e4a089e855083f937698a3cb917e274d680615c',
1462
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
1463
+ '0x0000000000000000000000000000000000000000000000000000000000001a7e',
1464
+ ],
1465
+ eventName: 'Transfer',
1466
+ args: [
1467
+ {
1468
+ indexed: true,
1469
+ name: 'from',
1470
+ type: 'address',
1471
+ value: '0x5E4a089e855083F937698a3cB917e274D680615C',
1472
+ },
1473
+ {
1474
+ indexed: true,
1475
+ name: 'to',
1476
+ type: 'address',
1477
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
1478
+ },
1479
+ {
1480
+ indexed: true,
1481
+ name: 'tokenId',
1482
+ type: 'uint256',
1483
+ value: 6782n,
1484
+ },
1485
+ ],
1486
+ type: 'DecodedLog',
1487
+ },
1488
+ source: '0x48679e8b22648e8ca1177a7dd0dd51b841912cec',
1489
+ },
1490
+ {
1491
+ type: 'decoded',
1492
+ log: {
1493
+ address: '0x430dd9a4e7f4ad04e6c07eea27111e9e237ca334',
1494
+ blockHash:
1495
+ '0xe7685f80646a2d2eb7c3f8231776fad692330739b48cd77f5a392be3763d4826',
1496
+ blockNumber: 37_087_362n,
1497
+ data: '0x00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000005cfb2e807b1e00000000000000000000000000000dfdd84f4fff7bbe1b9e90e9bdc342cf28e3a510000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000001060000000000000000000000000000000000000000000000000000000000001a7e',
1498
+ logIndex: 144,
1499
+ transactionHash:
1500
+ '0x18468f1bc0a94948941fbba66444437232698a2aae0cc2da305e31acee2075af',
1501
+ transactionIndex: 32,
1502
+ removed: false,
1503
+ topics: [
1504
+ '0x2611defd53a4a87419d2078554db30aeaddd9ddfdc5990da2bbdc8d589f5e4d6',
1505
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
1506
+ '0x0000000000000000000000005e4a089e855083f937698a3cb917e274d680615c',
1507
+ ],
1508
+ eventName: 'SwapFTforNFT',
1509
+ args: [
1510
+ {
1511
+ indexed: true,
1512
+ name: 'user',
1513
+ type: 'address',
1514
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
1515
+ },
1516
+ {
1517
+ indexed: true,
1518
+ name: 'pool',
1519
+ type: 'address',
1520
+ value: '0x5E4a089e855083F937698a3cB917e274D680615C',
1521
+ },
1522
+ {
1523
+ indexed: false,
1524
+ name: 'tokenIds',
1525
+ type: 'uint256[]',
1526
+ value: [262n, 6782n],
1527
+ },
1528
+ {
1529
+ indexed: false,
1530
+ name: 'totalFee',
1531
+ type: 'uint256',
1532
+ value: 6_700_000_000_000_000_000n,
1533
+ },
1534
+ {
1535
+ indexed: false,
1536
+ name: 'supporter',
1537
+ type: 'address',
1538
+ value: '0x0dfdd84f4fFF7BbE1b9E90E9bDc342cf28E3a510',
1539
+ },
1540
+ ],
1541
+ type: 'DecodedLog',
1542
+ },
1543
+ source: '0x430dd9a4e7f4ad04e6c07eea27111e9e237ca334',
1544
+ },
1545
+ {
1546
+ type: 'decoded',
1547
+ log: {
1548
+ address: '0x0000000000000000000000000000000000001010',
1549
+ blockHash:
1550
+ '0xe7685f80646a2d2eb7c3f8231776fad692330739b48cd77f5a392be3763d4826',
1551
+ blockNumber: 37_087_362n,
1552
+ data: '0x000000000000000000000000000000000000000000000000001b97251b5f4400000000000000000000000000000000000000000000000000fdf06a356cac3aa4000000000000000000000000000000000000000000004287cc4ad2f627d6e516000000000000000000000000000000000000000000000000fdd4d310514cf6a4000000000000000000000000000000000000000000004287cc666a1b43362916',
1553
+ logIndex: 145,
1554
+ transactionHash:
1555
+ '0x18468f1bc0a94948941fbba66444437232698a2aae0cc2da305e31acee2075af',
1556
+ transactionIndex: 32,
1557
+ removed: false,
1558
+ topics: [
1559
+ '0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63',
1560
+ '0x0000000000000000000000000000000000000000000000000000000000001010',
1561
+ '0x000000000000000000000000161619839ebbada5d3c279e1a79c50f7fc4274d6',
1562
+ '0x000000000000000000000000ef46d5fe753c988606e6f703260d816af53b03eb',
1563
+ ],
1564
+ eventName: 'LogFeeTransfer',
1565
+ args: [
1566
+ {
1567
+ indexed: true,
1568
+ name: 'token',
1569
+ type: 'address',
1570
+ value: '0x0000000000000000000000000000000000001010',
1571
+ },
1572
+ {
1573
+ indexed: true,
1574
+ name: 'from',
1575
+ type: 'address',
1576
+ value: '0x161619839EBbADa5d3C279E1A79C50F7fc4274D6',
1577
+ },
1578
+ {
1579
+ indexed: true,
1580
+ name: 'to',
1581
+ type: 'address',
1582
+ value: '0xef46D5fe753c988606E6F703260D816AF53B03EB',
1583
+ },
1584
+ {
1585
+ indexed: false,
1586
+ name: 'amount',
1587
+ type: 'uint256',
1588
+ value: 7_766_010_000_000_000n,
1589
+ },
1590
+ {
1591
+ indexed: false,
1592
+ name: 'input1',
1593
+ type: 'uint256',
1594
+ value: 18_298_242_063_695_362_724n,
1595
+ },
1596
+ {
1597
+ indexed: false,
1598
+ name: 'input2',
1599
+ type: 'uint256',
1600
+ value: 314_181_219_129_634_059_642_134n,
1601
+ },
1602
+ {
1603
+ indexed: false,
1604
+ name: 'output1',
1605
+ type: 'uint256',
1606
+ value: 18_290_476_053_695_362_724n,
1607
+ },
1608
+ {
1609
+ indexed: false,
1610
+ name: 'output2',
1611
+ type: 'uint256',
1612
+ value: 314_181_226_895_644_059_642_134n,
1613
+ },
1614
+ ],
1615
+ type: 'DecodedLog',
1616
+ },
1617
+ source: '0x0000000000000000000000000000000000001010',
1618
+ },
1619
+ ],
1620
+ contractAddress: null,
1621
+ effectiveGasPrice: 90_042_497_029n,
1622
+ cumulativeGasUsed: 5_632_097n,
1623
+ gasUsed: 258_867n,
1624
+ logsBloom:
1625
+ '0x00010000000040000000002000000000000004000000000000000000040000000000000000000000000000100000000000008000008000000000000000200000000000000000400000000008000000800000000000000000000100000000000000000000020002000000200100020800000000000000000080000010000000400000000000000000001000000000000000000000400000000000000000000000220000000000000002000000000200000000000000000000000000200000044000008002000008000001000000000000000000002000800000108800000020000010000008000000000000000000000002000000000000000000000000100000',
1626
+ status: 'success',
1627
+ block: {
1628
+ blobGasUsed: 0n,
1629
+ excessBlobGas: 0n,
1630
+ sealFields: [],
1631
+ baseFeePerGas: 60_042_497_029n,
1632
+ difficulty: 24n,
1633
+ extraData:
1634
+ '0xd682021183626f7288676f312e31382e37856c696e7578000000000000000000932566624d80d203ef15148c95e436f6543e640c5e444e20fefd9d83c681d24c6eb1552e2ac79e84626e5b6bfba846f438da06121a7f20ee95fceaf5ad30c5ff00',
1635
+ gasLimit: 31_840_301n,
1636
+ gasUsed: 7_089_725n,
1637
+ hash: '0xe7685f80646a2d2eb7c3f8231776fad692330739b48cd77f5a392be3763d4826',
1638
+ logsBloom:
1639
+ '0x47bdc8de8020400008dc12b8a320648802400e008001b3287d560010058206081c5f30281220000c4885109c82e6600140018a0000e2a018220a544c422ca010112d80087802ec1880268a19e12030e03c8204e0d3541008792b1910a1002272000930090310aad080423a31164228904008c429084145a9a00c4110418c12f6541111c42c0d6200043d000435842ce4040105b1c470020802481d44090480e172a110081102410022288882e002251448d88164a20c090c230204250222ac440318a60204902c110241ae3b9a0106f850471280e44ab5100434d90294007002023e00c80c86104c048f1880b92a2dc5cb18209182c4d04c4440594b02933a18',
1640
+ miner: '0x0000000000000000000000000000000000000000',
1641
+ mixHash:
1642
+ '0x0000000000000000000000000000000000000000000000000000000000000000',
1643
+ nonce: '0x0000000000000000',
1644
+ number: 37_087_362n,
1645
+ parentHash:
1646
+ '0x47f81232571d9017eebe5e66e96e56dcff24ba753b7d00936acb58a90715d8c0',
1647
+ receiptsRoot:
1648
+ '0xa5a6b8569c0a4f0f541bdb695876a6c989e310ad34faa049b3c8ff0fe33830d5',
1649
+ sha3Uncles:
1650
+ '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',
1651
+ size: 26_518n,
1652
+ stateRoot:
1653
+ '0x3f16f0b1a131cc04a098d804008ed9ffe48e776ab639f4762a84668587ac56f6',
1654
+ timestamp: 1_671_604_038n,
1655
+ totalDifficulty: 588_037_048n,
1656
+ transactions: [],
1657
+ transactionsRoot:
1658
+ '0xa7e797002850c47b6be102e41d68991c58270b0129fd8fb1b633386aaeb4db43',
1659
+ uncles: [],
1660
+ },
1661
+ internalTransactions: [
1662
+ {
1663
+ contractAddress: undefined,
1664
+ price: undefined,
1665
+ from: '0x430dd9a4e7f4ad04e6c07eea27111e9e237ca334',
1666
+ to: '0x5e4a089e855083f937698a3cb917e274d680615c',
1667
+ value: 6_700_000_000_000_000_000n,
1668
+ input: '',
1669
+ type: 'InternalTransaction',
1670
+ gas: 222_831n,
1671
+ gasUsed: 214_683n,
1672
+ isError: false,
1673
+ transactionHash:
1674
+ '0x18468f1bc0a94948941fbba66444437232698a2aae0cc2da305e31acee2075af',
1675
+ txType: 'call',
1676
+ currency: {
1677
+ type: 'CryptoCurrency',
1678
+ id: 'matic-network',
1679
+ name: 'Polygon',
1680
+ symbol: 'MATIC',
1681
+ icon: undefined,
1682
+ market: { coingeckoId: 'matic-network', marketCapUsd: undefined },
1683
+ updatedAt: 1_708_092_731_725,
1684
+ },
1685
+ },
1686
+ ],
1687
+ function: {
1688
+ name: 'swapFTforNFT',
1689
+ args: [
1690
+ {
1691
+ name: '_pool',
1692
+ type: 'address',
1693
+ value: '0x5E4a089e855083F937698a3cB917e274D680615C',
1694
+ },
1695
+ { name: '_tokenIds', type: 'uint256[]', value: [262n, 6782n] },
1696
+ {
1697
+ name: '_supporter',
1698
+ type: 'address',
1699
+ value: '0x0dfdd84f4fFF7BbE1b9E90E9bDc342cf28E3a510',
1700
+ },
1701
+ ],
1702
+ },
1703
+ erc20Transfers: [],
1704
+ erc721Transfers: [
1705
+ {
1706
+ type: 'Erc721Transfer',
1707
+ logIndex: 141,
1708
+ token: {
1709
+ contractAddress: '0x48679e8b22648e8ca1177a7dd0dd51b841912cec',
1710
+ name: 'KawaiiFriendsNFT',
1711
+ symbol: 'KFNFT',
1712
+ },
1713
+ from: '0x5e4a089e855083f937698a3cb917e274d680615c',
1714
+ to: '0x161619839ebbada5d3c279e1a79c50f7fc4274d6',
1715
+ tokenId: 262n,
1716
+ nft: {
1717
+ type: 'Nft',
1718
+ id: 'evm_137_0x48679e8b22648e8ca1177a7dd0dd51b841912cec_262',
1719
+ },
1720
+ },
1721
+ {
1722
+ type: 'Erc721Transfer',
1723
+ logIndex: 143,
1724
+ token: {
1725
+ contractAddress: '0x48679e8b22648e8ca1177a7dd0dd51b841912cec',
1726
+ name: 'KawaiiFriendsNFT',
1727
+ symbol: 'KFNFT',
1728
+ },
1729
+ from: '0x5e4a089e855083f937698a3cb917e274d680615c',
1730
+ to: '0x161619839ebbada5d3c279e1a79c50f7fc4274d6',
1731
+ tokenId: 6782n,
1732
+ nft: {
1733
+ type: 'Nft',
1734
+ id: 'evm_137_0x48679e8b22648e8ca1177a7dd0dd51b841912cec_6782',
1735
+ },
1736
+ },
1737
+ ],
1738
+ erc1155Transfers: [],
1739
+ }
1740
+ const analyze = createAnalyzeByJsonRule({
1741
+ chainId: 137,
1742
+ from: undefined,
1743
+ to: ['0x430dd9a4e7f4ad04e6c07eea27111e9e237ca334'],
1744
+ value: 'plus',
1745
+ functionSignature: '0xcab5c30e',
1746
+ functionInterface: 'swapFTforNFT(address, uint256[], address)',
1747
+ logsPatterns: [
1748
+ {
1749
+ matchType: 'partial',
1750
+ signature:
1751
+ '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
1752
+ indexedCount: 3,
1753
+ logCount: undefined,
1754
+ args: undefined,
1755
+ },
1756
+ ],
1757
+ internalsPatterns: undefined,
1758
+ parameterMatchPatterns: [
1759
+ {
1760
+ base: {
1761
+ type: 'from',
1762
+ },
1763
+ compare: {
1764
+ type: 'log',
1765
+ signature:
1766
+ '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
1767
+ indexedCount: 3,
1768
+ index: 'every',
1769
+ argIndex: 1,
1770
+ },
1771
+ },
1772
+ {
1773
+ base: {
1774
+ type: 'value',
1775
+ },
1776
+ compare: {
1777
+ type: 'log',
1778
+ signature:
1779
+ '0x2611defd53a4a87419d2078554db30aeaddd9ddfdc5990da2bbdc8d589f5e4d6',
1780
+ indexedCount: 2,
1781
+ index: 'every',
1782
+ argIndex: 3,
1783
+ },
1784
+ },
1785
+ ],
1786
+ generators: [
1787
+ {
1788
+ type: 'specific-token-transfer',
1789
+ action: 'buy-nft',
1790
+ comment: undefined,
1791
+ transfers: [
1792
+ {
1793
+ type: 'token-transfer',
1794
+ token: 'erc721',
1795
+ transferIndex: 'any',
1796
+ target: 'to',
1797
+ },
1798
+ {
1799
+ type: 'token-transfer',
1800
+ token: 'value',
1801
+ transferIndex: 'any',
1802
+ target: 'from',
1803
+ },
1804
+ ],
1805
+ },
1806
+ ],
1807
+ })
1808
+ const result = await analyze({
1809
+ chain,
1810
+ transaction,
1811
+ accountAddresses: ['0x161619839ebbada5d3c279e1a79c50f7fc4274d6'],
1812
+ })
1813
+ expect(result).toBeDefined()
1814
+ expect(result?.actions).toHaveLength(1)
1815
+ expect(result?.actions[0].action).toBe('buy-nft')
1816
+ expect(result?.accountActions).toHaveLength(1)
1817
+ expect(result?.accountActions[0].action).toBe('buy-nft')
1818
+ })
1819
+ })