diff --git a/src/AddressTransactions.tsx b/src/AddressTransactions.tsx index 1850479..a4eb24f 100644 --- a/src/AddressTransactions.tsx +++ b/src/AddressTransactions.tsx @@ -21,7 +21,7 @@ import AddressTransactionResults from "./address/AddressTransactionResults"; import Contracts from "./address/Contracts"; import { RuntimeContext } from "./useRuntime"; import { useAppConfigContext } from "./useAppConfig"; -import { useSingleMetadata } from "./useSourcify"; +import { useSingleMetadata } from "./sourcify/useSourcify"; const AddressTransactions: React.FC = () => { const { provider } = useContext(RuntimeContext); diff --git a/src/TokenTransferItem.tsx b/src/TokenTransferItem.tsx index c56bc26..59fffbb 100644 --- a/src/TokenTransferItem.tsx +++ b/src/TokenTransferItem.tsx @@ -11,7 +11,7 @@ import { TokenTransfer, } from "./types"; import { ResolvedAddresses } from "./api/address-resolver"; -import { Metadata } from "./useSourcify"; +import { Metadata } from "./sourcify/useSourcify"; type TokenTransferItemProps = { t: TokenTransfer; diff --git a/src/Transaction.tsx b/src/Transaction.tsx index 4b8008c..9f9fbc6 100644 --- a/src/Transaction.tsx +++ b/src/Transaction.tsx @@ -10,7 +10,7 @@ import { SelectionContext, useSelection } from "./useSelection"; import { useInternalOperations, useTxData } from "./useErigonHooks"; import { useETHUSDOracle } from "./usePriceOracle"; import { useAppConfigContext } from "./useAppConfig"; -import { useSourcify, useTransactionDescription } from "./useSourcify"; +import { useSourcify, useTransactionDescription } from "./sourcify/useSourcify"; import { transactionDataCollector, useResolvedAddresses, diff --git a/src/address/AddressTransactionResults.tsx b/src/address/AddressTransactionResults.tsx index 3a8528d..b13bbd2 100644 --- a/src/address/AddressTransactionResults.tsx +++ b/src/address/AddressTransactionResults.tsx @@ -8,7 +8,7 @@ import TransactionItem from "../search/TransactionItem"; import UndefinedPageControl from "../search/UndefinedPageControl"; import { useFeeToggler } from "../search/useFeeToggler"; import { SelectionContext, useSelection } from "../useSelection"; -import { useMultipleMetadata } from "../useSourcify"; +import { useMultipleMetadata } from "../sourcify/useSourcify"; import { useMultipleETHUSDOracle } from "../usePriceOracle"; import { RuntimeContext } from "../useRuntime"; import { pageCollector, useResolvedAddresses } from "../useResolvedAddresses"; diff --git a/src/address/Contract.tsx b/src/address/Contract.tsx index 5432f51..360e8bc 100644 --- a/src/address/Contract.tsx +++ b/src/address/Contract.tsx @@ -1,6 +1,6 @@ import React from "react"; import { SyntaxHighlighter, docco } from "../highlight-init"; -import { useContract } from "../useSourcify"; +import { useContract } from "../sourcify/useSourcify"; import { useAppConfigContext } from "../useAppConfig"; type ContractProps = { diff --git a/src/address/Contracts.tsx b/src/address/Contracts.tsx index dbaaf83..c537063 100644 --- a/src/address/Contracts.tsx +++ b/src/address/Contracts.tsx @@ -7,7 +7,7 @@ import ContentFrame from "../ContentFrame"; import InfoRow from "../components/InfoRow"; import Contract from "./Contract"; import { RuntimeContext } from "../useRuntime"; -import { Metadata } from "../useSourcify"; +import { Metadata } from "../sourcify/useSourcify"; import ExternalLink from "../components/ExternalLink"; import { openInRemixURL } from "../url"; import ContractABI from "./ContractABI"; diff --git a/src/block/BlockTransactionResults.tsx b/src/block/BlockTransactionResults.tsx index aa8e688..f2d8d08 100644 --- a/src/block/BlockTransactionResults.tsx +++ b/src/block/BlockTransactionResults.tsx @@ -13,7 +13,7 @@ import { ChecksummedAddress, ProcessedTransaction } from "../types"; import { PAGE_SIZE } from "../params"; import { useMultipleETHUSDOracle } from "../usePriceOracle"; import { useAppConfigContext } from "../useAppConfig"; -import { useMultipleMetadata } from "../useSourcify"; +import { useMultipleMetadata } from "../sourcify/useSourcify"; type BlockTransactionResultsProps = { blockTag: BlockTag; diff --git a/src/components/DecoratedAddressLink.tsx b/src/components/DecoratedAddressLink.tsx index c92ed98..0f13f2c 100644 --- a/src/components/DecoratedAddressLink.tsx +++ b/src/components/DecoratedAddressLink.tsx @@ -10,7 +10,7 @@ import AddressOrENSName from "./AddressOrENSName"; import SourcifyLogo from "../sourcify/SourcifyLogo"; import { AddressContext, ZERO_ADDRESS } from "../types"; import { ResolvedAddresses } from "../api/address-resolver"; -import { Metadata } from "../useSourcify"; +import { Metadata } from "../sourcify/useSourcify"; type DecoratedAddressLinkProps = { address: string; diff --git a/src/components/TransactionAddress.tsx b/src/components/TransactionAddress.tsx index 28540dd..cb1edc9 100644 --- a/src/components/TransactionAddress.tsx +++ b/src/components/TransactionAddress.tsx @@ -4,7 +4,7 @@ import DecoratedAddressLink from "./DecoratedAddressLink"; import { ResolvedAddresses } from "../api/address-resolver"; import { useSelectedTransaction } from "../useSelectedTransaction"; import { AddressContext } from "../types"; -import { Metadata } from "../useSourcify"; +import { Metadata } from "../sourcify/useSourcify"; type TransactionAddressProps = { address: string; diff --git a/src/search/TransactionItem.tsx b/src/search/TransactionItem.tsx index 446daf4..929d2cd 100644 --- a/src/search/TransactionItem.tsx +++ b/src/search/TransactionItem.tsx @@ -19,7 +19,7 @@ import { FeeDisplay } from "./useFeeToggler"; import { formatValue } from "../components/formatter"; import ETH2USDValue from "../components/ETH2USDValue"; import { ResolvedAddresses } from "../api/address-resolver"; -import { Metadata } from "../useSourcify"; +import { Metadata } from "../sourcify/useSourcify"; type TransactionItemProps = { tx: ProcessedTransaction; diff --git a/src/useSourcify.ts b/src/sourcify/useSourcify.ts similarity index 98% rename from src/useSourcify.ts rename to src/sourcify/useSourcify.ts index d7878db..e4d1ab1 100644 --- a/src/useSourcify.ts +++ b/src/sourcify/useSourcify.ts @@ -1,7 +1,7 @@ import { useState, useEffect, useMemo } from "react"; import { Interface } from "@ethersproject/abi"; -import { ChecksummedAddress, TransactionData } from "./types"; -import { sourcifyMetadata, SourcifySource, sourcifySourceFile } from "./url"; +import { ChecksummedAddress, TransactionData } from "../types"; +import { sourcifyMetadata, SourcifySource, sourcifySourceFile } from "../url"; export type UserMethod = { notice?: string | undefined; diff --git a/src/transaction/Details.tsx b/src/transaction/Details.tsx index e2613be..994ab51 100644 --- a/src/transaction/Details.tsx +++ b/src/transaction/Details.tsx @@ -37,7 +37,7 @@ import { use4Bytes, useTransactionDescription, } from "../use4Bytes"; -import { DevDoc, useMultipleMetadata, UserDoc } from "../useSourcify"; +import { DevDoc, useMultipleMetadata, UserDoc } from "../sourcify/useSourcify"; import { ResolvedAddresses } from "../api/address-resolver"; import { RuntimeContext } from "../useRuntime"; import { useAppConfigContext } from "../useAppConfig"; diff --git a/src/transaction/LogEntry.tsx b/src/transaction/LogEntry.tsx index 109ec1e..07be33f 100644 --- a/src/transaction/LogEntry.tsx +++ b/src/transaction/LogEntry.tsx @@ -10,7 +10,7 @@ import DecodedLogSignature from "./decoder/DecodedLogSignature"; import { useTopic0 } from "../useTopic0"; import { ResolvedAddresses } from "../api/address-resolver"; import { ChecksummedAddress } from "../types"; -import { Metadata } from "../useSourcify"; +import { Metadata } from "../sourcify/useSourcify"; type LogEntryProps = { log: Log; diff --git a/src/transaction/Logs.tsx b/src/transaction/Logs.tsx index bbf0475..4a9cc93 100644 --- a/src/transaction/Logs.tsx +++ b/src/transaction/Logs.tsx @@ -4,7 +4,7 @@ import ContentFrame from "../ContentFrame"; import LogEntry from "./LogEntry"; import { TransactionData } from "../types"; import { useAppConfigContext } from "../useAppConfig"; -import { Metadata, useMultipleMetadata } from "../useSourcify"; +import { Metadata, useMultipleMetadata } from "../sourcify/useSourcify"; import { ResolvedAddresses } from "../api/address-resolver"; import { RuntimeContext } from "../useRuntime"; diff --git a/src/transaction/decoder/DecodedParamsTable.tsx b/src/transaction/decoder/DecodedParamsTable.tsx index 376eee2..78d94e6 100644 --- a/src/transaction/decoder/DecodedParamsTable.tsx +++ b/src/transaction/decoder/DecodedParamsTable.tsx @@ -1,7 +1,7 @@ import React from "react"; import { ParamType, Result } from "@ethersproject/abi"; import DecodedParamRow from "./DecodedParamRow"; -import { DevMethod, UserMethod } from "../../useSourcify"; +import { DevMethod, UserMethod } from "../../sourcify/useSourcify"; import { ResolvedAddresses } from "../../api/address-resolver"; type DecodedParamsTableProps = { diff --git a/src/transaction/decoder/InputDecoder.tsx b/src/transaction/decoder/InputDecoder.tsx index e3d041c..0bd9835 100644 --- a/src/transaction/decoder/InputDecoder.tsx +++ b/src/transaction/decoder/InputDecoder.tsx @@ -4,7 +4,7 @@ import { toUtf8String } from "@ethersproject/strings"; import { Tab } from "@headlessui/react"; import ModeTab from "../../components/ModeTab"; import DecodedParamsTable from "./DecodedParamsTable"; -import { DevMethod, UserMethod } from "../../useSourcify"; +import { DevMethod, UserMethod } from "../../sourcify/useSourcify"; import { ResolvedAddresses } from "../../api/address-resolver"; type InputDecoderProps = {