@0xtorch/evm 0.0.108 → 0.0.109

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 (400) hide show
  1. package/.DS_Store +0 -0
  2. package/_cjs/chain/definitions/arbitrumOne.js +1 -2
  3. package/_cjs/chain/definitions/arbitrumOne.js.map +1 -1
  4. package/_cjs/chain/definitions/astar.js +1 -2
  5. package/_cjs/chain/definitions/astar.js.map +1 -1
  6. package/_cjs/chain/definitions/astarZkEvm.js +1 -2
  7. package/_cjs/chain/definitions/astarZkEvm.js.map +1 -1
  8. package/_cjs/chain/definitions/avalancheC.js +1 -2
  9. package/_cjs/chain/definitions/avalancheC.js.map +1 -1
  10. package/_cjs/chain/definitions/base.js +1 -2
  11. package/_cjs/chain/definitions/base.js.map +1 -1
  12. package/_cjs/chain/definitions/blast.js +1 -2
  13. package/_cjs/chain/definitions/blast.js.map +1 -1
  14. package/_cjs/chain/definitions/bsc.js +1 -2
  15. package/_cjs/chain/definitions/bsc.js.map +1 -1
  16. package/_cjs/chain/definitions/doge.js +1 -2
  17. package/_cjs/chain/definitions/doge.js.map +1 -1
  18. package/_cjs/chain/definitions/ethereum.js +1 -2
  19. package/_cjs/chain/definitions/ethereum.js.map +1 -1
  20. package/_cjs/chain/definitions/fantom.js +1 -2
  21. package/_cjs/chain/definitions/fantom.js.map +1 -1
  22. package/_cjs/chain/definitions/linea.js +1 -2
  23. package/_cjs/chain/definitions/linea.js.map +1 -1
  24. package/_cjs/chain/definitions/mantaPacific.js +1 -2
  25. package/_cjs/chain/definitions/mantaPacific.js.map +1 -1
  26. package/_cjs/chain/definitions/mantle.js +1 -2
  27. package/_cjs/chain/definitions/mantle.js.map +1 -1
  28. package/_cjs/chain/definitions/metis.js +1 -2
  29. package/_cjs/chain/definitions/metis.js.map +1 -1
  30. package/_cjs/chain/definitions/moonbeam.js +1 -2
  31. package/_cjs/chain/definitions/moonbeam.js.map +1 -1
  32. package/_cjs/chain/definitions/moonriver.js +1 -2
  33. package/_cjs/chain/definitions/moonriver.js.map +1 -1
  34. package/_cjs/chain/definitions/oasys.js +1 -2
  35. package/_cjs/chain/definitions/oasys.js.map +1 -1
  36. package/_cjs/chain/definitions/opBnb.js +1 -2
  37. package/_cjs/chain/definitions/opBnb.js.map +1 -1
  38. package/_cjs/chain/definitions/optimism.js +1 -2
  39. package/_cjs/chain/definitions/optimism.js.map +1 -1
  40. package/_cjs/chain/definitions/polygonPos.js +1 -2
  41. package/_cjs/chain/definitions/polygonPos.js.map +1 -1
  42. package/_cjs/chain/definitions/ronin.js +1 -2
  43. package/_cjs/chain/definitions/ronin.js.map +1 -1
  44. package/_cjs/chain/definitions/scroll.js +1 -2
  45. package/_cjs/chain/definitions/scroll.js.map +1 -1
  46. package/_cjs/chain/definitions/zkFair.js +1 -2
  47. package/_cjs/chain/definitions/zkFair.js.map +1 -1
  48. package/_cjs/chain/definitions/zkSyncEra.js +1 -2
  49. package/_cjs/chain/definitions/zkSyncEra.js.map +1 -1
  50. package/_cjs/chain/definitions/zora.js +1 -2
  51. package/_cjs/chain/definitions/zora.js.map +1 -1
  52. package/_cjs/explorer/blockscout/client.js +2 -2
  53. package/_cjs/explorer/blockscout/client.js.map +1 -1
  54. package/_cjs/explorer/blockscout/create.js +18 -10
  55. package/_cjs/explorer/blockscout/create.js.map +1 -1
  56. package/_cjs/explorer/blockscout/getBlockNumberByTimestamp.js +2 -1
  57. package/_cjs/explorer/blockscout/getBlockNumberByTimestamp.js.map +1 -1
  58. package/_cjs/explorer/blockscout/getContractCreatorAddressHashAndCreationTransactionHash.js +2 -1
  59. package/_cjs/explorer/blockscout/getContractCreatorAddressHashAndCreationTransactionHash.js.map +1 -1
  60. package/_cjs/explorer/blockscout/getContractSourceCodeForAVerifiedContract.js +2 -1
  61. package/_cjs/explorer/blockscout/getContractSourceCodeForAVerifiedContract.js.map +1 -1
  62. package/_cjs/explorer/blockscout/getEventLogsByAddressAndTopic.js +2 -1
  63. package/_cjs/explorer/blockscout/getEventLogsByAddressAndTopic.js.map +1 -1
  64. package/_cjs/explorer/blockscout/getInternalTransactionsByAddressHash.js +2 -1
  65. package/_cjs/explorer/blockscout/getInternalTransactionsByAddressHash.js.map +1 -1
  66. package/_cjs/explorer/blockscout/getInternalTransactionsByTransactionHash.js +2 -1
  67. package/_cjs/explorer/blockscout/getInternalTransactionsByTransactionHash.js.map +1 -1
  68. package/_cjs/explorer/blockscout/getTokenTransferEventsByAddress.js +2 -1
  69. package/_cjs/explorer/blockscout/getTokenTransferEventsByAddress.js.map +1 -1
  70. package/_cjs/explorer/blockscout/getTransactionsByAddress.js +2 -1
  71. package/_cjs/explorer/blockscout/getTransactionsByAddress.js.map +1 -1
  72. package/_cjs/explorer/etherscan/client.js +2 -2
  73. package/_cjs/explorer/etherscan/client.js.map +1 -1
  74. package/_cjs/explorer/etherscan/create.js +19 -10
  75. package/_cjs/explorer/etherscan/create.js.map +1 -1
  76. package/_cjs/explorer/etherscan/getBlockNumberByTimestamp.js +2 -1
  77. package/_cjs/explorer/etherscan/getBlockNumberByTimestamp.js.map +1 -1
  78. package/_cjs/explorer/etherscan/getContractCreatorAndCreationTxHash.js +2 -1
  79. package/_cjs/explorer/etherscan/getContractCreatorAndCreationTxHash.js.map +1 -1
  80. package/_cjs/explorer/etherscan/getContractSourceCodeForVerifiedContract.js +2 -1
  81. package/_cjs/explorer/etherscan/getContractSourceCodeForVerifiedContract.js.map +1 -1
  82. package/_cjs/explorer/etherscan/getEventLogsByAddressFilteredByTopics.js +2 -1
  83. package/_cjs/explorer/etherscan/getEventLogsByAddressFilteredByTopics.js.map +1 -1
  84. package/_cjs/explorer/etherscan/getInternalTransactionsByTransactionHash.js +2 -1
  85. package/_cjs/explorer/etherscan/getInternalTransactionsByTransactionHash.js.map +1 -1
  86. package/_cjs/explorer/etherscan/getListOfErc1155TokenTransferEventsByAddress.js +2 -1
  87. package/_cjs/explorer/etherscan/getListOfErc1155TokenTransferEventsByAddress.js.map +1 -1
  88. package/_cjs/explorer/etherscan/getListOfErc20TokenTransferEventsByAddress.js +2 -1
  89. package/_cjs/explorer/etherscan/getListOfErc20TokenTransferEventsByAddress.js.map +1 -1
  90. package/_cjs/explorer/etherscan/getListOfErc721TokenTransferEventsByAddress.js +2 -1
  91. package/_cjs/explorer/etherscan/getListOfErc721TokenTransferEventsByAddress.js.map +1 -1
  92. package/_cjs/explorer/etherscan/getListOfInternalTransactionsByAddress.js +2 -1
  93. package/_cjs/explorer/etherscan/getListOfInternalTransactionsByAddress.js.map +1 -1
  94. package/_cjs/explorer/etherscan/getListOfNormalTransactionsByAddress.js +2 -1
  95. package/_cjs/explorer/etherscan/getListOfNormalTransactionsByAddress.js.map +1 -1
  96. package/_cjs/explorer/moralis/client.js +2 -2
  97. package/_cjs/explorer/moralis/client.js.map +1 -1
  98. package/_cjs/explorer/moralis/create.js +7 -5
  99. package/_cjs/explorer/moralis/create.js.map +1 -1
  100. package/_cjs/explorer/moralis/getWalletTransactionHistory.js +2 -1
  101. package/_cjs/explorer/moralis/getWalletTransactionHistory.js.map +1 -1
  102. package/_cjs/logic/analyzeTransaction/createActions/json/allValue.js +9 -1
  103. package/_cjs/logic/analyzeTransaction/createActions/json/allValue.js.map +1 -1
  104. package/_cjs/logic/analyzeTransaction/createActions/json/erc1155Pattern.js +12 -1
  105. package/_cjs/logic/analyzeTransaction/createActions/json/erc1155Pattern.js.map +1 -1
  106. package/_cjs/logic/analyzeTransaction/createActions/json/erc20Pattern.js +12 -1
  107. package/_cjs/logic/analyzeTransaction/createActions/json/erc20Pattern.js.map +1 -1
  108. package/_cjs/logic/analyzeTransaction/createActions/json/internalTransferGenerator.js +12 -1
  109. package/_cjs/logic/analyzeTransaction/createActions/json/internalTransferGenerator.js.map +1 -1
  110. package/_cjs/logic/analyzeTransaction/createActions/json/join.js +9 -1
  111. package/_cjs/logic/analyzeTransaction/createActions/json/join.js.map +1 -1
  112. package/_cjs/logic/analyzeTransaction/createActions/json/transferGenerator.js +12 -1
  113. package/_cjs/logic/analyzeTransaction/createActions/json/transferGenerator.js.map +1 -1
  114. package/_cjs/logic/analyzeTransaction/createActions/json/verifyTxSatisfiesCondition.js +36 -3
  115. package/_cjs/logic/analyzeTransaction/createActions/json/verifyTxSatisfiesCondition.js.map +1 -1
  116. package/_esm/chain/definitions/arbitrumOne.js +1 -2
  117. package/_esm/chain/definitions/arbitrumOne.js.map +1 -1
  118. package/_esm/chain/definitions/astar.js +1 -2
  119. package/_esm/chain/definitions/astar.js.map +1 -1
  120. package/_esm/chain/definitions/astarZkEvm.js +1 -2
  121. package/_esm/chain/definitions/astarZkEvm.js.map +1 -1
  122. package/_esm/chain/definitions/avalancheC.js +1 -2
  123. package/_esm/chain/definitions/avalancheC.js.map +1 -1
  124. package/_esm/chain/definitions/base.js +1 -2
  125. package/_esm/chain/definitions/base.js.map +1 -1
  126. package/_esm/chain/definitions/blast.js +1 -2
  127. package/_esm/chain/definitions/blast.js.map +1 -1
  128. package/_esm/chain/definitions/bsc.js +1 -2
  129. package/_esm/chain/definitions/bsc.js.map +1 -1
  130. package/_esm/chain/definitions/doge.js +1 -2
  131. package/_esm/chain/definitions/doge.js.map +1 -1
  132. package/_esm/chain/definitions/ethereum.js +1 -2
  133. package/_esm/chain/definitions/ethereum.js.map +1 -1
  134. package/_esm/chain/definitions/fantom.js +1 -2
  135. package/_esm/chain/definitions/fantom.js.map +1 -1
  136. package/_esm/chain/definitions/linea.js +1 -2
  137. package/_esm/chain/definitions/linea.js.map +1 -1
  138. package/_esm/chain/definitions/mantaPacific.js +1 -2
  139. package/_esm/chain/definitions/mantaPacific.js.map +1 -1
  140. package/_esm/chain/definitions/mantle.js +1 -2
  141. package/_esm/chain/definitions/mantle.js.map +1 -1
  142. package/_esm/chain/definitions/metis.js +1 -2
  143. package/_esm/chain/definitions/metis.js.map +1 -1
  144. package/_esm/chain/definitions/moonbeam.js +1 -2
  145. package/_esm/chain/definitions/moonbeam.js.map +1 -1
  146. package/_esm/chain/definitions/moonriver.js +1 -2
  147. package/_esm/chain/definitions/moonriver.js.map +1 -1
  148. package/_esm/chain/definitions/oasys.js +1 -2
  149. package/_esm/chain/definitions/oasys.js.map +1 -1
  150. package/_esm/chain/definitions/opBnb.js +1 -2
  151. package/_esm/chain/definitions/opBnb.js.map +1 -1
  152. package/_esm/chain/definitions/optimism.js +1 -2
  153. package/_esm/chain/definitions/optimism.js.map +1 -1
  154. package/_esm/chain/definitions/polygonPos.js +1 -2
  155. package/_esm/chain/definitions/polygonPos.js.map +1 -1
  156. package/_esm/chain/definitions/ronin.js +1 -2
  157. package/_esm/chain/definitions/ronin.js.map +1 -1
  158. package/_esm/chain/definitions/scroll.js +1 -2
  159. package/_esm/chain/definitions/scroll.js.map +1 -1
  160. package/_esm/chain/definitions/zkFair.js +1 -2
  161. package/_esm/chain/definitions/zkFair.js.map +1 -1
  162. package/_esm/chain/definitions/zkSyncEra.js +1 -2
  163. package/_esm/chain/definitions/zkSyncEra.js.map +1 -1
  164. package/_esm/chain/definitions/zora.js +1 -2
  165. package/_esm/chain/definitions/zora.js.map +1 -1
  166. package/_esm/explorer/blockscout/client.js +2 -2
  167. package/_esm/explorer/blockscout/client.js.map +1 -1
  168. package/_esm/explorer/blockscout/create.js +18 -10
  169. package/_esm/explorer/blockscout/create.js.map +1 -1
  170. package/_esm/explorer/blockscout/getBlockNumberByTimestamp.js +2 -1
  171. package/_esm/explorer/blockscout/getBlockNumberByTimestamp.js.map +1 -1
  172. package/_esm/explorer/blockscout/getContractCreatorAddressHashAndCreationTransactionHash.js +2 -1
  173. package/_esm/explorer/blockscout/getContractCreatorAddressHashAndCreationTransactionHash.js.map +1 -1
  174. package/_esm/explorer/blockscout/getContractSourceCodeForAVerifiedContract.js +2 -1
  175. package/_esm/explorer/blockscout/getContractSourceCodeForAVerifiedContract.js.map +1 -1
  176. package/_esm/explorer/blockscout/getEventLogsByAddressAndTopic.js +2 -1
  177. package/_esm/explorer/blockscout/getEventLogsByAddressAndTopic.js.map +1 -1
  178. package/_esm/explorer/blockscout/getInternalTransactionsByAddressHash.js +2 -1
  179. package/_esm/explorer/blockscout/getInternalTransactionsByAddressHash.js.map +1 -1
  180. package/_esm/explorer/blockscout/getInternalTransactionsByTransactionHash.js +2 -1
  181. package/_esm/explorer/blockscout/getInternalTransactionsByTransactionHash.js.map +1 -1
  182. package/_esm/explorer/blockscout/getTokenTransferEventsByAddress.js +2 -1
  183. package/_esm/explorer/blockscout/getTokenTransferEventsByAddress.js.map +1 -1
  184. package/_esm/explorer/blockscout/getTransactionsByAddress.js +2 -1
  185. package/_esm/explorer/blockscout/getTransactionsByAddress.js.map +1 -1
  186. package/_esm/explorer/etherscan/client.js +2 -2
  187. package/_esm/explorer/etherscan/client.js.map +1 -1
  188. package/_esm/explorer/etherscan/create.js +19 -10
  189. package/_esm/explorer/etherscan/create.js.map +1 -1
  190. package/_esm/explorer/etherscan/getBlockNumberByTimestamp.js +2 -1
  191. package/_esm/explorer/etherscan/getBlockNumberByTimestamp.js.map +1 -1
  192. package/_esm/explorer/etherscan/getContractCreatorAndCreationTxHash.js +2 -1
  193. package/_esm/explorer/etherscan/getContractCreatorAndCreationTxHash.js.map +1 -1
  194. package/_esm/explorer/etherscan/getContractSourceCodeForVerifiedContract.js +2 -1
  195. package/_esm/explorer/etherscan/getContractSourceCodeForVerifiedContract.js.map +1 -1
  196. package/_esm/explorer/etherscan/getEventLogsByAddressFilteredByTopics.js +2 -1
  197. package/_esm/explorer/etherscan/getEventLogsByAddressFilteredByTopics.js.map +1 -1
  198. package/_esm/explorer/etherscan/getInternalTransactionsByTransactionHash.js +2 -1
  199. package/_esm/explorer/etherscan/getInternalTransactionsByTransactionHash.js.map +1 -1
  200. package/_esm/explorer/etherscan/getListOfErc1155TokenTransferEventsByAddress.js +2 -1
  201. package/_esm/explorer/etherscan/getListOfErc1155TokenTransferEventsByAddress.js.map +1 -1
  202. package/_esm/explorer/etherscan/getListOfErc20TokenTransferEventsByAddress.js +2 -1
  203. package/_esm/explorer/etherscan/getListOfErc20TokenTransferEventsByAddress.js.map +1 -1
  204. package/_esm/explorer/etherscan/getListOfErc721TokenTransferEventsByAddress.js +2 -1
  205. package/_esm/explorer/etherscan/getListOfErc721TokenTransferEventsByAddress.js.map +1 -1
  206. package/_esm/explorer/etherscan/getListOfInternalTransactionsByAddress.js +2 -1
  207. package/_esm/explorer/etherscan/getListOfInternalTransactionsByAddress.js.map +1 -1
  208. package/_esm/explorer/etherscan/getListOfNormalTransactionsByAddress.js +2 -1
  209. package/_esm/explorer/etherscan/getListOfNormalTransactionsByAddress.js.map +1 -1
  210. package/_esm/explorer/moralis/client.js +2 -2
  211. package/_esm/explorer/moralis/client.js.map +1 -1
  212. package/_esm/explorer/moralis/create.js +7 -5
  213. package/_esm/explorer/moralis/create.js.map +1 -1
  214. package/_esm/explorer/moralis/getWalletTransactionHistory.js +2 -1
  215. package/_esm/explorer/moralis/getWalletTransactionHistory.js.map +1 -1
  216. package/_esm/logic/analyzeTransaction/createActions/json/allValue.js +9 -1
  217. package/_esm/logic/analyzeTransaction/createActions/json/allValue.js.map +1 -1
  218. package/_esm/logic/analyzeTransaction/createActions/json/erc1155Pattern.js +12 -1
  219. package/_esm/logic/analyzeTransaction/createActions/json/erc1155Pattern.js.map +1 -1
  220. package/_esm/logic/analyzeTransaction/createActions/json/erc20Pattern.js +12 -1
  221. package/_esm/logic/analyzeTransaction/createActions/json/erc20Pattern.js.map +1 -1
  222. package/_esm/logic/analyzeTransaction/createActions/json/internalTransferGenerator.js +12 -1
  223. package/_esm/logic/analyzeTransaction/createActions/json/internalTransferGenerator.js.map +1 -1
  224. package/_esm/logic/analyzeTransaction/createActions/json/join.js +9 -1
  225. package/_esm/logic/analyzeTransaction/createActions/json/join.js.map +1 -1
  226. package/_esm/logic/analyzeTransaction/createActions/json/transferGenerator.js +12 -1
  227. package/_esm/logic/analyzeTransaction/createActions/json/transferGenerator.js.map +1 -1
  228. package/_esm/logic/analyzeTransaction/createActions/json/verifyTxSatisfiesCondition.js +36 -3
  229. package/_esm/logic/analyzeTransaction/createActions/json/verifyTxSatisfiesCondition.js.map +1 -1
  230. package/_types/chain/definitions/arbitrumOne.d.ts +1 -2
  231. package/_types/chain/definitions/arbitrumOne.d.ts.map +1 -1
  232. package/_types/chain/definitions/astar.d.ts +1 -2
  233. package/_types/chain/definitions/astar.d.ts.map +1 -1
  234. package/_types/chain/definitions/astarZkEvm.d.ts +1 -2
  235. package/_types/chain/definitions/astarZkEvm.d.ts.map +1 -1
  236. package/_types/chain/definitions/avalancheC.d.ts +1 -2
  237. package/_types/chain/definitions/avalancheC.d.ts.map +1 -1
  238. package/_types/chain/definitions/base.d.ts +1 -2
  239. package/_types/chain/definitions/base.d.ts.map +1 -1
  240. package/_types/chain/definitions/blast.d.ts +1 -2
  241. package/_types/chain/definitions/blast.d.ts.map +1 -1
  242. package/_types/chain/definitions/bsc.d.ts +1 -2
  243. package/_types/chain/definitions/bsc.d.ts.map +1 -1
  244. package/_types/chain/definitions/doge.d.ts +1 -2
  245. package/_types/chain/definitions/doge.d.ts.map +1 -1
  246. package/_types/chain/definitions/ethereum.d.ts +1 -2
  247. package/_types/chain/definitions/ethereum.d.ts.map +1 -1
  248. package/_types/chain/definitions/fantom.d.ts +1 -2
  249. package/_types/chain/definitions/fantom.d.ts.map +1 -1
  250. package/_types/chain/definitions/linea.d.ts +1 -2
  251. package/_types/chain/definitions/linea.d.ts.map +1 -1
  252. package/_types/chain/definitions/mantaPacific.d.ts +1 -2
  253. package/_types/chain/definitions/mantaPacific.d.ts.map +1 -1
  254. package/_types/chain/definitions/mantle.d.ts +1 -2
  255. package/_types/chain/definitions/mantle.d.ts.map +1 -1
  256. package/_types/chain/definitions/metis.d.ts +1 -2
  257. package/_types/chain/definitions/metis.d.ts.map +1 -1
  258. package/_types/chain/definitions/moonbeam.d.ts +1 -2
  259. package/_types/chain/definitions/moonbeam.d.ts.map +1 -1
  260. package/_types/chain/definitions/moonriver.d.ts +1 -2
  261. package/_types/chain/definitions/moonriver.d.ts.map +1 -1
  262. package/_types/chain/definitions/oasys.d.ts +1 -2
  263. package/_types/chain/definitions/oasys.d.ts.map +1 -1
  264. package/_types/chain/definitions/opBnb.d.ts +1 -2
  265. package/_types/chain/definitions/opBnb.d.ts.map +1 -1
  266. package/_types/chain/definitions/optimism.d.ts +1 -2
  267. package/_types/chain/definitions/optimism.d.ts.map +1 -1
  268. package/_types/chain/definitions/polygonPos.d.ts +1 -2
  269. package/_types/chain/definitions/polygonPos.d.ts.map +1 -1
  270. package/_types/chain/definitions/ronin.d.ts +1 -2
  271. package/_types/chain/definitions/ronin.d.ts.map +1 -1
  272. package/_types/chain/definitions/scroll.d.ts +1 -2
  273. package/_types/chain/definitions/scroll.d.ts.map +1 -1
  274. package/_types/chain/definitions/zkFair.d.ts +1 -1
  275. package/_types/chain/definitions/zkFair.d.ts.map +1 -1
  276. package/_types/chain/definitions/zkSyncEra.d.ts +1 -2
  277. package/_types/chain/definitions/zkSyncEra.d.ts.map +1 -1
  278. package/_types/chain/definitions/zora.d.ts +1 -2
  279. package/_types/chain/definitions/zora.d.ts.map +1 -1
  280. package/_types/explorer/blockscout/client.d.ts +2 -2
  281. package/_types/explorer/blockscout/client.d.ts.map +1 -1
  282. package/_types/explorer/blockscout/create.d.ts +1 -2
  283. package/_types/explorer/blockscout/create.d.ts.map +1 -1
  284. package/_types/explorer/blockscout/getBlockNumberByTimestamp.d.ts +2 -1
  285. package/_types/explorer/blockscout/getBlockNumberByTimestamp.d.ts.map +1 -1
  286. package/_types/explorer/blockscout/getContractCreatorAddressHashAndCreationTransactionHash.d.ts +2 -1
  287. package/_types/explorer/blockscout/getContractCreatorAddressHashAndCreationTransactionHash.d.ts.map +1 -1
  288. package/_types/explorer/blockscout/getContractSourceCodeForAVerifiedContract.d.ts +2 -1
  289. package/_types/explorer/blockscout/getContractSourceCodeForAVerifiedContract.d.ts.map +1 -1
  290. package/_types/explorer/blockscout/getEventLogsByAddressAndTopic.d.ts +2 -1
  291. package/_types/explorer/blockscout/getEventLogsByAddressAndTopic.d.ts.map +1 -1
  292. package/_types/explorer/blockscout/getInternalTransactionsByAddressHash.d.ts +2 -1
  293. package/_types/explorer/blockscout/getInternalTransactionsByAddressHash.d.ts.map +1 -1
  294. package/_types/explorer/blockscout/getInternalTransactionsByTransactionHash.d.ts +2 -1
  295. package/_types/explorer/blockscout/getInternalTransactionsByTransactionHash.d.ts.map +1 -1
  296. package/_types/explorer/blockscout/getTokenTransferEventsByAddress.d.ts +2 -1
  297. package/_types/explorer/blockscout/getTokenTransferEventsByAddress.d.ts.map +1 -1
  298. package/_types/explorer/blockscout/getTransactionsByAddress.d.ts +2 -1
  299. package/_types/explorer/blockscout/getTransactionsByAddress.d.ts.map +1 -1
  300. package/_types/explorer/etherscan/client.d.ts +2 -2
  301. package/_types/explorer/etherscan/client.d.ts.map +1 -1
  302. package/_types/explorer/etherscan/create.d.ts +1 -2
  303. package/_types/explorer/etherscan/create.d.ts.map +1 -1
  304. package/_types/explorer/etherscan/getBlockNumberByTimestamp.d.ts +2 -1
  305. package/_types/explorer/etherscan/getBlockNumberByTimestamp.d.ts.map +1 -1
  306. package/_types/explorer/etherscan/getContractCreatorAndCreationTxHash.d.ts +2 -1
  307. package/_types/explorer/etherscan/getContractCreatorAndCreationTxHash.d.ts.map +1 -1
  308. package/_types/explorer/etherscan/getContractSourceCodeForVerifiedContract.d.ts +2 -1
  309. package/_types/explorer/etherscan/getContractSourceCodeForVerifiedContract.d.ts.map +1 -1
  310. package/_types/explorer/etherscan/getEventLogsByAddressFilteredByTopics.d.ts +2 -1
  311. package/_types/explorer/etherscan/getEventLogsByAddressFilteredByTopics.d.ts.map +1 -1
  312. package/_types/explorer/etherscan/getInternalTransactionsByTransactionHash.d.ts +2 -1
  313. package/_types/explorer/etherscan/getInternalTransactionsByTransactionHash.d.ts.map +1 -1
  314. package/_types/explorer/etherscan/getListOfErc1155TokenTransferEventsByAddress.d.ts +2 -1
  315. package/_types/explorer/etherscan/getListOfErc1155TokenTransferEventsByAddress.d.ts.map +1 -1
  316. package/_types/explorer/etherscan/getListOfErc20TokenTransferEventsByAddress.d.ts +2 -1
  317. package/_types/explorer/etherscan/getListOfErc20TokenTransferEventsByAddress.d.ts.map +1 -1
  318. package/_types/explorer/etherscan/getListOfErc721TokenTransferEventsByAddress.d.ts +2 -1
  319. package/_types/explorer/etherscan/getListOfErc721TokenTransferEventsByAddress.d.ts.map +1 -1
  320. package/_types/explorer/etherscan/getListOfInternalTransactionsByAddress.d.ts +2 -1
  321. package/_types/explorer/etherscan/getListOfInternalTransactionsByAddress.d.ts.map +1 -1
  322. package/_types/explorer/etherscan/getListOfNormalTransactionsByAddress.d.ts +2 -1
  323. package/_types/explorer/etherscan/getListOfNormalTransactionsByAddress.d.ts.map +1 -1
  324. package/_types/explorer/moralis/client.d.ts +2 -2
  325. package/_types/explorer/moralis/client.d.ts.map +1 -1
  326. package/_types/explorer/moralis/create.d.ts +1 -2
  327. package/_types/explorer/moralis/create.d.ts.map +1 -1
  328. package/_types/explorer/moralis/getWalletTransactionHistory.d.ts +2 -1
  329. package/_types/explorer/moralis/getWalletTransactionHistory.d.ts.map +1 -1
  330. package/_types/explorer/types.d.ts +8 -0
  331. package/_types/explorer/types.d.ts.map +1 -1
  332. package/_types/logic/analyzeTransaction/createActions/json/allValue.d.ts.map +1 -1
  333. package/_types/logic/analyzeTransaction/createActions/json/erc1155Pattern.d.ts.map +1 -1
  334. package/_types/logic/analyzeTransaction/createActions/json/erc20Pattern.d.ts.map +1 -1
  335. package/_types/logic/analyzeTransaction/createActions/json/join.d.ts.map +1 -1
  336. package/_types/logic/analyzeTransaction/createActions/json/transferGenerator.d.ts.map +1 -1
  337. package/_types/logic/analyzeTransaction/createActions/json/verifyTxSatisfiesCondition.d.ts.map +1 -1
  338. package/analyzer/.DS_Store +0 -0
  339. package/chain/.DS_Store +0 -0
  340. package/chain/definitions/arbitrumOne.ts +0 -3
  341. package/chain/definitions/astar.ts +0 -3
  342. package/chain/definitions/astarZkEvm.ts +0 -3
  343. package/chain/definitions/avalancheC.ts +0 -3
  344. package/chain/definitions/base.ts +0 -3
  345. package/chain/definitions/blast.ts +0 -3
  346. package/chain/definitions/bsc.ts +0 -3
  347. package/chain/definitions/doge.ts +0 -3
  348. package/chain/definitions/ethereum.ts +0 -3
  349. package/chain/definitions/fantom.ts +0 -3
  350. package/chain/definitions/linea.ts +0 -3
  351. package/chain/definitions/mantaPacific.ts +0 -3
  352. package/chain/definitions/mantle.ts +0 -3
  353. package/chain/definitions/metis.ts +0 -3
  354. package/chain/definitions/moonbeam.ts +0 -3
  355. package/chain/definitions/moonriver.ts +0 -3
  356. package/chain/definitions/oasys.ts +0 -3
  357. package/chain/definitions/opBnb.ts +0 -3
  358. package/chain/definitions/optimism.ts +0 -3
  359. package/chain/definitions/polygonPos.ts +0 -3
  360. package/chain/definitions/ronin.ts +0 -3
  361. package/chain/definitions/scroll.ts +0 -3
  362. package/chain/definitions/zkFair.ts +0 -2
  363. package/chain/definitions/zkSyncEra.ts +0 -3
  364. package/chain/definitions/zora.ts +0 -3
  365. package/client/.DS_Store +0 -0
  366. package/explorer/.DS_Store +0 -0
  367. package/explorer/blockscout/client.ts +3 -2
  368. package/explorer/blockscout/create.ts +32 -10
  369. package/explorer/blockscout/getBlockNumberByTimestamp.ts +3 -0
  370. package/explorer/blockscout/getContractCreatorAddressHashAndCreationTransactionHash.ts +3 -0
  371. package/explorer/blockscout/getContractSourceCodeForAVerifiedContract.ts +3 -0
  372. package/explorer/blockscout/getEventLogsByAddressAndTopic.ts +3 -0
  373. package/explorer/blockscout/getInternalTransactionsByAddressHash.ts +3 -0
  374. package/explorer/blockscout/getInternalTransactionsByTransactionHash.ts +3 -0
  375. package/explorer/blockscout/getTokenTransferEventsByAddress.ts +3 -0
  376. package/explorer/blockscout/getTransactionsByAddress.ts +3 -0
  377. package/explorer/etherscan/client.ts +3 -2
  378. package/explorer/etherscan/create.ts +33 -10
  379. package/explorer/etherscan/getBlockNumberByTimestamp.ts +3 -0
  380. package/explorer/etherscan/getContractCreatorAndCreationTxHash.ts +3 -0
  381. package/explorer/etherscan/getContractSourceCodeForVerifiedContract.ts +3 -0
  382. package/explorer/etherscan/getEventLogsByAddressFilteredByTopics.ts +3 -0
  383. package/explorer/etherscan/getInternalTransactionsByTransactionHash.ts +3 -0
  384. package/explorer/etherscan/getListOfErc1155TokenTransferEventsByAddress.ts +3 -0
  385. package/explorer/etherscan/getListOfErc20TokenTransferEventsByAddress.ts +3 -0
  386. package/explorer/etherscan/getListOfErc721TokenTransferEventsByAddress.ts +3 -0
  387. package/explorer/etherscan/getListOfInternalTransactionsByAddress.ts +3 -0
  388. package/explorer/etherscan/getListOfNormalTransactionsByAddress.ts +3 -0
  389. package/explorer/moralis/client.ts +3 -2
  390. package/explorer/moralis/create.ts +6 -3
  391. package/explorer/moralis/getWalletTransactionHistory.ts +3 -0
  392. package/explorer/types.ts +8 -0
  393. package/logic/analyzeTransaction/createActions/json/allValue.ts +9 -1
  394. package/logic/analyzeTransaction/createActions/json/erc1155Pattern.ts +12 -1
  395. package/logic/analyzeTransaction/createActions/json/erc20Pattern.ts +12 -1
  396. package/logic/analyzeTransaction/createActions/json/internalTransferGenerator.ts +12 -1
  397. package/logic/analyzeTransaction/createActions/json/join.ts +9 -1
  398. package/logic/analyzeTransaction/createActions/json/transferGenerator.ts +12 -1
  399. package/logic/analyzeTransaction/createActions/json/verifyTxSatisfiesCondition.ts +36 -3
  400. package/package.json +2 -2
