import React from "react"; import AddressHighlighter from "../components/AddressHighlighter"; import DecoratedAddressLink from "../components/DecoratedAddressLink"; import FormattedBalance from "../components/FormattedBalance"; import FunctionSignature from "./FunctionSignature"; import { TraceEntry } from "../useErigonHooks"; import { TransactionData } from "../types"; import { ResolvedAddresses } from "../api/address-resolver"; import { extract4Bytes, FourBytesEntry } from "../use4Bytes"; type TraceInputProps = { t: TraceEntry; txData: TransactionData; fourBytesMap: Record; resolvedAddresses: ResolvedAddresses | undefined; }; const TraceInput: React.FC = ({ t, txData, fourBytesMap, resolvedAddresses, }) => { const raw4Bytes = extract4Bytes(t.input); const sigText = raw4Bytes === null ? "" : fourBytesMap[raw4Bytes]?.name ?? raw4Bytes; return (
{t.type} . {t.value && !t.value.isZero() && ( {"{"}value: ETH{"}"} )} ({t.input.length > 10 && <>input=[0x{t.input.slice(10)}]})
); }; export default TraceInput;