import React from "react"; import { ParamType, Result } from "@ethersproject/abi"; import DecodedParamRow from "./DecodedParamRow"; import { DevMethod, UserMethod } from "../../sourcify/useSourcify"; import { ResolvedAddresses } from "../../api/address-resolver"; type DecodedParamsTableProps = { args: Result; paramTypes: ParamType[]; hasParamNames?: boolean; userMethod?: UserMethod | undefined; devMethod?: DevMethod | undefined; resolvedAddresses?: ResolvedAddresses | undefined; }; const DecodedParamsTable: React.FC = ({ args, paramTypes, hasParamNames = true, devMethod, resolvedAddresses, }) => ( {!hasParamNames && ( )} {args.map((r, i) => ( ))}
name (index) type value
{paramTypes.length > 0 && paramTypes[0].name !== null ? "Parameter names are estimated." : "Parameter names are not available."}
); export default React.memo(DecodedParamsTable);