@@ -18,7 +18,6 @@ type CreateBlockscoutParameters = {
18
18
  baseUrl: string
19
19
  apiBaseUrl: string
20
20
  proxyUrl?: string
21
- headers?: Record<string, string>
22
21
  }
23
22
 
24
23
  export const createBlockscout = ({
@@ -26,14 +25,18 @@ export const createBlockscout = ({
26
25
  baseUrl,
27
26
  apiBaseUrl,
28
27
  proxyUrl,
29
- headers,
30
28
  }: CreateBlockscoutParameters): Explorer => {
31
- const client = createBlockscoutClient({ apiBaseUrl, proxyUrl, headers })
29
+ const client = createBlockscoutClient({ apiBaseUrl, proxyUrl })
32
30
 
33
31
  return {
34
32
  name,
35
33
  baseUrl,
36
- getAddressInternalTransactions: async ({ address, fromBlock, toBlock }) => {
34
+ getAddressInternalTransactions: async ({
35
+ address,
36
+ fromBlock,
37
+ toBlock,
38
+ headers,
39
+ }) => {
37
40
  const internalTransactions = new Map<
38
41
  string,
39
42
  InternalTransactionWithIndex
@@ -47,6 +50,7 @@ export const createBlockscout = ({
47
50
  address,
48
51
  startblock,
49
52
  endblock,
53
+ headers,
50
54
  })
51
55
  for (const transaction of result) {
52
56
  const id = createInternalTransactionId(transaction)
@@ -62,7 +66,12 @@ export const createBlockscout = ({
62
66
  }
63
67
  return [...internalTransactions.values()]
64
68
  },
65
- getAddressTransactionIndexes: async ({ address, fromBlock, toBlock }) => {
69
+ getAddressTransactionIndexes: async ({
70
+ address,
71
+ fromBlock,
72
+ toBlock,
73
+ headers,
74
+ }) => {
66
75
  const indexes = new Map<LowerHex, TransactionIndex>()
67
76
  let startblock = fromBlock
68
77
  const endblock = toBlock
@@ -73,6 +82,7 @@ export const createBlockscout = ({
73
82
  address,
74
83
  startblock,
75
84
  endblock,
85
+ headers,
76
86
  })
77
87
  for (const index of result) {
78
88
  if (!indexes.has(index.hash)) {
@@ -87,7 +97,12 @@ export const createBlockscout = ({
87
97
  }
88
98
  return [...indexes.values()]
89
99
  },
90
- getAddressTokenTransferIndexes: async ({ address, fromBlock, toBlock }) => {
100
+ getAddressTokenTransferIndexes: async ({
101
+ address,
102
+ fromBlock,
103
+ toBlock,
104
+ headers,
105
+ }) => {
91
106
  const indexes = new Map<LowerHex, TransactionIndex>()
92
107
  let startblock = fromBlock
93
108
  const endblock = toBlock
@@ -98,6 +113,7 @@ export const createBlockscout = ({
98
113
  address,
99
114
  startblock,
100
115
  endblock,
116
+ headers,
101
117
  })
102
118
  for (const index of result) {
103
119
  if (!indexes.has(index.hash)) {
@@ -112,26 +128,30 @@ export const createBlockscout = ({
112
128
  }
113
129
  return [...indexes.values()]
114
130
  },
115
- getBlockNumberOfTimestamp: ({ timestamp }) =>
131
+ getBlockNumberOfTimestamp: ({ timestamp, headers }) =>
116
132
  getBlockNumberByTimestamp({
117
133
  client,
118
134
  timestamp: Math.floor(timestamp / 1000),
135
+ headers,
119
136
  }),
120
- getContract: ({ address }) =>
137
+ getContract: ({ address, headers }) =>
121
138
  getContractSourceCodeForAVerifiedContract({
122
139
  client,
123
140
  address,
141
+ headers,
124
142
  }),
125
- getContractCreations: ({ addresses }) =>
143
+ getContractCreations: ({ addresses, headers }) =>
126
144
  getContractCreatorAddressHashAndCreationTransactionHash({
127
145
  client,
128
146
  contractaddresses: addresses,
147
+ headers,
129
148
  }),
130
149
  getEventLogs: async ({
131
150
  address,
132
151
  topic0,
133
152
  fromBlock: fromBlockParam,
134
153
  toBlock: toBlockParam,
154
+ headers,
135
155
  }) => {
136
156
  const logs: LogWithBlockNumber[] = []
137
157
  let fromBlock = fromBlockParam ?? 0
@@ -144,6 +164,7 @@ export const createBlockscout = ({
144
164
  topic0,
145
165
  fromBlock,
146
166
  toBlock,
167
+ headers,
147
168
  })
148
169
  logs.push(...result)
149
170
  if (result.length < maxPageSize) {
@@ -154,10 +175,11 @@ export const createBlockscout = ({
154
175
  }
155
176
  return logs
156
177
  },
157
- getInternalTransactionOfTransaction: ({ hash }) =>
178
+ getInternalTransactionOfTransaction: ({ hash, headers }) =>
158
179
  getInternalTransactionsByTransactionHash({
159
180
  client,
160
181
  txhash: hash,
182
+ headers,
161
183
  }),
162
184
  }
163
185
  }
@@ -6,6 +6,7 @@ type GetBlockNumberByTimestampParameters = {
6
6
  /** Unix timestamp in seconds */
7
7
  timestamp: number
8
8
  closest?: 'before' | 'after'
9
+ headers?: Record<string, string>
9
10
  }
10
11
 
11
12
  const resultSchema = z.object({
@@ -17,6 +18,7 @@ export const getBlockNumberByTimestamp = async ({
17
18
  client,
18
19
  timestamp,
19
20
  closest = 'before',
21
+ headers,
20
22
  }: GetBlockNumberByTimestampParameters) => {
21
23
  const result = await client.get({
22
24
  path: '',
@@ -27,6 +29,7 @@ export const getBlockNumberByTimestamp = async ({
27
29
  closest,
28
30
  },
29
31
  resultSchema,
32
+ headers,
30
33
  })
31
34
  return result.blockNumber
32
35
  }
@@ -7,6 +7,7 @@ import type { BlockscoutClient } from './client'
7
7
  type GetContractCreatorAddressHashAndCreationTransactionHashParameters = {
8
8
  client: BlockscoutClient
9
9
  contractaddresses: Hex[]
10
+ headers?: Record<string, string>
10
11
  }
11
12
 
12
13
  const contractCreationSchema = z.object({
@@ -20,6 +21,7 @@ const resultSchema = z.array(contractCreationSchema)
20
21
  export const getContractCreatorAddressHashAndCreationTransactionHash = async ({
21
22
  client,
22
23
  contractaddresses,
24
+ headers,
23
25
  }: GetContractCreatorAddressHashAndCreationTransactionHashParameters): Promise<
24
26
  ContractCreation[]
25
27
  > => {
@@ -31,6 +33,7 @@ export const getContractCreatorAddressHashAndCreationTransactionHash = async ({
31
33
  contractaddresses: contractaddresses.join(','),
32
34
  },
33
35
  resultSchema,
36
+ headers,
34
37
  })
35
38
  return result
36
39
  }
@@ -6,6 +6,7 @@ import type { BlockscoutClient } from './client'
6
6
  type GetContractSourceCodeForAVerifiedContractParameters = {
7
7
  client: BlockscoutClient
8
8
  address: Hex
9
+ headers?: Record<string, string>
9
10
  }
10
11
 
11
12
  const resultSchema = z.array(
@@ -19,6 +20,7 @@ const resultSchema = z.array(
19
20
  export const getContractSourceCodeForAVerifiedContract = async ({
20
21
  client,
21
22
  address,
23
+ headers,
22
24
  }: GetContractSourceCodeForAVerifiedContractParameters): Promise<
23
25
  Contract | undefined
24
26
  > => {
@@ -30,6 +32,7 @@ export const getContractSourceCodeForAVerifiedContract = async ({
30
32
  address,
31
33
  },
32
34
  resultSchema,
35
+ headers,
33
36
  })
34
37
  if (result.length === 0) {
35
38
  return undefined
@@ -10,6 +10,7 @@ type GetEventLogsByAddressAndTopicParameters = {
10
10
  topic0: LowerHex
11
11
  fromBlock: number | 'latest'
12
12
  toBlock: number | 'latest'
13
+ headers?: Record<string, string>
13
14
  }
14
15
 
15
16
  const logSchema = z.object({
@@ -37,6 +38,7 @@ export const getEventLogsByAddressAndTopic = async ({
37
38
  topic0,
38
39
  fromBlock,
39
40
  toBlock,
41
+ headers,
40
42
  }: GetEventLogsByAddressAndTopicParameters): Promise<LogWithBlockNumber[]> => {
41
43
  try {
42
44
  const result = await client.get({
@@ -50,6 +52,7 @@ export const getEventLogsByAddressAndTopic = async ({
50
52
  toBlock: toBlock.toString(),
51
53
  },
52
54
  resultSchema,
55
+ headers,
53
56
  })
54
57
  return result
55
58
  } catch (error) {
@@ -16,6 +16,7 @@ type GetInternalTransactionsByAddressHashParameters = {
16
16
  page?: number
17
17
  offset?: number
18
18
  sort?: 'asc' | 'desc'
19
+ headers?: Record<string, string>
19
20
  }
20
21
 
21
22
  const internalTransactionSchema = z.object({
@@ -56,6 +57,7 @@ export const getInternalTransactionsByAddressHash = async ({
56
57
  page = 1,
57
58
  offset = 10_000,
58
59
  sort = 'asc',
60
+ headers,
59
61
  }: GetInternalTransactionsByAddressHashParameters): Promise<
60
62
  InternalTransactionWithIndex[]
61
63
  > => {
@@ -77,6 +79,7 @@ export const getInternalTransactionsByAddressHash = async ({
77
79
  sort,
78
80
  },
79
81
  resultSchema,
82
+ headers,
80
83
  })
81
84
  return result.map((v) => ({
82
85
  blockNumber: v.blockNumber,
@@ -11,6 +11,7 @@ import type { BlockscoutClient } from './client'
11
11
  type GetInternalTransactionsByTransactionHashParameters = {
12
12
  client: BlockscoutClient
13
13
  txhash: LowerHex
14
+ headers?: Record<string, string>
14
15
  }
15
16
 
16
17
  const internalTransactionSchema = z.object({
@@ -46,6 +47,7 @@ const resultSchema = z.array(internalTransactionSchema)
46
47
  export const getInternalTransactionsByTransactionHash = async ({
47
48
  client,
48
49
  txhash,
50
+ headers,
49
51
  }: GetInternalTransactionsByTransactionHashParameters): Promise<
50
52
  InternalTransactionWithIndex[]
51
53
  > => {
@@ -58,6 +60,7 @@ export const getInternalTransactionsByTransactionHash = async ({
58
60
  txhash,
59
61
  },
60
62
  resultSchema,
63
+ headers,
61
64
  })
62
65
  return result.map((v) => ({
63
66
  blockNumber: v.blockNumber,
@@ -11,6 +11,7 @@ type GetTokenTransferEventsByAddressParameters = {
11
11
  page?: number
12
12
  offset?: number
13
13
  sort?: 'asc' | 'desc'
14
+ headers?: Record<string, string>
14
15
  }
15
16
 
16
17
  const transferSchema = z.object({
@@ -29,6 +30,7 @@ export const getTokenTransferEventsByAddress = async ({
29
30
  page = 1,
30
31
  offset = 10_000,
31
32
  sort = 'asc',
33
+ headers,
32
34
  }: GetTokenTransferEventsByAddressParameters): Promise<
33
35
  readonly TransactionIndex[]
34
36
  > => {
@@ -50,6 +52,7 @@ export const getTokenTransferEventsByAddress = async ({
50
52
  sort,
51
53
  },
52
54
  resultSchema,
55
+ headers,
53
56
  })
54
57
  return result.map((v) => ({
55
58
  blockNumber: v.blockNumber,
@@ -12,6 +12,7 @@ type GetTransactionsByAddressParameters = {
12
12
  page?: number
13
13
  offset?: number
14
14
  sort?: 'asc' | 'desc'
15
+ headers?: Record<string, string>
15
16
  }
16
17
 
17
18
  const transactionSchema = z.object({
@@ -30,6 +31,7 @@ export const getTransactionsByAddress = async ({
30
31
  page = 1,
31
32
  offset = 10_000,
32
33
  sort = 'asc',
34
+ headers,
33
35
  }: GetTransactionsByAddressParameters): Promise<TransactionIndex[]> => {
34
36
  try {
35
37
  const result = await client.get({
@@ -49,6 +51,7 @@ export const getTransactionsByAddress = async ({
49
51
  sort,
50
52
  },
51
53
  resultSchema,
54
+ headers,
52
55
  })
53
56
  return result.map((v) => ({
54
57
  blockNumber: v.blockNumber,
@@ -10,6 +10,7 @@ export type EtherscanClient = {
10
10
  path: string
11
11
  query: Record<string, string>
12
12
  resultSchema: ZodType<Output, Def, Input>
13
+ headers?: Record<string, string>
13
14
  }) => Promise<Output>
14
15
  }
15
16
 
@@ -17,14 +18,12 @@ type CreateEtherscanClientParameters = {
17
18
  apiBaseUrl: string
18
19
  apiKey?: string
19
20
  proxyUrl?: string
20
- headers?: Record<string, string>
21
21
  }
22
22
 
23
23
  export const createEtherscanClient = ({
24
24
  apiBaseUrl,
25
25
  apiKey,
26
26
  proxyUrl,
27
- headers,
28
27
  }: CreateEtherscanClientParameters): EtherscanClient => {
29
28
  // apiKey = undefined かつ proxyUrl = undefined の場合はエラー
30
29
  if (apiKey === undefined && proxyUrl === undefined) {
@@ -43,10 +42,12 @@ export const createEtherscanClient = ({
43
42
  path,
44
43
  query,
45
44
  resultSchema,
45
+ headers,
46
46
  }: {
47
47
  path: string
48
48
  query: Record<string, string>
49
49
  resultSchema: ZodType<Output, Def, Input>
50
+ headers?: Record<string, string>
50
51
  },
51
52
  repeat = 0,
52
53
  ): Promise<Output> => {
@@ -21,7 +21,6 @@ type CreateEtherscanParameters = {
21
21
  apiBaseUrl: string
22
22
  apiKey?: string
23
23
  proxyUrl?: string
24
- headers?: Record<string, string>
25
24
  pageSize?: number
26
25
  }
27
26
 
@@ -31,20 +30,23 @@ export const createEtherscan = ({
31
30
  apiBaseUrl,
32
31
  apiKey,
33
32
  proxyUrl,
34
- headers,
35
33
  pageSize = 10_000,
36
34
  }: CreateEtherscanParameters): Explorer => {
37
35
  const client = createEtherscanClient({
38
36
  apiBaseUrl,
39
37
  apiKey,
40
38
  proxyUrl,
41
- headers,
42
39
  })
43
40
 
44
41
  return {
45
42
  name,
46
43
  baseUrl,
47
- getAddressInternalTransactions: async ({ address, fromBlock, toBlock }) => {
44
+ getAddressInternalTransactions: async ({
45
+ address,
46
+ fromBlock,
47
+ toBlock,
48
+ headers,
49
+ }) => {
48
50
  const internalTransactions = new Map<
49
51
  string,
50
52
  InternalTransactionWithIndex
@@ -58,6 +60,7 @@ export const createEtherscan = ({
58
60
  startblock,
59
61
  endblock,
60
62
  offset: pageSize,
63
+ headers,
61
64
  })
62
65
  for (const transaction of result) {
63
66
  const id = createInternalTransactionId(transaction)
@@ -73,7 +76,12 @@ export const createEtherscan = ({
73
76
  }
74
77
  return [...internalTransactions.values()]
75
78
  },
76
- getAddressTransactionIndexes: async ({ address, fromBlock, toBlock }) => {
79
+ getAddressTransactionIndexes: async ({
80
+ address,
81
+ fromBlock,
82
+ toBlock,
83
+ headers,
84
+ }) => {
77
85
  const indexes = new Map<LowerHex, TransactionIndex>()
78
86
  let startblock = fromBlock
79
87
  const endblock = toBlock
@@ -84,6 +92,7 @@ export const createEtherscan = ({
84
92
  startblock,
85
93
  endblock,
86
94
  offset: pageSize,
95
+ headers,
87
96
  })
88
97
  for (const index of result) {
89
98
  if (!indexes.has(index.hash)) {
@@ -98,7 +107,12 @@ export const createEtherscan = ({
98
107
  }
99
108
  return [...indexes.values()]
100
109
  },
101
- getAddressTokenTransferIndexes: async ({ address, fromBlock, toBlock }) => {
110
+ getAddressTokenTransferIndexes: async ({
111
+ address,
112
+ fromBlock,
113
+ toBlock,
114
+ headers,
115
+ }) => {
102
116
  const indexes = new Map<LowerHex, TransactionIndex>()
103
117
  const endblock = toBlock
104
118
 
@@ -111,6 +125,7 @@ export const createEtherscan = ({
111
125
  startblock,
112
126
  endblock,
113
127
  offset: pageSize,
128
+ headers,
114
129
  })
115
130
  for (const index of result) {
116
131
  if (!indexes.has(index.hash)) {
@@ -133,6 +148,7 @@ export const createEtherscan = ({
133
148
  startblock,
134
149
  endblock,
135
150
  offset: pageSize,
151
+ headers,
136
152
  })
137
153
  for (const index of result) {
138
154
  if (!indexes.has(index.hash)) {
@@ -155,6 +171,7 @@ export const createEtherscan = ({
155
171
  startblock,
156
172
  endblock,
157
173
  offset: pageSize,
174
+ headers,
158
175
  })
159
176
  for (const index of result) {
160
177
  if (!indexes.has(index.hash)) {
@@ -170,26 +187,30 @@ export const createEtherscan = ({
170
187
 
171
188
  return [...indexes.values()]
172
189
  },
173
- getBlockNumberOfTimestamp: ({ timestamp }): Promise<number> =>
190
+ getBlockNumberOfTimestamp: ({ timestamp, headers }): Promise<number> =>
174
191
  getBlockNumberByTimestamp({
175
192
  client,
176
193
  timestamp: Math.floor(timestamp / 1000),
194
+ headers,
177
195
  }),
178
- getContract: ({ address }) =>
196
+ getContract: ({ address, headers }) =>
179
197
  getContractSourceCodeForVerifiedContract({
180
198
  client,
181
199
  address,
200
+ headers,
182
201
  }),
183
- getContractCreations: ({ addresses }) =>
202
+ getContractCreations: ({ addresses, headers }) =>
184
203
  getContractCreatorAndCreationTxHash({
185
204
  client,
186
205
  contractaddresses: addresses,
206
+ headers,
187
207
  }),
188
208
  getEventLogs: async ({
189
209
  address,
190
210
  topic0,
191
211
  fromBlock: fromBlockParam,
192
212
  toBlock,
213
+ headers,
193
214
  }) => {
194
215
  const logs: LogWithBlockNumber[] = []
195
216
  let fromBlock = fromBlockParam ?? 0
@@ -201,6 +222,7 @@ export const createEtherscan = ({
201
222
  topic0,
202
223
  fromBlock,
203
224
  toBlock,
225
+ headers,
204
226
  })
205
227
  logs.push(...result)
206
228
  if (result.length < maxPageSize) {
@@ -211,10 +233,11 @@ export const createEtherscan = ({
211
233
  }
212
234
  return logs
213
235
  },
214
- getInternalTransactionOfTransaction: ({ hash }) =>
236
+ getInternalTransactionOfTransaction: ({ hash, headers }) =>
215
237
  getInternalTransactionsByTransactionHash({
216
238
  client,
217
239
  txhash: hash,
240
+ headers,
218
241
  }),
219
242
  }
220
243
  }
@@ -6,6 +6,7 @@ type GetBlockNumberByTimestampParameters = {
6
6
  /** Unix timestamp in seconds */
7
7
  timestamp: number
8
8
  closest?: 'before' | 'after'
9
+ headers?: Record<string, string>
9
10
  }
10
11
 
11
12
  const resultSchema = z.string().regex(/^\d+$/).transform(Number)
@@ -15,6 +16,7 @@ export const getBlockNumberByTimestamp = async ({
15
16
  client,
16
17
  timestamp,
17
18
  closest = 'before',
19
+ headers,
18
20
  }: GetBlockNumberByTimestampParameters) => {
19
21
  const result = await client.get({
20
22
  path: '',
@@ -25,6 +27,7 @@ export const getBlockNumberByTimestamp = async ({
25
27
  closest,
26
28
  },
27
29
  resultSchema,
30
+ headers,
28
31
  })
29
32
  return result
30
33
  }
@@ -7,6 +7,7 @@ import type { EtherscanClient } from './client'
7
7
  type GetContractCreatorAndCreationTxHashParameters = {
8
8
  client: EtherscanClient
9
9
  contractaddresses: Hex[]
10
+ headers?: Record<string, string>
10
11
  }
11
12
 
12
13
  const contractCreationSchema = z.object({
@@ -20,6 +21,7 @@ const resultSchema = z.array(contractCreationSchema)
20
21
  export const getContractCreatorAndCreationTxHash = async ({
21
22
  client,
22
23
  contractaddresses,
24
+ headers,
23
25
  }: GetContractCreatorAndCreationTxHashParameters): Promise<
24
26
  ContractCreation[]
25
27
  > => {
@@ -32,6 +34,7 @@ export const getContractCreatorAndCreationTxHash = async ({
32
34
  contractaddresses: contractaddresses.join(','),
33
35
  },
34
36
  resultSchema,
37
+ headers,
35
38
  })
36
39
  return result
37
40
  } catch (error) {
@@ -6,6 +6,7 @@ import type { EtherscanClient } from './client'
6
6
  type GetContractSourceCodeForVerifiedContractParameters = {
7
7
  client: EtherscanClient
8
8
  address: Hex
9
+ headers?: Record<string, string>
9
10
  }
10
11
 
11
12
  const resultSchema = z.array(
@@ -19,6 +20,7 @@ const resultSchema = z.array(
19
20
  export const getContractSourceCodeForVerifiedContract = async ({
20
21
  client,
21
22
  address,
23
+ headers,
22
24
  }: GetContractSourceCodeForVerifiedContractParameters): Promise<
23
25
  Contract | undefined
24
26
  > => {
@@ -30,6 +32,7 @@ export const getContractSourceCodeForVerifiedContract = async ({
30
32
  address,
31
33
  },
32
34
  resultSchema,
35
+ headers,
33
36
  })
34
37
  if (result.length === 0) {
35
38
  return undefined
@@ -11,6 +11,7 @@ type GetEventLogsByAddressFilteredByTopicsParameters = {
11
11
  topic0: LowerHex
12
12
  fromBlock?: number
13
13
  toBlock?: number
14
+ headers?: Record<string, string>
14
15
  }
15
16
 
16
17
  const logSchema = z.object({
@@ -38,6 +39,7 @@ export const getEventLogsByAddressFilteredByTopics = async ({
38
39
  topic0,
39
40
  fromBlock,
40
41
  toBlock,
42
+ headers,
41
43
  }: GetEventLogsByAddressFilteredByTopicsParameters): Promise<
42
44
  LogWithBlockNumber[]
43
45
  > => {
@@ -53,6 +55,7 @@ export const getEventLogsByAddressFilteredByTopics = async ({
53
55
  ...(toBlock === undefined ? {} : { toBlock: toBlock.toString() }),
54
56
  },
55
57
  resultSchema,
58
+ headers,
56
59
  })
57
60
  return result
58
61
  } catch (error) {
@@ -7,6 +7,7 @@ import type { EtherscanClient } from './client'
7
7
  type GetInternalTransactionsByTransactionHashParameters = {
8
8
  client: EtherscanClient
9
9
  txhash: LowerHex
10
+ headers?: Record<string, string>
10
11
  }
11
12
 
12
13
  const internalTransactionSchema = z.object({
@@ -40,6 +41,7 @@ const resultSchema = z.array(internalTransactionSchema)
40
41
  export const getInternalTransactionsByTransactionHash = async ({
41
42
  client,
42
43
  txhash,
44
+ headers,
43
45
  }: GetInternalTransactionsByTransactionHashParameters): Promise<
44
46
  InternalTransactionWithIndex[]
45
47
  > => {
@@ -52,6 +54,7 @@ export const getInternalTransactionsByTransactionHash = async ({
52
54
  txhash,
53
55
  },
54
56
  resultSchema,
57
+ headers,
55
58
  })
56
59
  return result.map((v) => ({
57
60
  blockNumber: v.blockNumber,
@@ -11,6 +11,7 @@ type GetListOfErc1155TokenTransferEventsByAddressParameters = {
11
11
  page?: number
12
12
  offset?: number
13
13
  sort?: 'asc' | 'desc'
14
+ headers?: Record<string, string>
14
15
  }
15
16
 
16
17
  const transferSchema = z.object({
@@ -29,6 +30,7 @@ export const getListOfErc1155TokenTransferEventsByAddress = async ({
29
30
  page = 1,
30
31
  offset = 10_000,
31
32
  sort = 'asc',
33
+ headers,
32
34
  }: GetListOfErc1155TokenTransferEventsByAddressParameters): Promise<
33
35
  TransactionIndex[]
34
36
  > => {
@@ -50,6 +52,7 @@ export const getListOfErc1155TokenTransferEventsByAddress = async ({
50
52
  sort,
51
53
  },
52
54
  resultSchema,
55
+ headers,
53
56
  })
54
57
  return result.map((v) => ({
55
58
  blockNumber: v.blockNumber,
@@ -11,6 +11,7 @@ type GetListOfErc20TokenTransferEventsByAddressParameters = {
11
11
  page?: number
12
12
  offset?: number
13
13
  sort?: 'asc' | 'desc'
14
+ headers?: Record<string, string>
14
15
  }
15
16
 
16
17
  const transferSchema = z.object({
@@ -29,6 +30,7 @@ export const getListOfErc20TokenTransferEventsByAddress = async ({
29
30
  page = 1,
30
31
  offset = 10_000,
31
32
  sort = 'asc',
33
+ headers,
32
34
  }: GetListOfErc20TokenTransferEventsByAddressParameters): Promise<
33
35
  TransactionIndex[]
34
36
  > => {
@@ -50,6 +52,7 @@ export const getListOfErc20TokenTransferEventsByAddress = async ({
50
52
  sort,
51
53
  },
52
54
  resultSchema,
55
+ headers,
53
56
  })
54
57
  return result.map((v) => ({
55
58
  blockNumber: v.blockNumber,