@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.
- package/README.md +15 -0
- package/dist/import/abis/erc1155.d.ts +245 -0
- package/dist/import/abis/erc1155.d.ts.map +1 -0
- package/dist/import/abis/erc20.d.ts +169 -0
- package/dist/import/abis/erc20.d.ts.map +1 -0
- package/dist/import/abis/erc721.d.ts +267 -0
- package/dist/import/abis/erc721.d.ts.map +1 -0
- package/dist/import/abis/index.d.ts +5 -0
- package/dist/import/abis/index.d.ts.map +1 -0
- package/dist/import/abis/weth.d.ts +214 -0
- package/dist/import/abis/weth.d.ts.map +1 -0
- package/dist/import/absoluteValue.d.mts +3 -0
- package/dist/import/absoluteValue.d.mts.map +1 -0
- package/dist/import/absoluteValue.d.ts +3 -0
- package/dist/import/absoluteValue.d.ts.map +1 -0
- package/dist/import/analyzer/analyze.d.ts +18 -0
- package/dist/import/analyzer/analyze.d.ts.map +1 -0
- package/dist/import/analyzer/analyzer.d.ts +4 -0
- package/dist/import/analyzer/analyzer.d.ts.map +1 -0
- package/dist/import/analyzer/axieMarketplace/analyze.d.ts +4 -0
- package/dist/import/analyzer/axieMarketplace/analyze.d.ts.map +1 -0
- package/dist/import/analyzer/axieMarketplace/index.d.ts +2 -0
- package/dist/import/analyzer/axieMarketplace/index.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/addLiquidity.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/addLiquidity.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/atomicArbitrage.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/atomicArbitrage.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/bridgeFrom.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/bridgeFrom.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/bridgeTo.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/bridgeTo.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/buyNft.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/buyNft.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/createAccountActionByAction.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/createAccountActionByAction.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/deposit.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/deposit.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/depositWithBond.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/depositWithBond.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/freeMintNft.d.ts +53 -0
- package/dist/import/analyzer/createAccountActionByAction/freeMintNft.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/index.d.ts +2 -0
- package/dist/import/analyzer/createAccountActionByAction/index.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/removeLiquidity.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/removeLiquidity.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/spam.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/spam.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/trade.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/trade.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/transactionFee.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/transactionFee.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/transfer.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/transfer.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/withdraw.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/withdraw.d.ts.map +1 -0
- package/dist/import/analyzer/createAccountActionByAction/withdrawWithBond.d.ts +59 -0
- package/dist/import/analyzer/createAccountActionByAction/withdrawWithBond.d.ts.map +1 -0
- package/dist/import/analyzer/gasFee/analyze.d.ts +4 -0
- package/dist/import/analyzer/gasFee/analyze.d.ts.map +1 -0
- package/dist/import/analyzer/gasFee/index.d.ts +2 -0
- package/dist/import/analyzer/gasFee/index.d.ts.map +1 -0
- package/dist/import/analyzer/index.d.ts +10 -0
- package/dist/import/analyzer/index.d.ts.map +1 -0
- package/dist/import/analyzer/json/analyze.d.ts +5 -0
- package/dist/import/analyzer/json/analyze.d.ts.map +1 -0
- package/dist/import/analyzer/json/generatorAnyLog.d.ts +55 -0
- package/dist/import/analyzer/json/generatorAnyLog.d.ts.map +1 -0
- package/dist/import/analyzer/json/generatorAnyTokenTransfer.d.ts +54 -0
- package/dist/import/analyzer/json/generatorAnyTokenTransfer.d.ts.map +1 -0
- package/dist/import/analyzer/json/generatorSpecificTokenTransfer.d.ts +55 -0
- package/dist/import/analyzer/json/generatorSpecificTokenTransfer.d.ts.map +1 -0
- package/dist/import/analyzer/json/index.d.ts +2 -0
- package/dist/import/analyzer/json/index.d.ts.map +1 -0
- package/dist/import/analyzer/json/types.d.ts +177 -0
- package/dist/import/analyzer/json/types.d.ts.map +1 -0
- package/dist/import/analyzer/seaport/analyze.d.ts +4 -0
- package/dist/import/analyzer/seaport/analyze.d.ts.map +1 -0
- package/dist/import/analyzer/seaport/index.d.ts +2 -0
- package/dist/import/analyzer/seaport/index.d.ts.map +1 -0
- package/dist/import/analyzer/seaport/orderFulfilled.d.ts +139 -0
- package/dist/import/analyzer/seaport/orderFulfilled.d.ts.map +1 -0
- package/dist/import/analyzer/spam/analyze.d.ts +4 -0
- package/dist/import/analyzer/spam/analyze.d.ts.map +1 -0
- package/dist/import/analyzer/spam/index.d.ts +2 -0
- package/dist/import/analyzer/spam/index.d.ts.map +1 -0
- package/dist/import/analyzer/swap/analyze.d.ts +4 -0
- package/dist/import/analyzer/swap/analyze.d.ts.map +1 -0
- package/dist/import/analyzer/swap/index.d.ts +2 -0
- package/dist/import/analyzer/swap/index.d.ts.map +1 -0
- package/dist/import/analyzer/swap/traderJoeLBPairSwap.d.ts +108 -0
- package/dist/import/analyzer/swap/traderJoeLBPairSwap.d.ts.map +1 -0
- package/dist/import/analyzer/swap/univ2PairSwap.d.ts +84 -0
- package/dist/import/analyzer/swap/univ2PairSwap.d.ts.map +1 -0
- package/dist/import/analyzer/swap/univ3PoolSwap.d.ts +96 -0
- package/dist/import/analyzer/swap/univ3PoolSwap.d.ts.map +1 -0
- package/dist/import/analyzer/swap/wrappedDeposit.d.ts +36 -0
- package/dist/import/analyzer/swap/wrappedDeposit.d.ts.map +1 -0
- package/dist/import/analyzer/swap/wrappedWithdrawal.d.ts +36 -0
- package/dist/import/analyzer/swap/wrappedWithdrawal.d.ts.map +1 -0
- package/dist/import/analyzer/transfer/analyze.d.ts +4 -0
- package/dist/import/analyzer/transfer/analyze.d.ts.map +1 -0
- package/dist/import/analyzer/transfer/index.d.ts +2 -0
- package/dist/import/analyzer/transfer/index.d.ts.map +1 -0
- package/dist/import/analyzer/types.d.ts +17 -0
- package/dist/import/analyzer/types.d.ts.map +1 -0
- package/dist/import/apps/index.d.ts +2 -0
- package/dist/import/apps/index.d.ts.map +1 -0
- package/dist/import/apps/types.d.ts +6 -0
- package/dist/import/apps/types.d.ts.map +1 -0
- package/dist/import/chains/definitions/arbitrumOne.d.ts +99 -0
- package/dist/import/chains/definitions/arbitrumOne.d.ts.map +1 -0
- package/dist/import/chains/definitions/astar.d.ts +64 -0
- package/dist/import/chains/definitions/astar.d.ts.map +1 -0
- package/dist/import/chains/definitions/avalancheC.d.ts +84 -0
- package/dist/import/chains/definitions/avalancheC.d.ts.map +1 -0
- package/dist/import/chains/definitions/base.d.ts +94 -0
- package/dist/import/chains/definitions/base.d.ts.map +1 -0
- package/dist/import/chains/definitions/bsc.d.ts +144 -0
- package/dist/import/chains/definitions/bsc.d.ts.map +1 -0
- package/dist/import/chains/definitions/defineChain.d.ts +3 -0
- package/dist/import/chains/definitions/defineChain.d.ts.map +1 -0
- package/dist/import/chains/definitions/ethereum.d.ts +129 -0
- package/dist/import/chains/definitions/ethereum.d.ts.map +1 -0
- package/dist/import/chains/definitions/fantom.d.ts +89 -0
- package/dist/import/chains/definitions/fantom.d.ts.map +1 -0
- package/dist/import/chains/definitions/index.d.ts +16 -0
- package/dist/import/chains/definitions/index.d.ts.map +1 -0
- package/dist/import/chains/definitions/linea.d.ts +69 -0
- package/dist/import/chains/definitions/linea.d.ts.map +1 -0
- package/dist/import/chains/definitions/mantle.d.ts +62 -0
- package/dist/import/chains/definitions/mantle.d.ts.map +1 -0
- package/dist/import/chains/definitions/metis.d.ts +52 -0
- package/dist/import/chains/definitions/metis.d.ts.map +1 -0
- package/dist/import/chains/definitions/moonbeam.d.ts +84 -0
- package/dist/import/chains/definitions/moonbeam.d.ts.map +1 -0
- package/dist/import/chains/definitions/moonriver.d.ts +64 -0
- package/dist/import/chains/definitions/moonriver.d.ts.map +1 -0
- package/dist/import/chains/definitions/optimism.d.ts +104 -0
- package/dist/import/chains/definitions/optimism.d.ts.map +1 -0
- package/dist/import/chains/definitions/polygonPos.d.ts +84 -0
- package/dist/import/chains/definitions/polygonPos.d.ts.map +1 -0
- package/dist/import/chains/definitions/ronin.d.ts +49 -0
- package/dist/import/chains/definitions/ronin.d.ts.map +1 -0
- package/dist/import/chains/externals/defillama/constants.d.ts +2 -0
- package/dist/import/chains/externals/defillama/constants.d.ts.map +1 -0
- package/dist/import/chains/externals/defillama/getBlockOfTimestamp.d.ts +10 -0
- package/dist/import/chains/externals/defillama/getBlockOfTimestamp.d.ts.map +1 -0
- package/dist/import/chains/externals/defillama/index.d.ts +2 -0
- package/dist/import/chains/externals/defillama/index.d.ts.map +1 -0
- package/dist/import/chains/externals/index.d.ts +2 -0
- package/dist/import/chains/externals/index.d.ts.map +1 -0
- package/dist/import/chains/index.d.ts +4 -0
- package/dist/import/chains/index.d.ts.map +1 -0
- package/dist/import/chains/types/chain.d.ts +22 -0
- package/dist/import/chains/types/chain.d.ts.map +1 -0
- package/dist/import/chains/types/index.d.ts +3 -0
- package/dist/import/chains/types/index.d.ts.map +1 -0
- package/dist/import/chains/types/rpc.d.ts +7 -0
- package/dist/import/chains/types/rpc.d.ts.map +1 -0
- package/dist/import/clients/definitions/defineClient.d.ts +3 -0
- package/dist/import/clients/definitions/defineClient.d.ts.map +1 -0
- package/dist/import/clients/definitions/index.d.ts +2 -0
- package/dist/import/clients/definitions/index.d.ts.map +1 -0
- package/dist/import/clients/definitions/viemClient.d.ts +59 -0
- package/dist/import/clients/definitions/viemClient.d.ts.map +1 -0
- package/dist/import/clients/externals/viem/estimateFeesPerGas.d.ts +13 -0
- package/dist/import/clients/externals/viem/estimateFeesPerGas.d.ts.map +1 -0
- package/dist/import/clients/externals/viem/getBalance.d.ts +15 -0
- package/dist/import/clients/externals/viem/getBalance.d.ts.map +1 -0
- package/dist/import/clients/externals/viem/getBlock.d.ts +14 -0
- package/dist/import/clients/externals/viem/getBlock.d.ts.map +1 -0
- package/dist/import/clients/externals/viem/getBlockNumber.d.ts +13 -0
- package/dist/import/clients/externals/viem/getBlockNumber.d.ts.map +1 -0
- package/dist/import/clients/externals/viem/getEventLogs.d.ts +19 -0
- package/dist/import/clients/externals/viem/getEventLogs.d.ts.map +1 -0
- package/dist/import/clients/externals/viem/getTransaction.d.ts +15 -0
- package/dist/import/clients/externals/viem/getTransaction.d.ts.map +1 -0
- package/dist/import/clients/externals/viem/getTransactionCount.d.ts +15 -0
- package/dist/import/clients/externals/viem/getTransactionCount.d.ts.map +1 -0
- package/dist/import/clients/externals/viem/getTransactionReceipt.d.ts +15 -0
- package/dist/import/clients/externals/viem/getTransactionReceipt.d.ts.map +1 -0
- package/dist/import/clients/externals/viem/index.d.ts +11 -0
- package/dist/import/clients/externals/viem/index.d.ts.map +1 -0
- package/dist/import/clients/externals/viem/middleware.d.ts +23 -0
- package/dist/import/clients/externals/viem/middleware.d.ts.map +1 -0
- package/dist/import/clients/externals/viem/multicall.d.ts +14 -0
- package/dist/import/clients/externals/viem/multicall.d.ts.map +1 -0
- package/dist/import/clients/externals/viem/readContract.d.ts +14 -0
- package/dist/import/clients/externals/viem/readContract.d.ts.map +1 -0
- package/dist/import/clients/index.d.ts +3 -0
- package/dist/import/clients/index.d.ts.map +1 -0
- package/dist/import/clients/types.d.ts +64 -0
- package/dist/import/clients/types.d.ts.map +1 -0
- package/dist/import/createBigDecimal.d.mts +6 -0
- package/dist/import/createBigDecimal.d.mts.map +1 -0
- package/dist/import/createBigDecimal.d.ts +3 -0
- package/dist/import/createBigDecimal.d.ts.map +1 -0
- package/dist/import/creates/createEvmAccount.d.ts +5 -0
- package/dist/import/creates/createEvmAccount.d.ts.map +1 -0
- package/dist/import/decoder/decode.d.ts +3 -0
- package/dist/import/decoder/decode.d.ts.map +1 -0
- package/dist/import/decoder/decoder.d.ts +3 -0
- package/dist/import/decoder/decoder.d.ts.map +1 -0
- package/dist/import/decoder/index.d.ts +6 -0
- package/dist/import/decoder/index.d.ts.map +1 -0
- package/dist/import/decoder/parseErc1155TransferSingleLogs.d.ts +4 -0
- package/dist/import/decoder/parseErc1155TransferSingleLogs.d.ts.map +1 -0
- package/dist/import/decoder/parseErc20TransferLogs.d.ts +8 -0
- package/dist/import/decoder/parseErc20TransferLogs.d.ts.map +1 -0
- package/dist/import/decoder/parseErc721TransferLogs.d.ts +8 -0
- package/dist/import/decoder/parseErc721TransferLogs.d.ts.map +1 -0
- package/dist/import/decoder/types.d.ts +16 -0
- package/dist/import/decoder/types.d.ts.map +1 -0
- package/dist/import/divide.d.mts +8 -0
- package/dist/import/divide.d.mts.map +1 -0
- package/dist/import/divide.d.ts +3 -0
- package/dist/import/divide.d.ts.map +1 -0
- package/dist/import/equals.d.mts +3 -0
- package/dist/import/equals.d.mts.map +1 -0
- package/dist/import/equals.d.ts +3 -0
- package/dist/import/equals.d.ts.map +1 -0
- package/dist/import/explorers/definitions/blockscout.d.ts +60 -0
- package/dist/import/explorers/definitions/blockscout.d.ts.map +1 -0
- package/dist/import/explorers/definitions/defineExplorer.d.ts +3 -0
- package/dist/import/explorers/definitions/defineExplorer.d.ts.map +1 -0
- package/dist/import/explorers/definitions/etherscan.d.ts +61 -0
- package/dist/import/explorers/definitions/etherscan.d.ts.map +1 -0
- package/dist/import/explorers/definitions/index.d.ts +5 -0
- package/dist/import/explorers/definitions/index.d.ts.map +1 -0
- package/dist/import/explorers/definitions/roninExplorer.d.ts +62 -0
- package/dist/import/explorers/definitions/roninExplorer.d.ts.map +1 -0
- package/dist/import/explorers/definitions/routescan.d.ts +19 -0
- package/dist/import/explorers/definitions/routescan.d.ts.map +1 -0
- package/dist/import/explorers/externals/blockscout/getBlockNumberOfTimestamp.d.ts +11 -0
- package/dist/import/explorers/externals/blockscout/getBlockNumberOfTimestamp.d.ts.map +1 -0
- package/dist/import/explorers/externals/blockscout/getContractByAddress.d.ts +30 -0
- package/dist/import/explorers/externals/blockscout/getContractByAddress.d.ts.map +1 -0
- package/dist/import/explorers/externals/blockscout/getInternalTransactionsByAddress.d.ts +62 -0
- package/dist/import/explorers/externals/blockscout/getInternalTransactionsByAddress.d.ts.map +1 -0
- package/dist/import/explorers/externals/blockscout/getInternalTransactionsByTransactionHash.d.ts +54 -0
- package/dist/import/explorers/externals/blockscout/getInternalTransactionsByTransactionHash.d.ts.map +1 -0
- package/dist/import/explorers/externals/blockscout/getNormalTransactionsByAddress.d.ts +77 -0
- package/dist/import/explorers/externals/blockscout/getNormalTransactionsByAddress.d.ts.map +1 -0
- package/dist/import/explorers/externals/blockscout/getTokenTransfersByAddress.d.ts +80 -0
- package/dist/import/explorers/externals/blockscout/getTokenTransfersByAddress.d.ts.map +1 -0
- package/dist/import/explorers/externals/blockscout/index.d.ts +7 -0
- package/dist/import/explorers/externals/blockscout/index.d.ts.map +1 -0
- package/dist/import/explorers/externals/blockscout/middleware.d.ts +7 -0
- package/dist/import/explorers/externals/blockscout/middleware.d.ts.map +1 -0
- package/dist/import/explorers/externals/etherscan/getBlockNumberOfTimestamp.d.ts +12 -0
- package/dist/import/explorers/externals/etherscan/getBlockNumberOfTimestamp.d.ts.map +1 -0
- package/dist/import/explorers/externals/etherscan/getContractByAddress.d.ts +55 -0
- package/dist/import/explorers/externals/etherscan/getContractByAddress.d.ts.map +1 -0
- package/dist/import/explorers/externals/etherscan/getErc1155TokenTransfersByAddress.d.ts +83 -0
- package/dist/import/explorers/externals/etherscan/getErc1155TokenTransfersByAddress.d.ts.map +1 -0
- package/dist/import/explorers/externals/etherscan/getErc20TokenTransfersByAddress.d.ts +81 -0
- package/dist/import/explorers/externals/etherscan/getErc20TokenTransfersByAddress.d.ts.map +1 -0
- package/dist/import/explorers/externals/etherscan/getErc721TokenTransfersByAddress.d.ts +81 -0
- package/dist/import/explorers/externals/etherscan/getErc721TokenTransfersByAddress.d.ts.map +1 -0
- package/dist/import/explorers/externals/etherscan/getInternalTransactionsByAddress.d.ts +62 -0
- package/dist/import/explorers/externals/etherscan/getInternalTransactionsByAddress.d.ts.map +1 -0
- package/dist/import/explorers/externals/etherscan/getInternalTransactionsByTransactionHash.d.ts +55 -0
- package/dist/import/explorers/externals/etherscan/getInternalTransactionsByTransactionHash.d.ts.map +1 -0
- package/dist/import/explorers/externals/etherscan/getNormalTransactionsByAddress.d.ts +84 -0
- package/dist/import/explorers/externals/etherscan/getNormalTransactionsByAddress.d.ts.map +1 -0
- package/dist/import/explorers/externals/etherscan/index.d.ts +9 -0
- package/dist/import/explorers/externals/etherscan/index.d.ts.map +1 -0
- package/dist/import/explorers/externals/etherscan/middleware.d.ts +7 -0
- package/dist/import/explorers/externals/etherscan/middleware.d.ts.map +1 -0
- package/dist/import/explorers/externals/roninExplorer/getInternalTransactionByHash.d.ts +57 -0
- package/dist/import/explorers/externals/roninExplorer/getInternalTransactionByHash.d.ts.map +1 -0
- package/dist/import/explorers/externals/roninExplorer/getNormalTransactionsByAddress.d.ts +70 -0
- package/dist/import/explorers/externals/roninExplorer/getNormalTransactionsByAddress.d.ts.map +1 -0
- package/dist/import/explorers/externals/roninExplorer/getTokenTransfersByAddress.d.ts +64 -0
- package/dist/import/explorers/externals/roninExplorer/getTokenTransfersByAddress.d.ts.map +1 -0
- package/dist/import/explorers/externals/roninExplorer/index.d.ts +4 -0
- package/dist/import/explorers/externals/roninExplorer/index.d.ts.map +1 -0
- package/dist/import/explorers/externals/roninExplorer/middleware.d.ts +5 -0
- package/dist/import/explorers/externals/roninExplorer/middleware.d.ts.map +1 -0
- package/dist/import/explorers/index.d.ts +3 -0
- package/dist/import/explorers/index.d.ts.map +1 -0
- package/dist/import/explorers/types.d.ts +43 -0
- package/dist/import/explorers/types.d.ts.map +1 -0
- package/dist/import/fix.d.mts +7 -0
- package/dist/import/fix.d.mts.map +1 -0
- package/dist/import/fix.d.ts +3 -0
- package/dist/import/fix.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/getAccountsTransactionFulls.d.ts +15 -0
- package/dist/import/getAccountsTransactionFulls/getAccountsTransactionFulls.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/getAccountsTransactionFullsCustom.d.ts +4 -0
- package/dist/import/getAccountsTransactionFulls/getAccountsTransactionFullsCustom.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/getDecodedTransactionsPrices.d.ts +5 -0
- package/dist/import/getAccountsTransactionFulls/getDecodedTransactionsPrices.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/getHashesAndInternalTxs.d.ts +8 -0
- package/dist/import/getAccountsTransactionFulls/getHashesAndInternalTxs.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/getTransactionDetail.d.ts +5 -0
- package/dist/import/getAccountsTransactionFulls/getTransactionDetail.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/getTransactionDetails.d.ts +5 -0
- package/dist/import/getAccountsTransactionFulls/getTransactionDetails.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/getTransactionsApps.d.ts +8 -0
- package/dist/import/getAccountsTransactionFulls/getTransactionsApps.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/index.d.ts +3 -0
- package/dist/import/getAccountsTransactionFulls/index.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/types.d.ts +87 -0
- package/dist/import/getAccountsTransactionFulls/types.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/withD.d.ts +4 -0
- package/dist/import/getAccountsTransactionFulls/withD.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/withDA.d.ts +4 -0
- package/dist/import/getAccountsTransactionFulls/withDA.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/withP.d.ts +4 -0
- package/dist/import/getAccountsTransactionFulls/withP.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/withPD.d.ts +4 -0
- package/dist/import/getAccountsTransactionFulls/withPD.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/withPDA.d.ts +4 -0
- package/dist/import/getAccountsTransactionFulls/withPDA.d.ts.map +1 -0
- package/dist/import/getAccountsTransactionFulls/withUndefined.d.ts +4 -0
- package/dist/import/getAccountsTransactionFulls/withUndefined.d.ts.map +1 -0
- package/dist/import/getTransactionFull/getTransactionDetail.d.ts +5 -0
- package/dist/import/getTransactionFull/getTransactionDetail.d.ts.map +1 -0
- package/dist/import/getTransactionFull/getTransactionFull.d.ts +11 -0
- package/dist/import/getTransactionFull/getTransactionFull.d.ts.map +1 -0
- package/dist/import/getTransactionFull/getTransactionFullCustom.d.ts +4 -0
- package/dist/import/getTransactionFull/getTransactionFullCustom.d.ts.map +1 -0
- package/dist/import/getTransactionFull/index.d.ts +3 -0
- package/dist/import/getTransactionFull/index.d.ts.map +1 -0
- package/dist/import/getTransactionFull/types.d.ts +63 -0
- package/dist/import/getTransactionFull/types.d.ts.map +1 -0
- package/dist/import/getTransactionFull/withD.d.ts +4 -0
- package/dist/import/getTransactionFull/withD.d.ts.map +1 -0
- package/dist/import/getTransactionFull/withDA.d.ts +4 -0
- package/dist/import/getTransactionFull/withDA.d.ts.map +1 -0
- package/dist/import/getTransactionFull/withP.d.ts +4 -0
- package/dist/import/getTransactionFull/withP.d.ts.map +1 -0
- package/dist/import/getTransactionFull/withPD.d.ts +4 -0
- package/dist/import/getTransactionFull/withPD.d.ts.map +1 -0
- package/dist/import/getTransactionFull/withPDA.d.ts +4 -0
- package/dist/import/getTransactionFull/withPDA.d.ts.map +1 -0
- package/dist/import/getTransactionFull/withUndefined.d.ts +4 -0
- package/dist/import/getTransactionFull/withUndefined.d.ts.map +1 -0
- package/dist/import/greaterThan.d.mts +3 -0
- package/dist/import/greaterThan.d.mts.map +1 -0
- package/dist/import/greaterThan.d.ts +3 -0
- package/dist/import/greaterThan.d.ts.map +1 -0
- package/dist/import/index.d.mts +15 -0
- package/dist/import/index.d.mts.map +1 -0
- package/dist/import/index.d.ts +11 -0
- package/dist/import/index.d.ts.map +1 -0
- package/dist/import/index.mjs +1 -0
- package/dist/import/minus.d.mts +3 -0
- package/dist/import/minus.d.mts.map +1 -0
- package/dist/import/minus.d.ts +3 -0
- package/dist/import/minus.d.ts.map +1 -0
- package/dist/import/plus.d.mts +3 -0
- package/dist/import/plus.d.mts.map +1 -0
- package/dist/import/plus.d.ts +3 -0
- package/dist/import/plus.d.ts.map +1 -0
- package/dist/import/removeTrailingZeros.d.mts +6 -0
- package/dist/import/removeTrailingZeros.d.mts.map +1 -0
- package/dist/import/removeTrailingZeros.d.ts +3 -0
- package/dist/import/removeTrailingZeros.d.ts.map +1 -0
- package/dist/import/times.d.ts +3 -0
- package/dist/import/times.d.ts.map +1 -0
- package/dist/import/toStringBigDecimal.d.mts +6 -0
- package/dist/import/toStringBigDecimal.d.mts.map +1 -0
- package/dist/import/toStringBigDecimal.d.ts +3 -0
- package/dist/import/toStringBigDecimal.d.ts.map +1 -0
- package/dist/import/type.d.mts +5 -0
- package/dist/import/type.d.mts.map +1 -0
- package/dist/import/type.d.ts +5 -0
- package/dist/import/type.d.ts.map +1 -0
- package/dist/import/types/erc1155.d.ts +16 -0
- package/dist/import/types/erc1155.d.ts.map +1 -0
- package/dist/import/types/erc20.d.ts +19 -0
- package/dist/import/types/erc20.d.ts.map +1 -0
- package/dist/import/types/erc721.d.ts +18 -0
- package/dist/import/types/erc721.d.ts.map +1 -0
- package/dist/import/types/evmAccount.d.ts +10 -0
- package/dist/import/types/evmAccount.d.ts.map +1 -0
- package/dist/import/types/hex.d.ts +5 -0
- package/dist/import/types/hex.d.ts.map +1 -0
- package/dist/import/types/index.d.ts +12 -0
- package/dist/import/types/index.d.ts.map +1 -0
- package/dist/import/types/input.d.ts +26 -0
- package/dist/import/types/input.d.ts.map +1 -0
- package/dist/import/types/internalTransaction.d.ts +18 -0
- package/dist/import/types/internalTransaction.d.ts.map +1 -0
- package/dist/import/types/log.d.ts +118 -0
- package/dist/import/types/log.d.ts.map +1 -0
- package/dist/import/types/transaction.d.ts +44 -0
- package/dist/import/types/transaction.d.ts.map +1 -0
- package/dist/import/utils/bigint.d.ts +3 -0
- package/dist/import/utils/bigint.d.ts.map +1 -0
- package/dist/import/utils/index.d.ts +4 -0
- package/dist/import/utils/index.d.ts.map +1 -0
- package/dist/import/utils/timeout.d.ts +2 -0
- package/dist/import/utils/timeout.d.ts.map +1 -0
- package/dist/import/utils/types.d.ts +12 -0
- package/dist/import/utils/types.d.ts.map +1 -0
- package/dist/require/absoluteValue.d.ts +3 -0
- package/dist/require/absoluteValue.d.ts.map +1 -0
- package/dist/require/createBigDecimal.d.ts +6 -0
- package/dist/require/createBigDecimal.d.ts.map +1 -0
- package/dist/require/divide.d.ts +2 -0
- package/dist/require/divide.d.ts.map +1 -0
- package/dist/require/equals.d.ts +3 -0
- package/dist/require/equals.d.ts.map +1 -0
- package/dist/require/fix.d.ts +7 -0
- package/dist/require/fix.d.ts.map +1 -0
- package/dist/require/greaterThan.d.ts +3 -0
- package/dist/require/greaterThan.d.ts.map +1 -0
- package/dist/require/index.cjs +46 -0
- package/dist/require/index.d.cts +2 -0
- package/dist/require/index.d.cts.map +1 -0
- package/dist/require/index.d.ts +11 -0
- package/dist/require/index.d.ts.map +1 -0
- package/dist/require/minus.d.ts +3 -0
- package/dist/require/minus.d.ts.map +1 -0
- package/dist/require/plus.d.ts +3 -0
- package/dist/require/plus.d.ts.map +1 -0
- package/dist/require/removeTrailingZeros.d.ts +6 -0
- package/dist/require/removeTrailingZeros.d.ts.map +1 -0
- package/dist/require/times.d.ts +8 -0
- package/dist/require/times.d.ts.map +1 -0
- package/dist/require/toStringBigDecimal.d.ts +6 -0
- package/dist/require/toStringBigDecimal.d.ts.map +1 -0
- package/dist/require/type.d.ts +5 -0
- package/dist/require/type.d.ts.map +1 -0
- package/package.json +85 -0
- package/src/abis/erc1155.ts +314 -0
- package/src/abis/erc20.ts +222 -0
- package/src/abis/erc721.ts +346 -0
- package/src/abis/index.ts +4 -0
- package/src/abis/weth.ts +153 -0
- package/src/analyzer/analyze.ts +85 -0
- package/src/analyzer/analyzer.ts +5 -0
- package/src/analyzer/axieMarketplace/analyze.ts +326 -0
- package/src/analyzer/axieMarketplace/index.ts +1 -0
- package/src/analyzer/createAccountActionByAction/addLiquidity.ts +60 -0
- package/src/analyzer/createAccountActionByAction/atomicArbitrage.ts +115 -0
- package/src/analyzer/createAccountActionByAction/bridgeFrom.ts +61 -0
- package/src/analyzer/createAccountActionByAction/bridgeTo.ts +61 -0
- package/src/analyzer/createAccountActionByAction/buyNft.ts +106 -0
- package/src/analyzer/createAccountActionByAction/createAccountActionByAction.ts +181 -0
- package/src/analyzer/createAccountActionByAction/deposit.ts +64 -0
- package/src/analyzer/createAccountActionByAction/depositWithBond.ts +60 -0
- package/src/analyzer/createAccountActionByAction/freeMintNft.ts +54 -0
- package/src/analyzer/createAccountActionByAction/index.ts +1 -0
- package/src/analyzer/createAccountActionByAction/removeLiquidity.ts +60 -0
- package/src/analyzer/createAccountActionByAction/spam.ts +79 -0
- package/src/analyzer/createAccountActionByAction/trade.ts +105 -0
- package/src/analyzer/createAccountActionByAction/transactionFee.ts +51 -0
- package/src/analyzer/createAccountActionByAction/transfer.ts +95 -0
- package/src/analyzer/createAccountActionByAction/withdraw.ts +61 -0
- package/src/analyzer/createAccountActionByAction/withdrawWithBond.ts +60 -0
- package/src/analyzer/gasFee/analyze.test.ts +6 -0
- package/src/analyzer/gasFee/analyze.ts +72 -0
- package/src/analyzer/gasFee/index.ts +1 -0
- package/src/analyzer/index.ts +9 -0
- package/src/analyzer/json/analyze.test.ts +1819 -0
- package/src/analyzer/json/analyze.ts +536 -0
- package/src/analyzer/json/generatorAnyLog.ts +207 -0
- package/src/analyzer/json/generatorAnyTokenTransfer.ts +118 -0
- package/src/analyzer/json/generatorSpecificTokenTransfer.ts +425 -0
- package/src/analyzer/json/index.ts +1 -0
- package/src/analyzer/json/types.ts +239 -0
- package/src/analyzer/seaport/analyze.test.ts +2323 -0
- package/src/analyzer/seaport/analyze.ts +917 -0
- package/src/analyzer/seaport/index.ts +1 -0
- package/src/analyzer/seaport/orderFulfilled.ts +131 -0
- package/src/analyzer/spam/analyze.ts +219 -0
- package/src/analyzer/spam/index.ts +1 -0
- package/src/analyzer/swap/analyze.test.ts +2401 -0
- package/src/analyzer/swap/analyze.ts +939 -0
- package/src/analyzer/swap/index.ts +1 -0
- package/src/analyzer/swap/traderJoeLBPairSwap.ts +92 -0
- package/src/analyzer/swap/univ2PairSwap.ts +77 -0
- package/src/analyzer/swap/univ3PoolSwap.ts +83 -0
- package/src/analyzer/swap/wrappedDeposit.ts +51 -0
- package/src/analyzer/swap/wrappedWithdrawal.ts +53 -0
- package/src/analyzer/tests.ts +2 -0
- package/src/analyzer/transfer/analyze.test.ts +6 -0
- package/src/analyzer/transfer/analyze.ts +209 -0
- package/src/analyzer/transfer/index.ts +1 -0
- package/src/analyzer/types.ts +44 -0
- package/src/apps/index.ts +1 -0
- package/src/apps/types.ts +10 -0
- package/src/chains/definitions/arbitrumOne.test.ts +50 -0
- package/src/chains/definitions/arbitrumOne.ts +133 -0
- package/src/chains/definitions/astar.test.ts +51 -0
- package/src/chains/definitions/astar.ts +93 -0
- package/src/chains/definitions/avalancheC.test.ts +50 -0
- package/src/chains/definitions/avalancheC.ts +115 -0
- package/src/chains/definitions/base.test.ts +50 -0
- package/src/chains/definitions/base.ts +125 -0
- package/src/chains/definitions/bsc.test.ts +50 -0
- package/src/chains/definitions/bsc.ts +182 -0
- package/src/chains/definitions/defineChain.ts +7 -0
- package/src/chains/definitions/ethereum.test.ts +50 -0
- package/src/chains/definitions/ethereum.ts +169 -0
- package/src/chains/definitions/fantom.test.ts +50 -0
- package/src/chains/definitions/fantom.ts +123 -0
- package/src/chains/definitions/index.ts +88 -0
- package/src/chains/definitions/linea.test.ts +50 -0
- package/src/chains/definitions/linea.ts +95 -0
- package/src/chains/definitions/mantle.test.ts +50 -0
- package/src/chains/definitions/mantle.ts +75 -0
- package/src/chains/definitions/metis.test.ts +50 -0
- package/src/chains/definitions/metis.ts +60 -0
- package/src/chains/definitions/moonbeam.test.ts +50 -0
- package/src/chains/definitions/moonbeam.ts +117 -0
- package/src/chains/definitions/moonriver.test.ts +50 -0
- package/src/chains/definitions/moonriver.ts +94 -0
- package/src/chains/definitions/optimism.test.ts +50 -0
- package/src/chains/definitions/optimism.ts +139 -0
- package/src/chains/definitions/polygonPos.test.ts +50 -0
- package/src/chains/definitions/polygonPos.ts +121 -0
- package/src/chains/definitions/ronin.test.ts +50 -0
- package/src/chains/definitions/ronin.ts +75 -0
- package/src/chains/definitions/tests.ts +2884 -0
- package/src/chains/externals/defillama/constants.ts +1 -0
- package/src/chains/externals/defillama/getBlockOfTimestamp.test.ts +12 -0
- package/src/chains/externals/defillama/getBlockOfTimestamp.ts +26 -0
- package/src/chains/externals/defillama/index.ts +1 -0
- package/src/chains/externals/index.ts +1 -0
- package/src/chains/index.ts +62 -0
- package/src/chains/types/chain.ts +22 -0
- package/src/chains/types/index.ts +2 -0
- package/src/chains/types/rpc.ts +6 -0
- package/src/clients/definitions/defineClient.ts +7 -0
- package/src/clients/definitions/index.ts +1 -0
- package/src/clients/definitions/viemClient.ts +86 -0
- package/src/clients/externals/viem/estimateFeesPerGas.ts +23 -0
- package/src/clients/externals/viem/getBalance.ts +25 -0
- package/src/clients/externals/viem/getBlock.ts +29 -0
- package/src/clients/externals/viem/getBlockNumber.ts +23 -0
- package/src/clients/externals/viem/getEventLogs.test.ts +22 -0
- package/src/clients/externals/viem/getEventLogs.ts +40 -0
- package/src/clients/externals/viem/getTransaction.ts +25 -0
- package/src/clients/externals/viem/getTransactionCount.ts +25 -0
- package/src/clients/externals/viem/getTransactionReceipt.ts +25 -0
- package/src/clients/externals/viem/index.ts +10 -0
- package/src/clients/externals/viem/middleware.ts +437 -0
- package/src/clients/externals/viem/multicall.test.ts +26 -0
- package/src/clients/externals/viem/multicall.ts +27 -0
- package/src/clients/externals/viem/readContract.test.ts +20 -0
- package/src/clients/externals/viem/readContract.ts +38 -0
- package/src/clients/externals/viem/tests.ts +957 -0
- package/src/clients/index.ts +2 -0
- package/src/clients/types.ts +113 -0
- package/src/creates/createEvmAccount.ts +12 -0
- package/src/decoder/decode.test.ts +324 -0
- package/src/decoder/decode.ts +716 -0
- package/src/decoder/decoder.ts +6 -0
- package/src/decoder/index.ts +5 -0
- package/src/decoder/parseErc1155TransferSingleLogs.ts +40 -0
- package/src/decoder/parseErc20TransferLogs.ts +35 -0
- package/src/decoder/parseErc721TransferLogs.ts +40 -0
- package/src/decoder/tests.ts +502 -0
- package/src/decoder/types.ts +21 -0
- package/src/explorers/definitions/blockscout.test.ts +124 -0
- package/src/explorers/definitions/blockscout.ts +205 -0
- package/src/explorers/definitions/defineExplorer.ts +7 -0
- package/src/explorers/definitions/etherscan.test.ts +123 -0
- package/src/explorers/definitions/etherscan.ts +279 -0
- package/src/explorers/definitions/index.ts +4 -0
- package/src/explorers/definitions/roninExplorer.ts +150 -0
- package/src/explorers/definitions/routescan.ts +57 -0
- package/src/explorers/externals/blockscout/getBlockNumberOfTimestamp.ts +67 -0
- package/src/explorers/externals/blockscout/getContractByAddress.ts +81 -0
- package/src/explorers/externals/blockscout/getInternalTransactionsByAddress.ts +120 -0
- package/src/explorers/externals/blockscout/getInternalTransactionsByTransactionHash.ts +87 -0
- package/src/explorers/externals/blockscout/getNormalTransactionsByAddress.ts +116 -0
- package/src/explorers/externals/blockscout/getTokenTransfersByAddress.ts +127 -0
- package/src/explorers/externals/blockscout/index.ts +6 -0
- package/src/explorers/externals/blockscout/middleware.ts +56 -0
- package/src/explorers/externals/defillama/getBlockNumberOfTimestamp.ts +28 -0
- package/src/explorers/externals/defillama/index.ts +1 -0
- package/src/explorers/externals/etherscan/getBlockNumberOfTimestamp.ts +66 -0
- package/src/explorers/externals/etherscan/getContractByAddress.ts +86 -0
- package/src/explorers/externals/etherscan/getErc1155TokenTransfersByAddress.ts +133 -0
- package/src/explorers/externals/etherscan/getErc20TokenTransfersByAddress.ts +125 -0
- package/src/explorers/externals/etherscan/getErc721TokenTransfersByAddress.ts +125 -0
- package/src/explorers/externals/etherscan/getInternalTransactionsByAddress.ts +117 -0
- package/src/explorers/externals/etherscan/getInternalTransactionsByTransactionHash.ts +91 -0
- package/src/explorers/externals/etherscan/getNormalTransactionsByAddress.ts +122 -0
- package/src/explorers/externals/etherscan/index.ts +8 -0
- package/src/explorers/externals/etherscan/middleware.ts +77 -0
- package/src/explorers/externals/roninExplorer/getInternalTransactionByHash.ts +80 -0
- package/src/explorers/externals/roninExplorer/getNormalTransactionsByAddress.ts +79 -0
- package/src/explorers/externals/roninExplorer/getTokenTransfersByAddress.ts +81 -0
- package/src/explorers/externals/roninExplorer/index.ts +3 -0
- package/src/explorers/externals/roninExplorer/middleware.ts +49 -0
- package/src/explorers/index.ts +7 -0
- package/src/explorers/types.ts +56 -0
- package/src/getAccountsTransactionFulls/getAccountsTransactionFulls.test.ts +22 -0
- package/src/getAccountsTransactionFulls/getAccountsTransactionFulls.ts +46 -0
- package/src/getAccountsTransactionFulls/getAccountsTransactionFullsCustom.ts +106 -0
- package/src/getAccountsTransactionFulls/getDecodedTransactionsPrices.ts +97 -0
- package/src/getAccountsTransactionFulls/getHashesAndInternalTxs.ts +65 -0
- package/src/getAccountsTransactionFulls/getTransactionDetail.ts +49 -0
- package/src/getAccountsTransactionFulls/getTransactionDetails.ts +39 -0
- package/src/getAccountsTransactionFulls/getTransactionsApps.ts +42 -0
- package/src/getAccountsTransactionFulls/index.ts +2 -0
- package/src/getAccountsTransactionFulls/types.ts +122 -0
- package/src/getAccountsTransactionFulls/withD.ts +80 -0
- package/src/getAccountsTransactionFulls/withDA.ts +112 -0
- package/src/getAccountsTransactionFulls/withP.ts +120 -0
- package/src/getAccountsTransactionFulls/withPD.ts +141 -0
- package/src/getAccountsTransactionFulls/withPDA.ts +167 -0
- package/src/getAccountsTransactionFulls/withUndefined.ts +88 -0
- package/src/getContractAbi.ts +15 -0
- package/src/getTransactionFull/getTransactionDetail.ts +47 -0
- package/src/getTransactionFull/getTransactionFull.test.ts +34 -0
- package/src/getTransactionFull/getTransactionFull.ts +30 -0
- package/src/getTransactionFull/getTransactionFullCustom.ts +91 -0
- package/src/getTransactionFull/index.ts +2 -0
- package/src/getTransactionFull/types.ts +98 -0
- package/src/getTransactionFull/withD.ts +57 -0
- package/src/getTransactionFull/withDA.ts +78 -0
- package/src/getTransactionFull/withP.ts +69 -0
- package/src/getTransactionFull/withPD.ts +119 -0
- package/src/getTransactionFull/withPDA.ts +147 -0
- package/src/getTransactionFull/withUndefined.ts +39 -0
- package/src/index.cts +1 -0
- package/src/index.mts +110 -0
- package/src/tests.ts +1 -0
- package/src/types/erc1155.ts +17 -0
- package/src/types/erc20.ts +22 -0
- package/src/types/erc721.ts +19 -0
- package/src/types/evmAccount.ts +12 -0
- package/src/types/hex.test.ts +10 -0
- package/src/types/hex.ts +9 -0
- package/src/types/index.ts +16 -0
- package/src/types/input.ts +27 -0
- package/src/types/internalTransaction.ts +19 -0
- package/src/types/log.ts +68 -0
- package/src/types/transaction.ts +78 -0
- package/src/utils/bigint.ts +5 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/timeout.ts +5 -0
- package/src/utils/types.ts +12 -0
- package/tsconfig.json +28 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { ethereum } from '@0xtorch/core'
|
|
2
|
+
import { describe, expect, it } from 'bun:test'
|
|
3
|
+
import { isIntegrationTest } from '../../tests'
|
|
4
|
+
import { createBlockscout } from './blockscout'
|
|
5
|
+
|
|
6
|
+
const univ2RouterAddress = '0x7a250d5630b4cf539739df2c5dacb4c659f2488d'
|
|
7
|
+
const wethAddress = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
|
|
8
|
+
const vitalikEthAddress = '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
|
|
9
|
+
|
|
10
|
+
describe.if(isIntegrationTest)('blockscout.getAddressTransactionHashes', () => {
|
|
11
|
+
it('should return transaction hashes', async () => {
|
|
12
|
+
const blockscout = createBlockscout({
|
|
13
|
+
name: 'Ethereum Explorer',
|
|
14
|
+
url: 'https://eth.blockscout.com',
|
|
15
|
+
apiUrl: 'https://eth.blockscout.com/api',
|
|
16
|
+
})
|
|
17
|
+
const hashes = await blockscout.getAddressTransactionHashes({
|
|
18
|
+
address: univ2RouterAddress,
|
|
19
|
+
startBlock: 19_000_000n,
|
|
20
|
+
endBlock: 19_010_000n,
|
|
21
|
+
})
|
|
22
|
+
expect(hashes.length).toBeGreaterThan(12_500)
|
|
23
|
+
expect(hashes.length).toBeLessThan(12_600)
|
|
24
|
+
// expect(hashes).toHaveLength(12_520)
|
|
25
|
+
}, 60_000)
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
describe.if(isIntegrationTest)(
|
|
29
|
+
'blockscout.getAddressInternalTransactions',
|
|
30
|
+
() => {
|
|
31
|
+
it('should return internal transaction hashes', async () => {
|
|
32
|
+
const blockscout = createBlockscout({
|
|
33
|
+
name: 'Ethereum Explorer',
|
|
34
|
+
url: 'https://eth.blockscout.com',
|
|
35
|
+
apiUrl: 'https://eth.blockscout.com/api',
|
|
36
|
+
})
|
|
37
|
+
const transactions = await blockscout.getAddressInternalTransactions({
|
|
38
|
+
address: univ2RouterAddress,
|
|
39
|
+
startBlock: 19_000_000n,
|
|
40
|
+
endBlock: 19_003_000n,
|
|
41
|
+
nativeCurrency: ethereum,
|
|
42
|
+
})
|
|
43
|
+
expect(transactions.length).toBeGreaterThan(10_000)
|
|
44
|
+
expect(transactions.length).toBeLessThan(20_100)
|
|
45
|
+
// expect(transactions).toHaveLength(10_007)
|
|
46
|
+
}, 60_000)
|
|
47
|
+
},
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
describe.if(isIntegrationTest)(
|
|
51
|
+
'blockscout.getAddressTokenTransferHashes',
|
|
52
|
+
() => {
|
|
53
|
+
it('should return token transfer tx hashes', async () => {
|
|
54
|
+
const blockscout = createBlockscout({
|
|
55
|
+
name: 'Ethereum Explorer',
|
|
56
|
+
url: 'https://eth.blockscout.com',
|
|
57
|
+
apiUrl: 'https://eth.blockscout.com/api',
|
|
58
|
+
})
|
|
59
|
+
const hashes = await blockscout.getAddressTokenTransferHashes({
|
|
60
|
+
address: univ2RouterAddress,
|
|
61
|
+
startBlock: 18_870_000n,
|
|
62
|
+
endBlock: 18_880_000n,
|
|
63
|
+
})
|
|
64
|
+
expect(hashes).toHaveLength(4373)
|
|
65
|
+
}, 60_000)
|
|
66
|
+
},
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
describe.if(isIntegrationTest)('blockscout.getBlockNumberOfTimestamp', () => {
|
|
70
|
+
it('should return block number', async () => {
|
|
71
|
+
const blockscout = createBlockscout({
|
|
72
|
+
name: 'Ethereum Explorer',
|
|
73
|
+
url: 'https://eth.blockscout.com',
|
|
74
|
+
apiUrl: 'https://eth.blockscout.com/api',
|
|
75
|
+
})
|
|
76
|
+
const blockNumber =
|
|
77
|
+
await blockscout.getBlockNumberOfTimestamp(1_705_462_847)
|
|
78
|
+
expect(blockNumber).toBe(19_023_982n)
|
|
79
|
+
}, 60_000)
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
describe.if(isIntegrationTest)('blockscout.getContract', () => {
|
|
83
|
+
it('should return contract', async () => {
|
|
84
|
+
const blockscout = createBlockscout({
|
|
85
|
+
name: 'Ethereum Explorer',
|
|
86
|
+
url: 'https://eth.blockscout.com',
|
|
87
|
+
apiUrl: 'https://eth.blockscout.com/api',
|
|
88
|
+
})
|
|
89
|
+
const contract = await blockscout.getContract(wethAddress)
|
|
90
|
+
expect(contract?.name).toEqual('WETH9')
|
|
91
|
+
expect(contract?.abi.length).toBeGreaterThan(0)
|
|
92
|
+
}, 60_000)
|
|
93
|
+
|
|
94
|
+
it('should return undefined', async () => {
|
|
95
|
+
const blockscout = createBlockscout({
|
|
96
|
+
name: 'Ethereum Explorer',
|
|
97
|
+
url: 'https://eth.blockscout.com',
|
|
98
|
+
apiUrl: 'https://eth.blockscout.com/api',
|
|
99
|
+
})
|
|
100
|
+
const contract = await blockscout.getContract(vitalikEthAddress)
|
|
101
|
+
expect(contract).toBeUndefined()
|
|
102
|
+
}, 60_000)
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
describe.if(isIntegrationTest)(
|
|
106
|
+
'blockscout.getInternalTransactionOfTransaction',
|
|
107
|
+
() => {
|
|
108
|
+
it('should return internal transactions', async () => {
|
|
109
|
+
const blockscout = createBlockscout({
|
|
110
|
+
name: 'Ethereum Explorer',
|
|
111
|
+
url: 'https://eth.blockscout.com',
|
|
112
|
+
apiUrl: 'https://eth.blockscout.com/api',
|
|
113
|
+
})
|
|
114
|
+
const transactions = await blockscout.getInternalTransactionOfTransaction(
|
|
115
|
+
{
|
|
116
|
+
hash: '0x78ef484e62a5174b5fb716cde105a9669fc333e7ccb59c8eced163a9802a9c43',
|
|
117
|
+
nativeCurrency: ethereum,
|
|
118
|
+
},
|
|
119
|
+
)
|
|
120
|
+
expect(transactions.filter((tx) => tx.value > 0)).toHaveLength(1)
|
|
121
|
+
expect(transactions).toHaveLength(7)
|
|
122
|
+
})
|
|
123
|
+
},
|
|
124
|
+
)
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import type { Logger } from '@0xtorch/core'
|
|
2
|
+
import type { InternalTransaction, LowerHex } from '../../types'
|
|
3
|
+
import {
|
|
4
|
+
getBlockNumberOfTimestamp,
|
|
5
|
+
getContractByAddress,
|
|
6
|
+
getInternalTransactionsByAddress,
|
|
7
|
+
getInternalTransactionsByTransactionHash,
|
|
8
|
+
getNormalTransactionsByAddress,
|
|
9
|
+
getTokenTransfersByAddress,
|
|
10
|
+
} from '../externals/blockscout'
|
|
11
|
+
import { defineExplorer } from './defineExplorer'
|
|
12
|
+
|
|
13
|
+
type CreateBlockscoutParameters<
|
|
14
|
+
TName extends string,
|
|
15
|
+
TUrl extends string,
|
|
16
|
+
TApiUrl extends string,
|
|
17
|
+
> = {
|
|
18
|
+
readonly name: TName
|
|
19
|
+
readonly url: TUrl
|
|
20
|
+
readonly apiUrl: TApiUrl
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const createBlockscout = <
|
|
24
|
+
TName extends string,
|
|
25
|
+
TUrl extends string,
|
|
26
|
+
TApiUrl extends string,
|
|
27
|
+
>({
|
|
28
|
+
name,
|
|
29
|
+
url,
|
|
30
|
+
apiUrl,
|
|
31
|
+
}: CreateBlockscoutParameters<TName, TUrl, TApiUrl>) =>
|
|
32
|
+
defineExplorer({
|
|
33
|
+
name,
|
|
34
|
+
url,
|
|
35
|
+
apiUrl,
|
|
36
|
+
getAddressTransactionHashes: async ({
|
|
37
|
+
address,
|
|
38
|
+
startBlock,
|
|
39
|
+
endBlock,
|
|
40
|
+
logger,
|
|
41
|
+
}) => {
|
|
42
|
+
const loop = true
|
|
43
|
+
const hashSet = new Set<LowerHex>()
|
|
44
|
+
let mut_startBlock = startBlock
|
|
45
|
+
while (loop) {
|
|
46
|
+
const transactions = await getNormalTransactionsByAddress({
|
|
47
|
+
apiEndpoint: apiUrl,
|
|
48
|
+
address,
|
|
49
|
+
startBlock: mut_startBlock,
|
|
50
|
+
endBlock,
|
|
51
|
+
logger,
|
|
52
|
+
})
|
|
53
|
+
for (const { hash } of transactions) {
|
|
54
|
+
hashSet.add(hash)
|
|
55
|
+
}
|
|
56
|
+
if (transactions.length < 10_000) {
|
|
57
|
+
break
|
|
58
|
+
}
|
|
59
|
+
const maxTxBlockNumber = transactions.reduce(
|
|
60
|
+
(max, { blockNumber }) =>
|
|
61
|
+
max < BigInt(blockNumber) ? BigInt(blockNumber) : max,
|
|
62
|
+
0n,
|
|
63
|
+
)
|
|
64
|
+
if (maxTxBlockNumber === 0n || maxTxBlockNumber === mut_startBlock) {
|
|
65
|
+
break
|
|
66
|
+
}
|
|
67
|
+
mut_startBlock = maxTxBlockNumber
|
|
68
|
+
}
|
|
69
|
+
return [...hashSet]
|
|
70
|
+
},
|
|
71
|
+
getAddressInternalTransactions: async ({
|
|
72
|
+
address,
|
|
73
|
+
startBlock,
|
|
74
|
+
endBlock,
|
|
75
|
+
nativeCurrency,
|
|
76
|
+
logger,
|
|
77
|
+
}) => {
|
|
78
|
+
const loop = true
|
|
79
|
+
const mut_internalTransactions: InternalTransaction<undefined>[] = []
|
|
80
|
+
let mut_startBlock = startBlock
|
|
81
|
+
while (loop) {
|
|
82
|
+
const transactions = await getInternalTransactionsByAddress({
|
|
83
|
+
apiEndpoint: apiUrl,
|
|
84
|
+
address,
|
|
85
|
+
startBlock: mut_startBlock,
|
|
86
|
+
endBlock,
|
|
87
|
+
logger,
|
|
88
|
+
})
|
|
89
|
+
for (const transaction of transactions) {
|
|
90
|
+
if (
|
|
91
|
+
mut_internalTransactions.some(
|
|
92
|
+
({ transactionHash, from, to, value }) =>
|
|
93
|
+
transaction.transactionHash === transactionHash &&
|
|
94
|
+
transaction.from === from &&
|
|
95
|
+
transaction.to === to &&
|
|
96
|
+
transaction.value === value,
|
|
97
|
+
)
|
|
98
|
+
) {
|
|
99
|
+
continue
|
|
100
|
+
}
|
|
101
|
+
mut_internalTransactions.push({
|
|
102
|
+
...transaction,
|
|
103
|
+
type: 'InternalTransaction',
|
|
104
|
+
to: transaction.to,
|
|
105
|
+
contractAddress: transaction.contractAddress,
|
|
106
|
+
txType: transaction.type,
|
|
107
|
+
currency: nativeCurrency,
|
|
108
|
+
price: undefined,
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
if (transactions.length < 10_000) {
|
|
112
|
+
break
|
|
113
|
+
}
|
|
114
|
+
const maxTxBlockNumber = transactions.reduce(
|
|
115
|
+
(max, { blockNumber }) =>
|
|
116
|
+
max < BigInt(blockNumber) ? BigInt(blockNumber) : max,
|
|
117
|
+
0n,
|
|
118
|
+
)
|
|
119
|
+
if (maxTxBlockNumber === 0n || maxTxBlockNumber === mut_startBlock) {
|
|
120
|
+
break
|
|
121
|
+
}
|
|
122
|
+
mut_startBlock = maxTxBlockNumber
|
|
123
|
+
}
|
|
124
|
+
return mut_internalTransactions
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
getAddressTokenTransferHashes: async ({
|
|
128
|
+
address,
|
|
129
|
+
startBlock,
|
|
130
|
+
endBlock,
|
|
131
|
+
logger,
|
|
132
|
+
}) => {
|
|
133
|
+
const loop = true
|
|
134
|
+
const hashSet = new Set<LowerHex>()
|
|
135
|
+
|
|
136
|
+
// erc20 transfer
|
|
137
|
+
let mut_startBlock = startBlock
|
|
138
|
+
while (loop) {
|
|
139
|
+
const transfers = await getTokenTransfersByAddress({
|
|
140
|
+
apiEndpoint: apiUrl,
|
|
141
|
+
address,
|
|
142
|
+
startBlock: mut_startBlock,
|
|
143
|
+
endBlock,
|
|
144
|
+
logger,
|
|
145
|
+
})
|
|
146
|
+
for (const { hash } of transfers) {
|
|
147
|
+
hashSet.add(hash)
|
|
148
|
+
}
|
|
149
|
+
if (transfers.length < 10_000) {
|
|
150
|
+
break
|
|
151
|
+
}
|
|
152
|
+
const maxTxBlockNumber = transfers.reduce(
|
|
153
|
+
(max, { blockNumber }) =>
|
|
154
|
+
max < BigInt(blockNumber) ? BigInt(blockNumber) : max,
|
|
155
|
+
0n,
|
|
156
|
+
)
|
|
157
|
+
if (maxTxBlockNumber === 0n || maxTxBlockNumber === mut_startBlock) {
|
|
158
|
+
break
|
|
159
|
+
}
|
|
160
|
+
mut_startBlock = maxTxBlockNumber
|
|
161
|
+
}
|
|
162
|
+
return [...hashSet]
|
|
163
|
+
},
|
|
164
|
+
getBlockNumberOfTimestamp: async (timestamp, logger?: Logger) =>
|
|
165
|
+
await getBlockNumberOfTimestamp({
|
|
166
|
+
apiEndpoint: apiUrl,
|
|
167
|
+
timestamp,
|
|
168
|
+
logger,
|
|
169
|
+
}),
|
|
170
|
+
getContract: async (address, logger?: Logger) => {
|
|
171
|
+
const contract = await getContractByAddress({
|
|
172
|
+
apiEndpoint: apiUrl,
|
|
173
|
+
address,
|
|
174
|
+
logger,
|
|
175
|
+
})
|
|
176
|
+
if (contract === undefined) {
|
|
177
|
+
return
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
name: contract.ContractName,
|
|
181
|
+
abi: contract.ABI,
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
getInternalTransactionOfTransaction: async ({
|
|
185
|
+
hash,
|
|
186
|
+
nativeCurrency,
|
|
187
|
+
logger,
|
|
188
|
+
}) => {
|
|
189
|
+
const transactions = await getInternalTransactionsByTransactionHash({
|
|
190
|
+
apiEndpoint: apiUrl,
|
|
191
|
+
transactionHash: hash,
|
|
192
|
+
logger,
|
|
193
|
+
})
|
|
194
|
+
return transactions.map((transaction) => ({
|
|
195
|
+
...transaction,
|
|
196
|
+
type: 'InternalTransaction',
|
|
197
|
+
transactionHash: hash,
|
|
198
|
+
to: transaction.to,
|
|
199
|
+
contractAddress: transaction.contractAddress,
|
|
200
|
+
txType: transaction.type,
|
|
201
|
+
currency: nativeCurrency,
|
|
202
|
+
price: undefined,
|
|
203
|
+
}))
|
|
204
|
+
},
|
|
205
|
+
})
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { ethereum } from '@0xtorch/core'
|
|
2
|
+
import { describe, expect, it } from 'bun:test'
|
|
3
|
+
import { isIntegrationTest } from '../../tests'
|
|
4
|
+
import { createEtherscan } from './etherscan'
|
|
5
|
+
|
|
6
|
+
const univ2RouterAddress = '0x7a250d5630b4cf539739df2c5dacb4c659f2488d'
|
|
7
|
+
const wethAddress = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
|
|
8
|
+
const vitalikEthAddress = '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
|
|
9
|
+
|
|
10
|
+
describe.if(isIntegrationTest)('etherscan.getAddressTransactionHashes', () => {
|
|
11
|
+
it('should return transaction hashes', async () => {
|
|
12
|
+
const etherscan = createEtherscan({
|
|
13
|
+
name: 'Etherscan',
|
|
14
|
+
url: 'https://etherscan.io',
|
|
15
|
+
apiUrl: 'https://api.etherscan.io/api',
|
|
16
|
+
apiKey: process.env.ETHERSCAN_API_KEY ?? '',
|
|
17
|
+
})
|
|
18
|
+
const hashes = await etherscan.getAddressTransactionHashes({
|
|
19
|
+
address: univ2RouterAddress,
|
|
20
|
+
startBlock: 19_000_000n,
|
|
21
|
+
endBlock: 19_010_000n,
|
|
22
|
+
})
|
|
23
|
+
expect(hashes).toHaveLength(12_520)
|
|
24
|
+
}, 60_000)
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
describe.if(isIntegrationTest)(
|
|
28
|
+
'etherscan.getAddressInternalTransactions',
|
|
29
|
+
() => {
|
|
30
|
+
it('should return internal transaction hashes', async () => {
|
|
31
|
+
const etherscan = createEtherscan({
|
|
32
|
+
name: 'Etherscan',
|
|
33
|
+
url: 'https://etherscan.io',
|
|
34
|
+
apiUrl: 'https://api.etherscan.io/api',
|
|
35
|
+
apiKey: process.env.ETHERSCAN_API_KEY ?? '',
|
|
36
|
+
})
|
|
37
|
+
const transactions = await etherscan.getAddressInternalTransactions({
|
|
38
|
+
address: univ2RouterAddress,
|
|
39
|
+
startBlock: 19_000_000n,
|
|
40
|
+
endBlock: 19_003_000n,
|
|
41
|
+
nativeCurrency: ethereum,
|
|
42
|
+
})
|
|
43
|
+
expect(transactions).toHaveLength(10_007)
|
|
44
|
+
}, 60_000)
|
|
45
|
+
},
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
describe.if(isIntegrationTest)(
|
|
49
|
+
'etherscan.getAddressTokenTransferHashes',
|
|
50
|
+
() => {
|
|
51
|
+
it('should return token transfer tx hashes', async () => {
|
|
52
|
+
const etherscan = createEtherscan({
|
|
53
|
+
name: 'Etherscan',
|
|
54
|
+
url: 'https://etherscan.io',
|
|
55
|
+
apiUrl: 'https://api.etherscan.io/api',
|
|
56
|
+
apiKey: process.env.ETHERSCAN_API_KEY ?? '',
|
|
57
|
+
})
|
|
58
|
+
const hashes = await etherscan.getAddressTokenTransferHashes({
|
|
59
|
+
address: univ2RouterAddress,
|
|
60
|
+
startBlock: 18_870_000n,
|
|
61
|
+
endBlock: 18_880_000n,
|
|
62
|
+
})
|
|
63
|
+
expect(hashes).toHaveLength(11_550)
|
|
64
|
+
}, 60_000)
|
|
65
|
+
},
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
describe.if(isIntegrationTest)('etherscan.getBlockNumberOfTimestamp', () => {
|
|
69
|
+
it('should return block number', async () => {
|
|
70
|
+
const etherscan = createEtherscan({
|
|
71
|
+
name: 'Etherscan',
|
|
72
|
+
url: 'https://etherscan.io',
|
|
73
|
+
apiUrl: 'https://api.etherscan.io/api',
|
|
74
|
+
apiKey: process.env.ETHERSCAN_API_KEY ?? '',
|
|
75
|
+
})
|
|
76
|
+
const blockNumber = await etherscan.getBlockNumberOfTimestamp(1_705_462_847)
|
|
77
|
+
expect(blockNumber).toBe(19_023_982n)
|
|
78
|
+
}, 60_000)
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
describe.if(isIntegrationTest)('etherscan.getContract', () => {
|
|
82
|
+
it('should return contract', async () => {
|
|
83
|
+
const etherscan = createEtherscan({
|
|
84
|
+
name: 'Etherscan',
|
|
85
|
+
url: 'https://etherscan.io',
|
|
86
|
+
apiUrl: 'https://api.etherscan.io/api',
|
|
87
|
+
apiKey: process.env.ETHERSCAN_API_KEY ?? '',
|
|
88
|
+
})
|
|
89
|
+
const contract = await etherscan.getContract(wethAddress)
|
|
90
|
+
expect(contract?.name).toEqual('WETH9')
|
|
91
|
+
expect(contract?.abi.length).toBeGreaterThan(0)
|
|
92
|
+
}, 60_000)
|
|
93
|
+
|
|
94
|
+
it('should return undefined', async () => {
|
|
95
|
+
const etherscan = createEtherscan({
|
|
96
|
+
name: 'Etherscan',
|
|
97
|
+
url: 'https://etherscan.io',
|
|
98
|
+
apiUrl: 'https://api.etherscan.io/api',
|
|
99
|
+
apiKey: process.env.ETHERSCAN_API_KEY ?? '',
|
|
100
|
+
})
|
|
101
|
+
const contract = await etherscan.getContract(vitalikEthAddress)
|
|
102
|
+
expect(contract).toBeUndefined()
|
|
103
|
+
}, 60_000)
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
describe.if(isIntegrationTest)(
|
|
107
|
+
'etherscan.getInternalTransactionOfTransaction',
|
|
108
|
+
() => {
|
|
109
|
+
it('should return internal transactions', async () => {
|
|
110
|
+
const etherscan = createEtherscan({
|
|
111
|
+
name: 'Etherscan',
|
|
112
|
+
url: 'https://etherscan.io',
|
|
113
|
+
apiUrl: 'https://api.etherscan.io/api',
|
|
114
|
+
apiKey: process.env.ETHERSCAN_API_KEY ?? '',
|
|
115
|
+
})
|
|
116
|
+
const transactions = await etherscan.getInternalTransactionOfTransaction({
|
|
117
|
+
hash: '0x78ef484e62a5174b5fb716cde105a9669fc333e7ccb59c8eced163a9802a9c43',
|
|
118
|
+
nativeCurrency: ethereum,
|
|
119
|
+
})
|
|
120
|
+
expect(transactions).toHaveLength(1)
|
|
121
|
+
})
|
|
122
|
+
},
|
|
123
|
+
)
|