Remove deprecated parameters
This commit is contained in:
parent
00ecea2c54
commit
43f0ba0f8d
|
@ -24,11 +24,7 @@ import USDValue from "../components/USDValue";
|
||||||
import FormattedBalance from "../components/FormattedBalance";
|
import FormattedBalance from "../components/FormattedBalance";
|
||||||
import ETH2USDValue from "../components/ETH2USDValue";
|
import ETH2USDValue from "../components/ETH2USDValue";
|
||||||
import TokenTransferItem from "../TokenTransferItem";
|
import TokenTransferItem from "../TokenTransferItem";
|
||||||
import {
|
import { TransactionData, InternalOperation } from "../types";
|
||||||
TransactionData,
|
|
||||||
InternalOperation,
|
|
||||||
toTransactionContext,
|
|
||||||
} from "../types";
|
|
||||||
import PercentageBar from "../components/PercentageBar";
|
import PercentageBar from "../components/PercentageBar";
|
||||||
import ExternalLink from "../components/ExternalLink";
|
import ExternalLink from "../components/ExternalLink";
|
||||||
import RelativePosition from "../components/RelativePosition";
|
import RelativePosition from "../components/RelativePosition";
|
||||||
|
@ -353,7 +349,6 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
<DecodedParamsTable
|
<DecodedParamsTable
|
||||||
args={resolvedTxDesc.args}
|
args={resolvedTxDesc.args}
|
||||||
paramTypes={resolvedTxDesc.functionFragment.inputs}
|
paramTypes={resolvedTxDesc.functionFragment.inputs}
|
||||||
txContext={toTransactionContext(txData)}
|
|
||||||
hasParamNames={resolvedTxDesc === txDesc}
|
hasParamNames={resolvedTxDesc === txDesc}
|
||||||
userMethod={userMethod}
|
userMethod={userMethod}
|
||||||
devMethod={devMethod}
|
devMethod={devMethod}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import Copy from "../components/Copy";
|
||||||
import ModeTab from "../components/ModeTab";
|
import ModeTab from "../components/ModeTab";
|
||||||
import DecodedParamsTable from "./decoder/DecodedParamsTable";
|
import DecodedParamsTable from "./decoder/DecodedParamsTable";
|
||||||
import DecodedLogSignature from "./decoder/DecodedLogSignature";
|
import DecodedLogSignature from "./decoder/DecodedLogSignature";
|
||||||
import { toTransactionContext, TransactionData } from "../types";
|
import { TransactionData } from "../types";
|
||||||
import { useTopic0 } from "../useTopic0";
|
import { useTopic0 } from "../useTopic0";
|
||||||
import { ResolvedAddresses } from "../api/address-resolver";
|
import { ResolvedAddresses } from "../api/address-resolver";
|
||||||
|
|
||||||
|
@ -106,7 +106,6 @@ const LogEntry: React.FC<LogEntryProps> = ({
|
||||||
<DecodedParamsTable
|
<DecodedParamsTable
|
||||||
args={resolvedLogDesc.args}
|
args={resolvedLogDesc.args}
|
||||||
paramTypes={resolvedLogDesc.eventFragment.inputs}
|
paramTypes={resolvedLogDesc.eventFragment.inputs}
|
||||||
txContext={toTransactionContext(txData)}
|
|
||||||
hasParamNames={resolvedLogDesc === logDesc}
|
hasParamNames={resolvedLogDesc === logDesc}
|
||||||
resolvedAddresses={resolvedAddresses}
|
resolvedAddresses={resolvedAddresses}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -6,7 +6,7 @@ import FormattedBalance from "../components/FormattedBalance";
|
||||||
import FunctionSignature from "./FunctionSignature";
|
import FunctionSignature from "./FunctionSignature";
|
||||||
import DecodedParamsTable from "./decoder/DecodedParamsTable";
|
import DecodedParamsTable from "./decoder/DecodedParamsTable";
|
||||||
import { TraceEntry } from "../useErigonHooks";
|
import { TraceEntry } from "../useErigonHooks";
|
||||||
import { toTransactionContext, TransactionData } from "../types";
|
import { TransactionData } from "../types";
|
||||||
import { ResolvedAddresses } from "../api/address-resolver";
|
import { ResolvedAddresses } from "../api/address-resolver";
|
||||||
import {
|
import {
|
||||||
extract4Bytes,
|
extract4Bytes,
|
||||||
|
@ -87,7 +87,6 @@ const TraceInput: React.FC<TraceInputProps> = ({
|
||||||
<DecodedParamsTable
|
<DecodedParamsTable
|
||||||
args={fourBytesTxDesc.args}
|
args={fourBytesTxDesc.args}
|
||||||
paramTypes={fourBytesTxDesc.functionFragment.inputs}
|
paramTypes={fourBytesTxDesc.functionFragment.inputs}
|
||||||
txContext={toTransactionContext(txData)}
|
|
||||||
hasParamNames={false}
|
hasParamNames={false}
|
||||||
resolvedAddresses={resolvedAddresses}
|
resolvedAddresses={resolvedAddresses}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -8,7 +8,6 @@ import Uint256Decoder from "./Uint256Decoder";
|
||||||
import AddressDecoder from "./AddressDecoder";
|
import AddressDecoder from "./AddressDecoder";
|
||||||
import BooleanDecoder from "./BooleanDecoder";
|
import BooleanDecoder from "./BooleanDecoder";
|
||||||
import BytesDecoder from "./BytesDecoder";
|
import BytesDecoder from "./BytesDecoder";
|
||||||
import { SelectedTransactionContext } from "../../types";
|
|
||||||
import { ResolvedAddresses } from "../../api/address-resolver";
|
import { ResolvedAddresses } from "../../api/address-resolver";
|
||||||
|
|
||||||
type DecodedParamRowProps = {
|
type DecodedParamRowProps = {
|
||||||
|
@ -16,7 +15,6 @@ type DecodedParamRowProps = {
|
||||||
i?: number | undefined;
|
i?: number | undefined;
|
||||||
r: any;
|
r: any;
|
||||||
paramType: ParamType;
|
paramType: ParamType;
|
||||||
txContext: SelectedTransactionContext;
|
|
||||||
arrayElem?: number | undefined;
|
arrayElem?: number | undefined;
|
||||||
help?: string | undefined;
|
help?: string | undefined;
|
||||||
resolvedAddresses?: ResolvedAddresses | undefined;
|
resolvedAddresses?: ResolvedAddresses | undefined;
|
||||||
|
@ -27,7 +25,6 @@ const DecodedParamRow: React.FC<DecodedParamRowProps> = ({
|
||||||
i,
|
i,
|
||||||
r,
|
r,
|
||||||
paramType,
|
paramType,
|
||||||
txContext,
|
|
||||||
arrayElem,
|
arrayElem,
|
||||||
help,
|
help,
|
||||||
resolvedAddresses,
|
resolvedAddresses,
|
||||||
|
@ -105,7 +102,6 @@ const DecodedParamRow: React.FC<DecodedParamRowProps> = ({
|
||||||
i={idx}
|
i={idx}
|
||||||
r={e}
|
r={e}
|
||||||
paramType={paramType.components[idx]}
|
paramType={paramType.components[idx]}
|
||||||
txContext={txContext}
|
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
{paramType.baseType === "array" &&
|
{paramType.baseType === "array" &&
|
||||||
|
@ -115,7 +111,6 @@ const DecodedParamRow: React.FC<DecodedParamRowProps> = ({
|
||||||
prefix={paramType.name ?? <span className="italic">param_{i}</span>}
|
prefix={paramType.name ?? <span className="italic">param_{i}</span>}
|
||||||
r={e}
|
r={e}
|
||||||
paramType={paramType.arrayChildren}
|
paramType={paramType.arrayChildren}
|
||||||
txContext={txContext}
|
|
||||||
arrayElem={idx}
|
arrayElem={idx}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { ParamType, Result } from "@ethersproject/abi";
|
import { ParamType, Result } from "@ethersproject/abi";
|
||||||
import DecodedParamRow from "./DecodedParamRow";
|
import DecodedParamRow from "./DecodedParamRow";
|
||||||
import { SelectedTransactionContext } from "../../types";
|
|
||||||
import { DevMethod, UserMethod } from "../../useSourcify";
|
import { DevMethod, UserMethod } from "../../useSourcify";
|
||||||
import { ResolvedAddresses } from "../../api/address-resolver";
|
import { ResolvedAddresses } from "../../api/address-resolver";
|
||||||
|
|
||||||
type DecodedParamsTableProps = {
|
type DecodedParamsTableProps = {
|
||||||
args: Result;
|
args: Result;
|
||||||
paramTypes: ParamType[];
|
paramTypes: ParamType[];
|
||||||
txContext: SelectedTransactionContext;
|
|
||||||
hasParamNames?: boolean;
|
hasParamNames?: boolean;
|
||||||
userMethod?: UserMethod | undefined;
|
userMethod?: UserMethod | undefined;
|
||||||
devMethod?: DevMethod | undefined;
|
devMethod?: DevMethod | undefined;
|
||||||
|
@ -18,7 +16,6 @@ type DecodedParamsTableProps = {
|
||||||
const DecodedParamsTable: React.FC<DecodedParamsTableProps> = ({
|
const DecodedParamsTable: React.FC<DecodedParamsTableProps> = ({
|
||||||
args,
|
args,
|
||||||
paramTypes,
|
paramTypes,
|
||||||
txContext,
|
|
||||||
hasParamNames = true,
|
hasParamNames = true,
|
||||||
devMethod,
|
devMethod,
|
||||||
resolvedAddresses,
|
resolvedAddresses,
|
||||||
|
@ -49,7 +46,6 @@ const DecodedParamsTable: React.FC<DecodedParamsTableProps> = ({
|
||||||
i={i}
|
i={i}
|
||||||
r={r}
|
r={r}
|
||||||
paramType={paramTypes[i]}
|
paramType={paramTypes[i]}
|
||||||
txContext={txContext}
|
|
||||||
help={devMethod?.params?.[paramTypes[i].name]}
|
help={devMethod?.params?.[paramTypes[i].name]}
|
||||||
resolvedAddresses={resolvedAddresses}
|
resolvedAddresses={resolvedAddresses}
|
||||||
/>
|
/>
|
||||||
|
|
16
src/types.ts
16
src/types.ts
|
@ -64,22 +64,6 @@ export type ConfirmedTransactionData = {
|
||||||
logs: Log[];
|
logs: Log[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type SelectedTransactionContext = {
|
|
||||||
from: string;
|
|
||||||
to: string | undefined;
|
|
||||||
miner: string | undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const toTransactionContext = (
|
|
||||||
txData: TransactionData
|
|
||||||
): SelectedTransactionContext => {
|
|
||||||
return {
|
|
||||||
from: txData.from,
|
|
||||||
to: txData.to,
|
|
||||||
miner: txData.confirmedData?.miner,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// The VOID...
|
// The VOID...
|
||||||
export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue