Merge branch 'develop' into feature/trace-tx
This commit is contained in:
commit
2a72602f12
|
@ -35,7 +35,7 @@
|
||||||
"@types/react-syntax-highlighter": "^13.5.2",
|
"@types/react-syntax-highlighter": "^13.5.2",
|
||||||
"chart.js": "^3.5.1",
|
"chart.js": "^3.5.1",
|
||||||
"ethers": "^5.5.1",
|
"ethers": "^5.5.1",
|
||||||
"highlightjs-solidity": "^2.0.1",
|
"highlightjs-solidity": "^2.0.2",
|
||||||
"query-string": "^7.0.1",
|
"query-string": "^7.0.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-blockies": "^1.4.1",
|
"react-blockies": "^1.4.1",
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
"react-image": "^4.0.3",
|
"react-image": "^4.0.3",
|
||||||
"react-router-dom": "^5.3.0",
|
"react-router-dom": "^5.3.0",
|
||||||
"react-scripts": "4.0.3",
|
"react-scripts": "4.0.3",
|
||||||
"react-syntax-highlighter": "^15.4.4",
|
"react-syntax-highlighter": "^15.4.5",
|
||||||
"serve": "^13.0.2",
|
"serve": "^13.0.2",
|
||||||
"typescript": "^4.4.4",
|
"typescript": "^4.4.4",
|
||||||
"use-keyboard-shortcut": "^1.0.6",
|
"use-keyboard-shortcut": "^1.0.6",
|
||||||
|
@ -9283,9 +9283,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/highlightjs-solidity": {
|
"node_modules/highlightjs-solidity": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.2.tgz",
|
||||||
"integrity": "sha512-9YY+HQpXMTrF8HgRByjeQhd21GXAz2ktMPTcs6oWSj5HJR52fgsNoelMOmgigwcpt9j4tu4IVSaWaJB2n2TbvQ=="
|
"integrity": "sha512-q0aYUKiZ9MPQg41qx/KpXKaCpqql50qTvmwGYyLFfcjt9AE/+C9CwjVIdJZc7EYj6NGgJuFJ4im1gfgrzUU1fQ=="
|
||||||
},
|
},
|
||||||
"node_modules/history": {
|
"node_modules/history": {
|
||||||
"version": "4.10.1",
|
"version": "4.10.1",
|
||||||
|
@ -14920,20 +14920,25 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-syntax-highlighter": {
|
"node_modules/react-syntax-highlighter": {
|
||||||
"version": "15.4.4",
|
"version": "15.4.5",
|
||||||
"resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.4.4.tgz",
|
"resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.4.5.tgz",
|
||||||
"integrity": "sha512-PsOFHNTzkb3OroXdoR897eKN5EZ6grht1iM+f1lJSq7/L0YVnkJaNVwC3wEUYPOAmeyl5xyer1DjL6MrumO6Zw==",
|
"integrity": "sha512-RC90KQTxZ/b7+9iE6s9nmiFLFjWswUcfULi4GwVzdFVKVMQySkJWBuOmJFfjwjMVCo0IUUuJrWebNKyviKpwLQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"highlight.js": "^10.4.1",
|
"highlight.js": "^10.4.1",
|
||||||
"lowlight": "^1.17.0",
|
"lowlight": "^1.17.0",
|
||||||
"prismjs": "^1.22.0",
|
"prismjs": "^1.25.0",
|
||||||
"refractor": "^3.2.0"
|
"refractor": "^3.2.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": ">= 0.14.0"
|
"react": ">= 0.14.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/react-syntax-highlighter/node_modules/prismjs": {
|
||||||
|
"version": "1.25.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.25.0.tgz",
|
||||||
|
"integrity": "sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg=="
|
||||||
|
},
|
||||||
"node_modules/read-pkg": {
|
"node_modules/read-pkg": {
|
||||||
"version": "5.2.0",
|
"version": "5.2.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -25780,9 +25785,9 @@
|
||||||
"integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A=="
|
"integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A=="
|
||||||
},
|
},
|
||||||
"highlightjs-solidity": {
|
"highlightjs-solidity": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.2.tgz",
|
||||||
"integrity": "sha512-9YY+HQpXMTrF8HgRByjeQhd21GXAz2ktMPTcs6oWSj5HJR52fgsNoelMOmgigwcpt9j4tu4IVSaWaJB2n2TbvQ=="
|
"integrity": "sha512-q0aYUKiZ9MPQg41qx/KpXKaCpqql50qTvmwGYyLFfcjt9AE/+C9CwjVIdJZc7EYj6NGgJuFJ4im1gfgrzUU1fQ=="
|
||||||
},
|
},
|
||||||
"history": {
|
"history": {
|
||||||
"version": "4.10.1",
|
"version": "4.10.1",
|
||||||
|
@ -29547,15 +29552,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-syntax-highlighter": {
|
"react-syntax-highlighter": {
|
||||||
"version": "15.4.4",
|
"version": "15.4.5",
|
||||||
"resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.4.4.tgz",
|
"resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.4.5.tgz",
|
||||||
"integrity": "sha512-PsOFHNTzkb3OroXdoR897eKN5EZ6grht1iM+f1lJSq7/L0YVnkJaNVwC3wEUYPOAmeyl5xyer1DjL6MrumO6Zw==",
|
"integrity": "sha512-RC90KQTxZ/b7+9iE6s9nmiFLFjWswUcfULi4GwVzdFVKVMQySkJWBuOmJFfjwjMVCo0IUUuJrWebNKyviKpwLQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"highlight.js": "^10.4.1",
|
"highlight.js": "^10.4.1",
|
||||||
"lowlight": "^1.17.0",
|
"lowlight": "^1.17.0",
|
||||||
"prismjs": "^1.22.0",
|
"prismjs": "^1.25.0",
|
||||||
"refractor": "^3.2.0"
|
"refractor": "^3.2.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"prismjs": {
|
||||||
|
"version": "1.25.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.25.0.tgz",
|
||||||
|
"integrity": "sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"read-pkg": {
|
"read-pkg": {
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"@types/react-syntax-highlighter": "^13.5.2",
|
"@types/react-syntax-highlighter": "^13.5.2",
|
||||||
"chart.js": "^3.5.1",
|
"chart.js": "^3.5.1",
|
||||||
"ethers": "^5.5.1",
|
"ethers": "^5.5.1",
|
||||||
"highlightjs-solidity": "^2.0.1",
|
"highlightjs-solidity": "^2.0.2",
|
||||||
"query-string": "^7.0.1",
|
"query-string": "^7.0.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-blockies": "^1.4.1",
|
"react-blockies": "^1.4.1",
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
"react-image": "^4.0.3",
|
"react-image": "^4.0.3",
|
||||||
"react-router-dom": "^5.3.0",
|
"react-router-dom": "^5.3.0",
|
||||||
"react-scripts": "4.0.3",
|
"react-scripts": "4.0.3",
|
||||||
"react-syntax-highlighter": "^15.4.4",
|
"react-syntax-highlighter": "^15.4.5",
|
||||||
"serve": "^13.0.2",
|
"serve": "^13.0.2",
|
||||||
"typescript": "^4.4.4",
|
"typescript": "^4.4.4",
|
||||||
"use-keyboard-shortcut": "^1.0.6",
|
"use-keyboard-shortcut": "^1.0.6",
|
||||||
|
|
|
@ -6,25 +6,26 @@ import ValueHighlighter from "./components/ValueHighlighter";
|
||||||
import FormattedBalance from "./components/FormattedBalance";
|
import FormattedBalance from "./components/FormattedBalance";
|
||||||
import {
|
import {
|
||||||
AddressContext,
|
AddressContext,
|
||||||
|
ChecksummedAddress,
|
||||||
TokenMeta,
|
TokenMeta,
|
||||||
TokenTransfer,
|
TokenTransfer,
|
||||||
TransactionData,
|
|
||||||
} from "./types";
|
} from "./types";
|
||||||
import { ResolvedAddresses } from "./api/address-resolver";
|
import { ResolvedAddresses } from "./api/address-resolver";
|
||||||
|
import { Metadata } from "./useSourcify";
|
||||||
|
|
||||||
type TokenTransferItemProps = {
|
type TokenTransferItemProps = {
|
||||||
t: TokenTransfer;
|
t: TokenTransfer;
|
||||||
txData: TransactionData;
|
|
||||||
tokenMeta?: TokenMeta | null | undefined;
|
tokenMeta?: TokenMeta | null | undefined;
|
||||||
resolvedAddresses: ResolvedAddresses | undefined;
|
resolvedAddresses: ResolvedAddresses | undefined;
|
||||||
|
metadatas: Record<ChecksummedAddress, Metadata | null | undefined>;
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: handle partial
|
// TODO: handle partial
|
||||||
const TokenTransferItem: React.FC<TokenTransferItemProps> = ({
|
const TokenTransferItem: React.FC<TokenTransferItemProps> = ({
|
||||||
t,
|
t,
|
||||||
txData,
|
|
||||||
tokenMeta,
|
tokenMeta,
|
||||||
resolvedAddresses,
|
resolvedAddresses,
|
||||||
|
metadatas,
|
||||||
}) => (
|
}) => (
|
||||||
<div className="flex items-baseline space-x-2 px-2 py-1 truncate hover:bg-gray-100">
|
<div className="flex items-baseline space-x-2 px-2 py-1 truncate hover:bg-gray-100">
|
||||||
<span className="text-gray-500">
|
<span className="text-gray-500">
|
||||||
|
@ -37,6 +38,7 @@ const TokenTransferItem: React.FC<TokenTransferItemProps> = ({
|
||||||
address={t.from}
|
address={t.from}
|
||||||
addressCtx={AddressContext.FROM}
|
addressCtx={AddressContext.FROM}
|
||||||
resolvedAddresses={resolvedAddresses}
|
resolvedAddresses={resolvedAddresses}
|
||||||
|
metadata={metadatas[t.from]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex space-x-1">
|
<div className="flex space-x-1">
|
||||||
|
@ -45,6 +47,7 @@ const TokenTransferItem: React.FC<TokenTransferItemProps> = ({
|
||||||
address={t.to}
|
address={t.to}
|
||||||
addressCtx={AddressContext.TO}
|
addressCtx={AddressContext.TO}
|
||||||
resolvedAddresses={resolvedAddresses}
|
resolvedAddresses={resolvedAddresses}
|
||||||
|
metadata={metadatas[t.to]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-span-3 flex space-x-1">
|
<div className="col-span-3 flex space-x-1">
|
||||||
|
@ -60,6 +63,7 @@ const TokenTransferItem: React.FC<TokenTransferItemProps> = ({
|
||||||
<TransactionAddress
|
<TransactionAddress
|
||||||
address={t.token}
|
address={t.token}
|
||||||
resolvedAddresses={resolvedAddresses}
|
resolvedAddresses={resolvedAddresses}
|
||||||
|
metadata={metadatas[t.token]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,45 +1,44 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { faAngleRight } from "@fortawesome/free-solid-svg-icons/faAngleRight";
|
import { faAngleRight } from "@fortawesome/free-solid-svg-icons/faAngleRight";
|
||||||
|
import TransactionAddress from "./TransactionAddress";
|
||||||
import AddressHighlighter from "./AddressHighlighter";
|
import AddressHighlighter from "./AddressHighlighter";
|
||||||
import DecoratedAddressLink from "./DecoratedAddressLink";
|
import DecoratedAddressLink from "./DecoratedAddressLink";
|
||||||
import { TransactionData, InternalOperation } from "../types";
|
import { InternalOperation } from "../types";
|
||||||
|
import { ResolvedAddresses } from "../api/address-resolver";
|
||||||
|
|
||||||
type InternalCreateProps = {
|
type InternalCreateProps = {
|
||||||
txData: TransactionData;
|
|
||||||
internalOp: InternalOperation;
|
internalOp: InternalOperation;
|
||||||
|
resolvedAddresses: ResolvedAddresses | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
const InternalCreate: React.FC<InternalCreateProps> = ({
|
const InternalCreate: React.FC<InternalCreateProps> = ({
|
||||||
txData,
|
|
||||||
internalOp,
|
internalOp,
|
||||||
}) => {
|
resolvedAddresses,
|
||||||
return (
|
}) => (
|
||||||
<>
|
<div className="flex items-baseline space-x-1 whitespace-nowrap">
|
||||||
<div className="flex items-baseline space-x-1 text-xs">
|
|
||||||
<span className="text-gray-500">
|
<span className="text-gray-500">
|
||||||
<FontAwesomeIcon icon={faAngleRight} size="1x" /> CREATE
|
<FontAwesomeIcon icon={faAngleRight} size="1x" /> CREATE
|
||||||
</span>
|
</span>
|
||||||
<span>Contract</span>
|
<span>Contract</span>
|
||||||
<div className="flex items-baseline">
|
<div className="flex items-baseline">
|
||||||
<AddressHighlighter address={internalOp.to}>
|
<AddressHighlighter address={internalOp.to}>
|
||||||
<DecoratedAddressLink address={internalOp.to} creation />
|
<DecoratedAddressLink
|
||||||
|
address={internalOp.to}
|
||||||
|
creation
|
||||||
|
resolvedAddresses={resolvedAddresses}
|
||||||
|
/>
|
||||||
</AddressHighlighter>
|
</AddressHighlighter>
|
||||||
</div>
|
</div>
|
||||||
<span className="flex items-baseline text-gray-400">
|
<span className="flex items-baseline text-gray-400">
|
||||||
(Creator:{" "}
|
(Creator:{" "}
|
||||||
<AddressHighlighter address={internalOp.from}>
|
<TransactionAddress
|
||||||
<DecoratedAddressLink
|
|
||||||
address={internalOp.from}
|
address={internalOp.from}
|
||||||
txFrom={internalOp.from === txData.from}
|
resolvedAddresses={resolvedAddresses}
|
||||||
txTo={internalOp.from === txData.to}
|
|
||||||
/>
|
/>
|
||||||
</AddressHighlighter>
|
|
||||||
)
|
)
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
};
|
|
||||||
|
|
||||||
export default React.memo(InternalCreate);
|
export default InternalCreate;
|
||||||
|
|
|
@ -1,52 +1,57 @@
|
||||||
import React, { useContext } from "react";
|
import React from "react";
|
||||||
import { formatEther } from "@ethersproject/units";
|
import { formatEther } from "@ethersproject/units";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { faAngleRight } from "@fortawesome/free-solid-svg-icons/faAngleRight";
|
import { faAngleRight } from "@fortawesome/free-solid-svg-icons/faAngleRight";
|
||||||
import AddressHighlighter from "./AddressHighlighter";
|
import AddressHighlighter from "./AddressHighlighter";
|
||||||
import DecoratedAddressLink from "./DecoratedAddressLink";
|
import DecoratedAddressLink from "./DecoratedAddressLink";
|
||||||
import { RuntimeContext } from "../useRuntime";
|
|
||||||
import { TransactionData, InternalOperation } from "../types";
|
import { TransactionData, InternalOperation } from "../types";
|
||||||
|
import { ResolvedAddresses } from "../api/address-resolver";
|
||||||
const CHI_ADDRESS = "0x0000000000004946c0e9F43F4Dee607b0eF1fA1c";
|
import TransactionAddress from "./TransactionAddress";
|
||||||
const GST2_ADDRESS = "0x0000000000b3F879cb30FE243b4Dfee438691c04";
|
|
||||||
|
|
||||||
type InternalSelfDestructProps = {
|
type InternalSelfDestructProps = {
|
||||||
txData: TransactionData;
|
txData: TransactionData;
|
||||||
internalOp: InternalOperation;
|
internalOp: InternalOperation;
|
||||||
|
resolvedAddresses: ResolvedAddresses | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
const InternalSelfDestruct: React.FC<InternalSelfDestructProps> = ({
|
const InternalSelfDestruct: React.FC<InternalSelfDestructProps> = ({
|
||||||
txData,
|
txData,
|
||||||
internalOp,
|
internalOp,
|
||||||
|
resolvedAddresses,
|
||||||
}) => {
|
}) => {
|
||||||
const { provider } = useContext(RuntimeContext);
|
|
||||||
const network = provider?.network;
|
|
||||||
|
|
||||||
const toMiner =
|
const toMiner =
|
||||||
txData.confirmedData?.miner !== undefined &&
|
txData.confirmedData?.miner !== undefined &&
|
||||||
internalOp.to === txData.confirmedData.miner;
|
internalOp.to === txData.confirmedData.miner;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="flex items-baseline space-x-1 text-xs">
|
<div className="flex items-baseline space-x-1 whitespace-nowrap">
|
||||||
<span className="text-gray-500">
|
<span className="text-gray-500">
|
||||||
<FontAwesomeIcon icon={faAngleRight} size="1x" /> SELF DESTRUCT
|
<FontAwesomeIcon icon={faAngleRight} size="1x" /> SELF DESTRUCT
|
||||||
</span>
|
</span>
|
||||||
<span>Contract</span>
|
<span>Contract</span>
|
||||||
<div className="flex items-baseline">
|
<div className="flex items-baseline">
|
||||||
<AddressHighlighter address={internalOp.from}>
|
<AddressHighlighter address={internalOp.from}>
|
||||||
<DecoratedAddressLink address={internalOp.from} selfDestruct />
|
<DecoratedAddressLink
|
||||||
|
address={internalOp.from}
|
||||||
|
selfDestruct
|
||||||
|
resolvedAddresses={resolvedAddresses}
|
||||||
|
/>
|
||||||
</AddressHighlighter>
|
</AddressHighlighter>
|
||||||
</div>
|
</div>
|
||||||
{network?.chainId === 1 && internalOp.to === CHI_ADDRESS && (
|
{internalOp.value.isZero() && (
|
||||||
<span className="text-gray-400">(Chi Gastoken)</span>
|
<div className="flex items-baseline text-gray-400">
|
||||||
)}
|
(To:{" "}
|
||||||
{network?.chainId === 1 && internalOp.to === GST2_ADDRESS && (
|
<TransactionAddress
|
||||||
<span className="text-gray-400">(GST2 Gastoken)</span>
|
address={internalOp.to}
|
||||||
|
resolvedAddresses={resolvedAddresses}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{!internalOp.value.isZero() && (
|
{!internalOp.value.isZero() && (
|
||||||
<div className="ml-5 flex items-baseline space-x-1 text-xs">
|
<div className="ml-5 flex items-baseline space-x-1">
|
||||||
<span className="text-gray-500">
|
<span className="text-gray-500">
|
||||||
<FontAwesomeIcon icon={faAngleRight} size="1x" /> TRANSFER
|
<FontAwesomeIcon icon={faAngleRight} size="1x" /> TRANSFER
|
||||||
</span>
|
</span>
|
||||||
|
@ -59,7 +64,11 @@ const InternalSelfDestruct: React.FC<InternalSelfDestructProps> = ({
|
||||||
toMiner ? "rounded px-2 py-1 bg-yellow-100" : ""
|
toMiner ? "rounded px-2 py-1 bg-yellow-100" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<DecoratedAddressLink address={internalOp.to} miner={toMiner} />
|
<DecoratedAddressLink
|
||||||
|
address={internalOp.to}
|
||||||
|
miner={toMiner}
|
||||||
|
resolvedAddresses={resolvedAddresses}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</AddressHighlighter>
|
</AddressHighlighter>
|
||||||
</div>
|
</div>
|
||||||
|
@ -69,4 +78,4 @@ const InternalSelfDestruct: React.FC<InternalSelfDestructProps> = ({
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default React.memo(InternalSelfDestruct);
|
export default InternalSelfDestruct;
|
||||||
|
|
|
@ -22,11 +22,18 @@ const InternalTransactionOperation: React.FC<InternalTransactionOperationProps>
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{internalOp.type === OperationType.SELF_DESTRUCT && (
|
{internalOp.type === OperationType.SELF_DESTRUCT && (
|
||||||
<InternalSelfDestruct txData={txData} internalOp={internalOp} />
|
<InternalSelfDestruct
|
||||||
|
txData={txData}
|
||||||
|
internalOp={internalOp}
|
||||||
|
resolvedAddresses={resolvedAddresses}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
{(internalOp.type === OperationType.CREATE ||
|
{(internalOp.type === OperationType.CREATE ||
|
||||||
internalOp.type === OperationType.CREATE2) && (
|
internalOp.type === OperationType.CREATE2) && (
|
||||||
<InternalCreate txData={txData} internalOp={internalOp} />
|
<InternalCreate
|
||||||
|
internalOp={internalOp}
|
||||||
|
resolvedAddresses={resolvedAddresses}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
@ -26,7 +26,7 @@ const InternalTransfer: React.FC<InternalTransferProps> = ({
|
||||||
internalOp.to === txData.confirmedData.miner;
|
internalOp.to === txData.confirmedData.miner;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex items-baseline space-x-1 text-xs">
|
<div className="flex items-baseline space-x-1 whitespace-nowrap">
|
||||||
<span className="text-gray-500">
|
<span className="text-gray-500">
|
||||||
<FontAwesomeIcon icon={faAngleRight} size="1x" /> TRANSFER
|
<FontAwesomeIcon icon={faAngleRight} size="1x" /> TRANSFER
|
||||||
</span>
|
</span>
|
||||||
|
@ -44,6 +44,7 @@ const InternalTransfer: React.FC<InternalTransferProps> = ({
|
||||||
miner={fromMiner}
|
miner={fromMiner}
|
||||||
txFrom={internalOp.from === txData.from}
|
txFrom={internalOp.from === txData.from}
|
||||||
txTo={internalOp.from === txData.to}
|
txTo={internalOp.from === txData.to}
|
||||||
|
resolvedAddresses={resolvedAddresses}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</AddressHighlighter>
|
</AddressHighlighter>
|
||||||
|
@ -61,6 +62,7 @@ const InternalTransfer: React.FC<InternalTransferProps> = ({
|
||||||
miner={toMiner}
|
miner={toMiner}
|
||||||
txFrom={internalOp.to === txData.from}
|
txFrom={internalOp.to === txData.from}
|
||||||
txTo={internalOp.to === txData.to}
|
txTo={internalOp.to === txData.to}
|
||||||
|
resolvedAddresses={resolvedAddresses}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</AddressHighlighter>
|
</AddressHighlighter>
|
||||||
|
@ -69,4 +71,4 @@ const InternalTransfer: React.FC<InternalTransferProps> = ({
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default React.memo(InternalTransfer);
|
export default InternalTransfer;
|
||||||
|
|
|
@ -88,6 +88,11 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
if (txData.confirmedData?.createdContractAddress) {
|
if (txData.confirmedData?.createdContractAddress) {
|
||||||
_addresses.push(txData.confirmedData.createdContractAddress);
|
_addresses.push(txData.confirmedData.createdContractAddress);
|
||||||
}
|
}
|
||||||
|
for (const t of txData.tokenTransfers) {
|
||||||
|
_addresses.push(t.from);
|
||||||
|
_addresses.push(t.to);
|
||||||
|
_addresses.push(t.token);
|
||||||
|
}
|
||||||
return _addresses;
|
return _addresses;
|
||||||
}, [txData]);
|
}, [txData]);
|
||||||
const { sourcifySource } = useAppConfigContext();
|
const { sourcifySource } = useAppConfigContext();
|
||||||
|
@ -194,7 +199,7 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{internalOps && internalOps.length > 0 && (
|
{internalOps && internalOps.length > 0 && (
|
||||||
<div className="mt-2 space-y-1">
|
<div className="mt-2 space-y-1 overflow-x-auto">
|
||||||
{internalOps.map((op, i) => (
|
{internalOps.map((op, i) => (
|
||||||
<InternalTransactionOperation
|
<InternalTransactionOperation
|
||||||
key={i}
|
key={i}
|
||||||
|
@ -213,17 +218,15 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
)}
|
)}
|
||||||
{txData.tokenTransfers.length > 0 && (
|
{txData.tokenTransfers.length > 0 && (
|
||||||
<InfoRow title={`Tokens Transferred (${txData.tokenTransfers.length})`}>
|
<InfoRow title={`Tokens Transferred (${txData.tokenTransfers.length})`}>
|
||||||
<div>
|
|
||||||
{txData.tokenTransfers.map((t, i) => (
|
{txData.tokenTransfers.map((t, i) => (
|
||||||
<TokenTransferItem
|
<TokenTransferItem
|
||||||
key={i}
|
key={i}
|
||||||
t={t}
|
t={t}
|
||||||
txData={txData}
|
|
||||||
tokenMeta={txData.tokenMetas[t.token]}
|
tokenMeta={txData.tokenMetas[t.token]}
|
||||||
resolvedAddresses={resolvedAddresses}
|
resolvedAddresses={resolvedAddresses}
|
||||||
|
metadatas={metadatas}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
|
||||||
</InfoRow>
|
</InfoRow>
|
||||||
)}
|
)}
|
||||||
<InfoRow title="Value">
|
<InfoRow title="Value">
|
||||||
|
@ -250,24 +253,16 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
{txData.type === 2 && (
|
{txData.type === 2 && (
|
||||||
<>
|
<>
|
||||||
<InfoRow title="Max Priority Fee Per Gas">
|
<InfoRow title="Max Priority Fee Per Gas">
|
||||||
<span>
|
|
||||||
<FormattedBalance value={txData.maxPriorityFeePerGas!} /> Ether (
|
<FormattedBalance value={txData.maxPriorityFeePerGas!} /> Ether (
|
||||||
<FormattedBalance
|
<FormattedBalance
|
||||||
value={txData.maxPriorityFeePerGas!}
|
value={txData.maxPriorityFeePerGas!}
|
||||||
decimals={9}
|
decimals={9}
|
||||||
/>{" "}
|
/>{" "}
|
||||||
Gwei)
|
Gwei)
|
||||||
</span>
|
|
||||||
</InfoRow>
|
</InfoRow>
|
||||||
<InfoRow title="Max Fee Per Gas">
|
<InfoRow title="Max Fee Per Gas">
|
||||||
<span>
|
|
||||||
<FormattedBalance value={txData.maxFeePerGas!} /> Ether (
|
<FormattedBalance value={txData.maxFeePerGas!} /> Ether (
|
||||||
<FormattedBalance
|
<FormattedBalance value={txData.maxFeePerGas!} decimals={9} /> Gwei)
|
||||||
value={txData.maxFeePerGas!}
|
|
||||||
decimals={9}
|
|
||||||
/>{" "}
|
|
||||||
Gwei)
|
|
||||||
</span>
|
|
||||||
</InfoRow>
|
</InfoRow>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
@ -309,7 +304,6 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
)}
|
)}
|
||||||
{txData.confirmedData && hasEIP1559 && (
|
{txData.confirmedData && hasEIP1559 && (
|
||||||
<InfoRow title="Block Base Fee">
|
<InfoRow title="Block Base Fee">
|
||||||
<span>
|
|
||||||
<FormattedBalance
|
<FormattedBalance
|
||||||
value={txData.confirmedData.blockBaseFeePerGas!}
|
value={txData.confirmedData.blockBaseFeePerGas!}
|
||||||
decimals={9}
|
decimals={9}
|
||||||
|
@ -320,7 +314,6 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
decimals={0}
|
decimals={0}
|
||||||
/>{" "}
|
/>{" "}
|
||||||
wei)
|
wei)
|
||||||
</span>
|
|
||||||
</InfoRow>
|
</InfoRow>
|
||||||
)}
|
)}
|
||||||
{txData.confirmedData && (
|
{txData.confirmedData && (
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit e439c36937deb321ad01c23ac23941e8a491efe9
|
Subproject commit 30e4ffa0153594b11421cf383b1192e4414d2f66
|
Loading…
Reference in New Issue