@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,113 @@
|
|
|
1
|
+
import type { Logger } from '@0xtorch/core'
|
|
2
|
+
import type { AbiEvent } from 'abitype'
|
|
3
|
+
import type {
|
|
4
|
+
Abi,
|
|
5
|
+
Block,
|
|
6
|
+
ContractFunctionName,
|
|
7
|
+
FeeValues,
|
|
8
|
+
GetLogsReturnType,
|
|
9
|
+
MulticallParameters,
|
|
10
|
+
MulticallReturnType,
|
|
11
|
+
ReadContractParameters,
|
|
12
|
+
ReadContractReturnType,
|
|
13
|
+
Transaction,
|
|
14
|
+
TransactionReceipt,
|
|
15
|
+
} from 'viem'
|
|
16
|
+
import type { Hex, LowerHex } from '../types'
|
|
17
|
+
|
|
18
|
+
export type Client = {
|
|
19
|
+
readonly httpRpcCount: number
|
|
20
|
+
// TODO 主要関数を定義する
|
|
21
|
+
readonly estimateFeesPerGas: FunctionEstimateFeesPerGas
|
|
22
|
+
readonly getBalance: FunctionGetBalance
|
|
23
|
+
readonly getBlock: FunctionGetBlock
|
|
24
|
+
readonly getBlockNumber: FunctionGetBlockNumber
|
|
25
|
+
readonly getEventLogs: FunctionGetEventLogs
|
|
26
|
+
readonly getTransaction: FunctionGetTransaction
|
|
27
|
+
readonly getTransactionCount: FunctionGetTransactionCount
|
|
28
|
+
readonly getTransactionReceipt: FunctionGetTransactionReceipt
|
|
29
|
+
readonly multicall: FunctionMulticall
|
|
30
|
+
readonly readContract: FunctionReadContract
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
type FunctionEstimateFeesPerGas = (config?: {
|
|
34
|
+
readonly timeout?: number
|
|
35
|
+
readonly logger?: Logger
|
|
36
|
+
}) => Promise<FeeValues>
|
|
37
|
+
|
|
38
|
+
type FunctionGetBalance = (
|
|
39
|
+
address: LowerHex,
|
|
40
|
+
config?: {
|
|
41
|
+
readonly timeout?: number
|
|
42
|
+
readonly logger?: Logger
|
|
43
|
+
},
|
|
44
|
+
) => Promise<bigint>
|
|
45
|
+
|
|
46
|
+
type FunctionGetBlock = (
|
|
47
|
+
blockNumber: bigint,
|
|
48
|
+
config?: {
|
|
49
|
+
readonly timeout?: number
|
|
50
|
+
readonly logger?: Logger
|
|
51
|
+
},
|
|
52
|
+
) => Promise<Block>
|
|
53
|
+
|
|
54
|
+
type FunctionGetBlockNumber = (config?: {
|
|
55
|
+
readonly timeout?: number
|
|
56
|
+
readonly logger?: Logger
|
|
57
|
+
}) => Promise<bigint>
|
|
58
|
+
|
|
59
|
+
type FunctionGetEventLogs = <const TAbiEvent extends AbiEvent>(
|
|
60
|
+
parameters: {
|
|
61
|
+
readonly contractAddress: LowerHex
|
|
62
|
+
readonly event: TAbiEvent
|
|
63
|
+
readonly fromBlock: bigint
|
|
64
|
+
readonly toBlock: bigint
|
|
65
|
+
},
|
|
66
|
+
config?: {
|
|
67
|
+
readonly timeout?: number
|
|
68
|
+
readonly logger?: Logger
|
|
69
|
+
},
|
|
70
|
+
) => Promise<GetLogsReturnType<TAbiEvent>>
|
|
71
|
+
|
|
72
|
+
type FunctionGetTransaction = (
|
|
73
|
+
hash: Hex,
|
|
74
|
+
config?: {
|
|
75
|
+
readonly timeout?: number
|
|
76
|
+
readonly logger?: Logger
|
|
77
|
+
},
|
|
78
|
+
) => Promise<Transaction>
|
|
79
|
+
|
|
80
|
+
type FunctionGetTransactionCount = (
|
|
81
|
+
address: LowerHex,
|
|
82
|
+
config?: {
|
|
83
|
+
readonly timeout?: number
|
|
84
|
+
readonly logger?: Logger
|
|
85
|
+
},
|
|
86
|
+
) => Promise<number>
|
|
87
|
+
|
|
88
|
+
type FunctionGetTransactionReceipt = (
|
|
89
|
+
hash: Hex,
|
|
90
|
+
config?: {
|
|
91
|
+
readonly timeout?: number
|
|
92
|
+
readonly logger?: Logger
|
|
93
|
+
},
|
|
94
|
+
) => Promise<TransactionReceipt>
|
|
95
|
+
|
|
96
|
+
type FunctionMulticall = <const TContracts extends readonly unknown[]>(
|
|
97
|
+
parameters: MulticallParameters<TContracts>,
|
|
98
|
+
config?: {
|
|
99
|
+
readonly timeout?: number
|
|
100
|
+
readonly logger?: Logger
|
|
101
|
+
},
|
|
102
|
+
) => Promise<MulticallReturnType<TContracts>>
|
|
103
|
+
|
|
104
|
+
type FunctionReadContract = <
|
|
105
|
+
const TAbi extends Abi | readonly unknown[],
|
|
106
|
+
const TFunctionName extends ContractFunctionName<TAbi, 'pure' | 'view'>,
|
|
107
|
+
>(
|
|
108
|
+
parameters: ReadContractParameters<TAbi, TFunctionName>,
|
|
109
|
+
config?: {
|
|
110
|
+
readonly timeout?: number
|
|
111
|
+
readonly logger?: Logger
|
|
112
|
+
},
|
|
113
|
+
) => Promise<ReadContractReturnType<TAbi, TFunctionName>>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EvmAccount } from '../types'
|
|
2
|
+
|
|
3
|
+
export const createEvmAccount = (
|
|
4
|
+
account: Omit<EvmAccount, 'id' | 'category' | 'name'> & {
|
|
5
|
+
readonly name?: string
|
|
6
|
+
},
|
|
7
|
+
): EvmAccount => ({
|
|
8
|
+
...account,
|
|
9
|
+
id: `evm_${account.chainId}_${account.address}`,
|
|
10
|
+
category: 'evm',
|
|
11
|
+
name: account.name ?? account.address,
|
|
12
|
+
})
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test'
|
|
2
|
+
import { createEthereumChain } from '../chains'
|
|
3
|
+
import { isIntegrationTest } from '../tests'
|
|
4
|
+
import { decode } from './decode'
|
|
5
|
+
import { testTxSwapExactETHForTokens } from './tests'
|
|
6
|
+
|
|
7
|
+
describe.if(isIntegrationTest)('decode', () => {
|
|
8
|
+
// https://etherscan.io/tx/0x78ef484e62a5174b5fb716cde105a9669fc333e7ccb59c8eced163a9802a9c43
|
|
9
|
+
it('Should decode swapExactETHForTokens (UniV2 router) transaction', async () => {
|
|
10
|
+
const chain = createEthereumChain(process.env.ETHERSCAN_API_KEY ?? '')
|
|
11
|
+
|
|
12
|
+
const result = await decode({
|
|
13
|
+
chain,
|
|
14
|
+
transactions: [testTxSwapExactETHForTokens],
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
expect(result.transactions).toHaveLength(1)
|
|
18
|
+
const transaction = result.transactions[0]
|
|
19
|
+
expect(transaction.function).toEqual({
|
|
20
|
+
name: 'swapExactETHForTokens',
|
|
21
|
+
args: [
|
|
22
|
+
{
|
|
23
|
+
name: 'amountOutMin',
|
|
24
|
+
type: 'uint256',
|
|
25
|
+
value: 5_977_323_005_749_423n,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'path',
|
|
29
|
+
type: 'address[]',
|
|
30
|
+
value: [
|
|
31
|
+
'0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
|
32
|
+
'0xAbaF9c47094B1a774432FfaE5B6d92c78eE69BbB',
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'to',
|
|
37
|
+
type: 'address',
|
|
38
|
+
value: '0x95ABcA1617e57b6B99185A288728f58286b5570e',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'deadline',
|
|
42
|
+
type: 'uint256',
|
|
43
|
+
value: 1_705_464_035n,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
})
|
|
47
|
+
expect(transaction.erc20Transfers).toEqual([
|
|
48
|
+
{
|
|
49
|
+
type: 'Erc20Transfer',
|
|
50
|
+
logIndex: 100,
|
|
51
|
+
from: '0x7a250d5630b4cf539739df2c5dacb4c659f2488d',
|
|
52
|
+
to: '0x775e4d9f7b97b0b67cab8c953bef80c5e194ebaf',
|
|
53
|
+
value: 1_000_000_000_000_000_000n,
|
|
54
|
+
price: undefined,
|
|
55
|
+
token: {
|
|
56
|
+
contractAddress: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
57
|
+
name: 'Wrapped Ether',
|
|
58
|
+
symbol: 'WETH',
|
|
59
|
+
decimals: 18,
|
|
60
|
+
currency: {
|
|
61
|
+
type: 'CryptoCurrency',
|
|
62
|
+
id: 'weth',
|
|
63
|
+
name: 'WETH',
|
|
64
|
+
symbol: 'WETH',
|
|
65
|
+
icon: undefined,
|
|
66
|
+
market: {
|
|
67
|
+
coingeckoId: 'weth',
|
|
68
|
+
marketCapUsd: undefined,
|
|
69
|
+
},
|
|
70
|
+
updatedAt: transaction.erc20Transfers[0].token.currency.updatedAt,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: 'Erc20Transfer',
|
|
76
|
+
logIndex: 101,
|
|
77
|
+
from: '0x775e4d9f7b97b0b67cab8c953bef80c5e194ebaf',
|
|
78
|
+
to: '0x95abca1617e57b6b99185a288728f58286b5570e',
|
|
79
|
+
value: 5_992_361_277_547_358n,
|
|
80
|
+
price: undefined,
|
|
81
|
+
token: {
|
|
82
|
+
contractAddress: '0xabaf9c47094b1a774432ffae5b6d92c78ee69bbb',
|
|
83
|
+
name: 'NOBODY',
|
|
84
|
+
symbol: 'NOBODY',
|
|
85
|
+
decimals: 9,
|
|
86
|
+
currency: {
|
|
87
|
+
type: 'CryptoCurrency',
|
|
88
|
+
id: 'evm_1_0xabaf9c47094b1a774432ffae5b6d92c78ee69bbb',
|
|
89
|
+
name: 'NOBODY',
|
|
90
|
+
symbol: 'NOBODY',
|
|
91
|
+
icon: undefined,
|
|
92
|
+
market: {
|
|
93
|
+
coingeckoId: undefined,
|
|
94
|
+
marketCapUsd: undefined,
|
|
95
|
+
},
|
|
96
|
+
updatedAt: transaction.erc20Transfers[1].token.currency.updatedAt,
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
])
|
|
101
|
+
expect(transaction.erc721Transfers).toEqual([])
|
|
102
|
+
expect(transaction.erc1155Transfers).toEqual([])
|
|
103
|
+
expect(transaction.logs).toEqual([
|
|
104
|
+
{
|
|
105
|
+
type: 'decoded',
|
|
106
|
+
log: {
|
|
107
|
+
address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
108
|
+
blockHash:
|
|
109
|
+
'0xfa2cfe13f3f4545f09accc3de4d90776f5e9d2df81b022eb3612ff2714f6137b',
|
|
110
|
+
blockNumber: 19_023_982n,
|
|
111
|
+
data: '0x0000000000000000000000000000000000000000000000000de0b6b3a7640000',
|
|
112
|
+
logIndex: 99,
|
|
113
|
+
transactionHash:
|
|
114
|
+
'0x78ef484e62a5174b5fb716cde105a9669fc333e7ccb59c8eced163a9802a9c43',
|
|
115
|
+
transactionIndex: 72,
|
|
116
|
+
removed: false,
|
|
117
|
+
topics: [
|
|
118
|
+
'0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c',
|
|
119
|
+
'0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d',
|
|
120
|
+
],
|
|
121
|
+
eventName: 'Deposit',
|
|
122
|
+
args: [
|
|
123
|
+
{
|
|
124
|
+
indexed: true,
|
|
125
|
+
name: 'dst',
|
|
126
|
+
type: 'address',
|
|
127
|
+
value: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
indexed: false,
|
|
131
|
+
name: 'wad',
|
|
132
|
+
type: 'uint256',
|
|
133
|
+
value: 1_000_000_000_000_000_000n,
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
type: 'DecodedLog',
|
|
137
|
+
},
|
|
138
|
+
source: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
type: 'decoded',
|
|
142
|
+
log: {
|
|
143
|
+
address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
144
|
+
blockHash:
|
|
145
|
+
'0xfa2cfe13f3f4545f09accc3de4d90776f5e9d2df81b022eb3612ff2714f6137b',
|
|
146
|
+
blockNumber: 19_023_982n,
|
|
147
|
+
data: '0x0000000000000000000000000000000000000000000000000de0b6b3a7640000',
|
|
148
|
+
logIndex: 100,
|
|
149
|
+
transactionHash:
|
|
150
|
+
'0x78ef484e62a5174b5fb716cde105a9669fc333e7ccb59c8eced163a9802a9c43',
|
|
151
|
+
transactionIndex: 72,
|
|
152
|
+
removed: false,
|
|
153
|
+
topics: [
|
|
154
|
+
'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
|
|
155
|
+
'0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d',
|
|
156
|
+
'0x000000000000000000000000775e4d9f7b97b0b67cab8c953bef80c5e194ebaf',
|
|
157
|
+
],
|
|
158
|
+
eventName: 'Transfer',
|
|
159
|
+
args: [
|
|
160
|
+
{
|
|
161
|
+
indexed: true,
|
|
162
|
+
name: 'src',
|
|
163
|
+
type: 'address',
|
|
164
|
+
value: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
indexed: true,
|
|
168
|
+
name: 'dst',
|
|
169
|
+
type: 'address',
|
|
170
|
+
value: '0x775e4D9F7b97b0B67CaB8C953bEF80c5e194EbAF',
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
indexed: false,
|
|
174
|
+
name: 'wad',
|
|
175
|
+
type: 'uint256',
|
|
176
|
+
value: 1_000_000_000_000_000_000n,
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
type: 'DecodedLog',
|
|
180
|
+
},
|
|
181
|
+
source: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
type: 'decoded',
|
|
185
|
+
log: {
|
|
186
|
+
address: '0xabaf9c47094b1a774432ffae5b6d92c78ee69bbb',
|
|
187
|
+
blockHash:
|
|
188
|
+
'0xfa2cfe13f3f4545f09accc3de4d90776f5e9d2df81b022eb3612ff2714f6137b',
|
|
189
|
+
blockNumber: 19_023_982n,
|
|
190
|
+
data: '0x00000000000000000000000000000000000000000000000000154a055550635e',
|
|
191
|
+
logIndex: 101,
|
|
192
|
+
transactionHash:
|
|
193
|
+
'0x78ef484e62a5174b5fb716cde105a9669fc333e7ccb59c8eced163a9802a9c43',
|
|
194
|
+
transactionIndex: 72,
|
|
195
|
+
removed: false,
|
|
196
|
+
topics: [
|
|
197
|
+
'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
|
|
198
|
+
'0x000000000000000000000000775e4d9f7b97b0b67cab8c953bef80c5e194ebaf',
|
|
199
|
+
'0x00000000000000000000000095abca1617e57b6b99185a288728f58286b5570e',
|
|
200
|
+
],
|
|
201
|
+
eventName: 'Transfer',
|
|
202
|
+
args: [
|
|
203
|
+
{
|
|
204
|
+
indexed: true,
|
|
205
|
+
name: 'from',
|
|
206
|
+
type: 'address',
|
|
207
|
+
value: '0x775e4D9F7b97b0B67CaB8C953bEF80c5e194EbAF',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
indexed: true,
|
|
211
|
+
name: 'to',
|
|
212
|
+
type: 'address',
|
|
213
|
+
value: '0x95ABcA1617e57b6B99185A288728f58286b5570e',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
indexed: false,
|
|
217
|
+
name: 'value',
|
|
218
|
+
type: 'uint256',
|
|
219
|
+
value: 5_992_361_277_547_358n,
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
type: 'DecodedLog',
|
|
223
|
+
},
|
|
224
|
+
source: '0xabaf9c47094b1a774432ffae5b6d92c78ee69bbb',
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
type: 'decoded',
|
|
228
|
+
log: {
|
|
229
|
+
address: '0x775e4d9f7b97b0b67cab8c953bef80c5e194ebaf',
|
|
230
|
+
blockHash:
|
|
231
|
+
'0xfa2cfe13f3f4545f09accc3de4d90776f5e9d2df81b022eb3612ff2714f6137b',
|
|
232
|
+
blockNumber: 19_023_982n,
|
|
233
|
+
data: '0x000000000000000000000000000000000000000000000000052b1fcd42f64cd300000000000000000000000000000000000000000000000369cc1ead89f126ed',
|
|
234
|
+
logIndex: 102,
|
|
235
|
+
transactionHash:
|
|
236
|
+
'0x78ef484e62a5174b5fb716cde105a9669fc333e7ccb59c8eced163a9802a9c43',
|
|
237
|
+
transactionIndex: 72,
|
|
238
|
+
removed: false,
|
|
239
|
+
topics: [
|
|
240
|
+
'0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1',
|
|
241
|
+
],
|
|
242
|
+
eventName: 'Sync',
|
|
243
|
+
args: [
|
|
244
|
+
{
|
|
245
|
+
indexed: false,
|
|
246
|
+
name: 'reserve0',
|
|
247
|
+
type: 'uint112',
|
|
248
|
+
value: 372_426_360_640_392_403n,
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
indexed: false,
|
|
252
|
+
name: 'reserve1',
|
|
253
|
+
type: 'uint112',
|
|
254
|
+
value: 62_963_734_221_052_520_173n,
|
|
255
|
+
},
|
|
256
|
+
],
|
|
257
|
+
type: 'DecodedLog',
|
|
258
|
+
},
|
|
259
|
+
source: '0x775e4d9f7b97b0b67cab8c953bef80c5e194ebaf',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
type: 'decoded',
|
|
263
|
+
log: {
|
|
264
|
+
address: '0x775e4d9f7b97b0b67cab8c953bef80c5e194ebaf',
|
|
265
|
+
blockHash:
|
|
266
|
+
'0xfa2cfe13f3f4545f09accc3de4d90776f5e9d2df81b022eb3612ff2714f6137b',
|
|
267
|
+
blockNumber: 19_023_982n,
|
|
268
|
+
data: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000154a055550635e0000000000000000000000000000000000000000000000000000000000000000',
|
|
269
|
+
logIndex: 103,
|
|
270
|
+
transactionHash:
|
|
271
|
+
'0x78ef484e62a5174b5fb716cde105a9669fc333e7ccb59c8eced163a9802a9c43',
|
|
272
|
+
transactionIndex: 72,
|
|
273
|
+
removed: false,
|
|
274
|
+
topics: [
|
|
275
|
+
'0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822',
|
|
276
|
+
'0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d',
|
|
277
|
+
'0x00000000000000000000000095abca1617e57b6b99185a288728f58286b5570e',
|
|
278
|
+
],
|
|
279
|
+
eventName: 'Swap',
|
|
280
|
+
args: [
|
|
281
|
+
{
|
|
282
|
+
indexed: true,
|
|
283
|
+
name: 'sender',
|
|
284
|
+
type: 'address',
|
|
285
|
+
value: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
indexed: false,
|
|
289
|
+
name: 'amount0In',
|
|
290
|
+
type: 'uint256',
|
|
291
|
+
value: 0n,
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
indexed: false,
|
|
295
|
+
name: 'amount1In',
|
|
296
|
+
type: 'uint256',
|
|
297
|
+
value: 1_000_000_000_000_000_000n,
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
indexed: false,
|
|
301
|
+
name: 'amount0Out',
|
|
302
|
+
type: 'uint256',
|
|
303
|
+
value: 5_992_361_277_547_358n,
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
indexed: false,
|
|
307
|
+
name: 'amount1Out',
|
|
308
|
+
type: 'uint256',
|
|
309
|
+
value: 0n,
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
indexed: true,
|
|
313
|
+
name: 'to',
|
|
314
|
+
type: 'address',
|
|
315
|
+
value: '0x95ABcA1617e57b6B99185A288728f58286b5570e',
|
|
316
|
+
},
|
|
317
|
+
],
|
|
318
|
+
type: 'DecodedLog',
|
|
319
|
+
},
|
|
320
|
+
source: '0x775e4d9f7b97b0b67cab8c953bef80c5e194ebaf',
|
|
321
|
+
},
|
|
322
|
+
])
|
|
323
|
+
}, 60_000)
|
|
324
|
+
})
|