import { TransactionHash } from "./TransactionHash"; import { Address } from "@scaffold-ui/components"; import { formatEther } from "viem"; import { hardhat } from "viem/chains"; import { useTargetNetwork } from "~~/hooks/scaffold-eth/useTargetNetwork"; import { TransactionWithFunction } from "~~/utils/scaffold-eth"; import { TransactionsTableProps } from "~~/utils/scaffold-eth/"; export const TransactionsTable = ({ blocks, transactionReceipts }: TransactionsTableProps) => { const { targetNetwork } = useTargetNetwork(); return (
| Transaction Hash | Function Called | Block Number | Time Mined | From | To | Value ({targetNetwork.nativeCurrency.symbol}) |
|---|---|---|---|---|---|---|
|
|
{tx.functionName === "0x" ? "" : {tx.functionName}} {functionCalled !== "0x" && ( {functionCalled} )} | {block.number?.toString()} | {timeMined} |
{!receipt?.contractAddress ? (
tx.to && (
)
) : (
(Contract Creation)
)}
|
{formatEther(tx.value)} {targetNetwork.nativeCurrency.symbol} |