Merge branch 'feature/tailwindcss3' into develop; fix #324
This commit is contained in:
commit
96646cb13c
File diff suppressed because it is too large
Load Diff
|
@ -75,10 +75,10 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-react": "^2.0.0",
|
"@vitejs/plugin-react": "^2.0.0",
|
||||||
"autoprefixer": "^9.8.8",
|
"autoprefixer": "^10.4.8",
|
||||||
"postcss": "^7.0.39",
|
"postcss": "^8.4.16",
|
||||||
"source-map-explorer": "^2.5.2",
|
"source-map-explorer": "^2.5.2",
|
||||||
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.6",
|
"tailwindcss": "^3.1.8",
|
||||||
"vite": "^3.0.4",
|
"vite": "^3.0.4",
|
||||||
"vite-plugin-compression": "^0.5.1"
|
"vite-plugin-compression": "^0.5.1"
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ const Block: React.FC = () => {
|
||||||
</InfoRow>
|
</InfoRow>
|
||||||
<InfoRow title="Transactions">
|
<InfoRow title="Transactions">
|
||||||
<NavLink
|
<NavLink
|
||||||
className="bg-link-blue bg-opacity-10 text-link-blue hover:bg-opacity-100 hover:text-white rounded-lg px-2 py-1 text-xs"
|
className="bg-link-blue/10 text-link-blue hover:bg-link-blue/100 hover:text-white rounded-lg px-2 py-1 text-xs"
|
||||||
to={blockTxsURL(block.number)}
|
to={blockTxsURL(block.number)}
|
||||||
>
|
>
|
||||||
{block.transactionCount} transactions
|
{block.transactionCount} transactions
|
||||||
|
@ -111,7 +111,7 @@ const Block: React.FC = () => {
|
||||||
{blockETHUSDPrice && (
|
{blockETHUSDPrice && (
|
||||||
<>
|
<>
|
||||||
{" "}
|
{" "}
|
||||||
<span className="px-2 border-yellow-200 border rounded-lg bg-yellow-100 text-yellow-600">
|
<span className="px-2 border-amber-200 border rounded-lg bg-amber-100 text-amber-600">
|
||||||
<ETH2USDValue
|
<ETH2USDValue
|
||||||
ethAmount={block.blockReward.add(netFeeReward)}
|
ethAmount={block.blockReward.add(netFeeReward)}
|
||||||
eth2USDValue={blockETHUSDPrice}
|
eth2USDValue={blockETHUSDPrice}
|
||||||
|
|
|
@ -100,7 +100,7 @@ const Step: React.FC<PropsWithChildren<StepProps>> = React.memo(
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{type === "ok" && (
|
{type === "ok" && (
|
||||||
<span className="text-green-600">
|
<span className="text-emerald-600">
|
||||||
<FontAwesomeIcon icon={faCheckCircle} size="1x" />
|
<FontAwesomeIcon icon={faCheckCircle} size="1x" />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -39,7 +39,7 @@ const Faucets: React.FC = () => {
|
||||||
<ContentFrame>
|
<ContentFrame>
|
||||||
<div className="py-4 space-y-3">
|
<div className="py-4 space-y-3">
|
||||||
{urls.length > 0 && (
|
{urls.length > 0 && (
|
||||||
<div className="flex space-x-2 items-baseline rounded bg-yellow-200 text-red-800 font-bold underline px-2 py-1">
|
<div className="flex space-x-2 items-baseline rounded bg-amber-200 text-red-800 font-bold underline px-2 py-1">
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
className="self-center"
|
className="self-center"
|
||||||
icon={faTriangleExclamation}
|
icon={faTriangleExclamation}
|
||||||
|
@ -54,7 +54,7 @@ const Faucets: React.FC = () => {
|
||||||
)}
|
)}
|
||||||
{/* Display the shuffling notice only if there are 1+ faucets */}
|
{/* Display the shuffling notice only if there are 1+ faucets */}
|
||||||
{urls.length > 1 && (
|
{urls.length > 1 && (
|
||||||
<div className="flex space-x-2 items-baseline rounded bg-yellow-200 text-yellow-700 px-2 py-1">
|
<div className="flex space-x-2 items-baseline rounded bg-amber-200 text-amber-700 px-2 py-1">
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
className="self-center"
|
className="self-center"
|
||||||
icon={faTriangleExclamation}
|
icon={faTriangleExclamation}
|
||||||
|
|
|
@ -23,9 +23,9 @@ const Home: React.FC = () => {
|
||||||
document.title = "Home | Otterscan";
|
document.title = "Home | Otterscan";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto flex flex-col flex-grow pb-5">
|
<div className="mx-auto flex flex-col grow pb-5">
|
||||||
{isScanning && <CameraScanner turnOffScan={() => setScanning(false)} />}
|
{isScanning && <CameraScanner turnOffScan={() => setScanning(false)} />}
|
||||||
<div className="m-5 mb-10 flex items-end flex-grow max-h-64">
|
<div className="m-5 mb-10 flex items-end grow max-h-64">
|
||||||
<Logo />
|
<Logo />
|
||||||
</div>
|
</div>
|
||||||
<form
|
<form
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { PropsWithChildren } from "react";
|
import React, { PropsWithChildren } from "react";
|
||||||
|
|
||||||
const StandardFrame: React.FC<PropsWithChildren> = ({ children }) => (
|
const StandardFrame: React.FC<PropsWithChildren> = ({ children }) => (
|
||||||
<div className="flex-grow bg-gray-100 px-9 pt-3 pb-12">{children}</div>
|
<div className="grow bg-gray-100 px-9 pt-3 pb-12">{children}</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
export default StandardFrame;
|
export default StandardFrame;
|
||||||
|
|
|
@ -140,7 +140,7 @@ const AddressTransactionResults: React.FC<AddressTransactionResultsProps> = ({
|
||||||
<div className="space-x-2">
|
<div className="space-x-2">
|
||||||
<TransactionValue value={balance} />
|
<TransactionValue value={balance} />
|
||||||
{!balance.isZero() && priceMap["latest"] !== undefined && (
|
{!balance.isZero() && priceMap["latest"] !== undefined && (
|
||||||
<span className="px-2 border-green-200 border rounded-lg bg-green-100 text-green-600">
|
<span className="px-2 border-emerald-200 border rounded-lg bg-emerald-100 text-emerald-600">
|
||||||
<ETH2USDValue
|
<ETH2USDValue
|
||||||
ethAmount={balance}
|
ethAmount={balance}
|
||||||
eth2USDValue={priceMap["latest"]}
|
eth2USDValue={priceMap["latest"]}
|
||||||
|
|
|
@ -44,8 +44,8 @@ const Contracts: React.FC<ContractsProps> = ({
|
||||||
<InfoRow title="Optimizer Enabled">
|
<InfoRow title="Optimizer Enabled">
|
||||||
{optimizer?.enabled ? (
|
{optimizer?.enabled ? (
|
||||||
<span>
|
<span>
|
||||||
<span className="font-bold text-green-600">Yes</span> with{" "}
|
<span className="font-bold text-emerald-600">Yes</span> with{" "}
|
||||||
<span className="font-bold text-green-600">
|
<span className="font-bold text-emerald-600">
|
||||||
{commify(optimizer?.runs)}
|
{commify(optimizer?.runs)}
|
||||||
</span>{" "}
|
</span>{" "}
|
||||||
runs
|
runs
|
||||||
|
|
|
@ -28,14 +28,14 @@ const DecodedFragment: React.FC<DecodedFragmentProps> = ({
|
||||||
fragmentType = "function";
|
fragmentType = "function";
|
||||||
sig = intf.getSighash(fragment);
|
sig = intf.getSighash(fragment);
|
||||||
letter = "F";
|
letter = "F";
|
||||||
letterBg = "bg-purple-500";
|
letterBg = "bg-violet-500";
|
||||||
hashBg = "bg-purple-50";
|
hashBg = "bg-violet-50";
|
||||||
} else if (EventFragment.isEventFragment(fragment)) {
|
} else if (EventFragment.isEventFragment(fragment)) {
|
||||||
fragmentType = "event";
|
fragmentType = "event";
|
||||||
sig = intf.getEventTopic(fragment);
|
sig = intf.getEventTopic(fragment);
|
||||||
letter = "E";
|
letter = "E";
|
||||||
letterBg = "bg-green-300";
|
letterBg = "bg-emerald-300";
|
||||||
hashBg = "bg-green-50";
|
hashBg = "bg-emerald-50";
|
||||||
} else if (ConstructorFragment.isConstructorFragment(fragment)) {
|
} else if (ConstructorFragment.isConstructorFragment(fragment)) {
|
||||||
fragmentType = "constructor";
|
fragmentType = "constructor";
|
||||||
letter = "C";
|
letter = "C";
|
||||||
|
@ -49,7 +49,7 @@ const DecodedFragment: React.FC<DecodedFragmentProps> = ({
|
||||||
</span>
|
</span>
|
||||||
{letter && (
|
{letter && (
|
||||||
<span
|
<span
|
||||||
className={`flex-shrink-0 text-xs font-code border border-gray-300 rounded-full w-5 h-5 self-center flex items-center justify-center text-white font-bold ${letterBg}`}
|
className={`shrink-0 text-xs font-code border border-gray-300 rounded-full w-5 h-5 self-center flex items-center justify-center text-white font-bold ${letterBg}`}
|
||||||
>
|
>
|
||||||
{letter}
|
{letter}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -17,7 +17,7 @@ const NavButton: React.FC<PropsWithChildren<NavButtonProps>> = ({
|
||||||
}) => {
|
}) => {
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
return (
|
return (
|
||||||
<span className="bg-link-blue bg-opacity-10 text-gray-400 rounded px-2 py-1 text-xs">
|
<span className="bg-link-blue/10 text-gray-400 rounded px-2 py-1 text-xs">
|
||||||
{children}
|
{children}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
@ -25,7 +25,7 @@ const NavButton: React.FC<PropsWithChildren<NavButtonProps>> = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NavLink
|
<NavLink
|
||||||
className="transition-colors bg-link-blue bg-opacity-10 text-link-blue hover:bg-opacity-100 hover:text-white disabled:bg-link-blue disabled:text-gray-400 disabled:cursor-default rounded px-2 py-1 text-xs"
|
className="transition-colors bg-link-blue/10 text-link-blue hover:bg-link-blue/100 hover:text-white disabled:bg-link-blue disabled:text-gray-400 disabled:cursor-default rounded px-2 py-1 text-xs"
|
||||||
to={urlBuilder ? urlBuilder(blockNum) : blockURL(blockNum)}
|
to={urlBuilder ? urlBuilder(blockNum) : blockURL(blockNum)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
|
@ -47,13 +47,13 @@ const DecoratedAddressLink: React.FC<DecoratedAddressLinkProps> = ({
|
||||||
className={`flex items-baseline space-x-1 ${
|
className={`flex items-baseline space-x-1 ${
|
||||||
txFrom ? "bg-skin-from" : ""
|
txFrom ? "bg-skin-from" : ""
|
||||||
} ${txTo ? "bg-skin-to" : ""} ${
|
} ${txTo ? "bg-skin-to" : ""} ${
|
||||||
mint ? "italic text-green-500 hover:text-green-700" : ""
|
mint ? "italic text-emerald-500 hover:text-emerald-700" : ""
|
||||||
} ${burn ? "line-through text-orange-500 hover:text-orange-700" : ""} ${
|
} ${burn ? "line-through text-orange-500 hover:text-orange-700" : ""} ${
|
||||||
selfDestruct ? "line-through opacity-70 hover:opacity-100" : ""
|
selfDestruct ? "line-through opacity-70 hover:opacity-100" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{creation && (
|
{creation && (
|
||||||
<span className="text-yellow-300" title="Contract creation">
|
<span className="text-amber-300" title="Contract creation">
|
||||||
<FontAwesomeIcon icon={faStar} size="1x" />
|
<FontAwesomeIcon icon={faStar} size="1x" />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
@ -63,7 +63,7 @@ const DecoratedAddressLink: React.FC<DecoratedAddressLinkProps> = ({
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{mint && (
|
{mint && (
|
||||||
<span className="text-green-500" title="Mint address">
|
<span className="text-emerald-500" title="Mint address">
|
||||||
<FontAwesomeIcon icon={faMoneyBillAlt} size="1x" />
|
<FontAwesomeIcon icon={faMoneyBillAlt} size="1x" />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
@ -73,13 +73,13 @@ const DecoratedAddressLink: React.FC<DecoratedAddressLinkProps> = ({
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{miner && (
|
{miner && (
|
||||||
<span className="text-yellow-400" title="Miner address">
|
<span className="text-amber-400" title="Miner address">
|
||||||
<FontAwesomeIcon icon={faCoins} size="1x" />
|
<FontAwesomeIcon icon={faCoins} size="1x" />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{metadata && (
|
{metadata && (
|
||||||
<NavLink
|
<NavLink
|
||||||
className="self-center flex-shrink-0 flex items-center"
|
className="self-center shrink-0 flex items-center"
|
||||||
to={`/address/${address}/contract`}
|
to={`/address/${address}/contract`}
|
||||||
>
|
>
|
||||||
<SourcifyLogo />
|
<SourcifyLogo />
|
||||||
|
@ -160,10 +160,7 @@ const AddressLegend: React.FC<PropsWithChildren<AddressLegendProps>> = ({
|
||||||
title,
|
title,
|
||||||
children,
|
children,
|
||||||
}) => (
|
}) => (
|
||||||
<span
|
<span className="text-xs text-gray-400/70 not-italic" title={title}>
|
||||||
className="text-xs text-gray-400 text-opacity-70 not-italic"
|
|
||||||
title={title}
|
|
||||||
>
|
|
||||||
{children}
|
{children}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
|
@ -48,7 +48,7 @@ type ContentProps = {
|
||||||
const Content: React.FC<ContentProps> = ({ linkable, name }) => (
|
const Content: React.FC<ContentProps> = ({ linkable, name }) => (
|
||||||
<>
|
<>
|
||||||
<img
|
<img
|
||||||
className={`self-center ${linkable ? "" : "filter grayscale"}`}
|
className={`self-center ${linkable ? "" : "grayscale"}`}
|
||||||
src={ENSLogo}
|
src={ENSLogo}
|
||||||
alt="ENS Logo"
|
alt="ENS Logo"
|
||||||
width={12}
|
width={12}
|
||||||
|
|
|
@ -54,7 +54,7 @@ const InternalSelfDestruct: React.FC<InternalSelfDestructProps> = ({
|
||||||
<AddressHighlighter address={internalOp.to}>
|
<AddressHighlighter address={internalOp.to}>
|
||||||
<div
|
<div
|
||||||
className={`flex items-baseline space-x-1 ${
|
className={`flex items-baseline space-x-1 ${
|
||||||
toMiner ? "rounded px-2 py-1 bg-yellow-100" : ""
|
toMiner ? "rounded px-2 py-1 bg-amber-100" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<DecoratedAddressLink address={internalOp.to} miner={toMiner} />
|
<DecoratedAddressLink address={internalOp.to} miner={toMiner} />
|
||||||
|
|
|
@ -58,7 +58,7 @@ const InternalTransfer: React.FC<InternalTransferProps> = ({
|
||||||
<AddressHighlighter address={internalOp.from}>
|
<AddressHighlighter address={internalOp.from}>
|
||||||
<div
|
<div
|
||||||
className={`flex items-baseline space-x-1 ${
|
className={`flex items-baseline space-x-1 ${
|
||||||
fromMiner ? "rounded px-2 py-1 bg-yellow-100" : ""
|
fromMiner ? "rounded px-2 py-1 bg-amber-100" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<DecoratedAddressLink
|
<DecoratedAddressLink
|
||||||
|
@ -79,7 +79,7 @@ const InternalTransfer: React.FC<InternalTransferProps> = ({
|
||||||
<AddressHighlighter address={internalOp.to}>
|
<AddressHighlighter address={internalOp.to}>
|
||||||
<div
|
<div
|
||||||
className={`flex items-baseline space-x-1 ${
|
className={`flex items-baseline space-x-1 ${
|
||||||
toMiner ? "rounded px-2 py-1 bg-yellow-100" : ""
|
toMiner ? "rounded px-2 py-1 bg-amber-100" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<DecoratedAddressLink
|
<DecoratedAddressLink
|
||||||
|
|
|
@ -11,7 +11,7 @@ const MethodName: React.FC<MethodNameProps> = ({ data }) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`${
|
className={`${
|
||||||
isSimpleTransfer ? "bg-yellow-100" : "bg-blue-50"
|
isSimpleTransfer ? "bg-amber-100" : "bg-blue-50"
|
||||||
} rounded-lg px-3 py-1 min-h-full flex items-baseline text-xs max-w-max`}
|
} rounded-lg px-3 py-1 min-h-full flex items-baseline text-xs max-w-max`}
|
||||||
>
|
>
|
||||||
<p className="truncate" title={methodTitle}>
|
<p className="truncate" title={methodTitle}>
|
||||||
|
|
|
@ -9,13 +9,13 @@ type NonceProps = {
|
||||||
|
|
||||||
const Nonce: React.FC<NonceProps> = ({ value }) => (
|
const Nonce: React.FC<NonceProps> = ({ value }) => (
|
||||||
<span
|
<span
|
||||||
className="flex items-baseline space-x-2 rounded-lg px-2 py-1 bg-green-50 text-xs"
|
className="flex items-baseline space-x-2 rounded-lg px-2 py-1 bg-emerald-50 text-xs"
|
||||||
title="Nonce"
|
title="Nonce"
|
||||||
>
|
>
|
||||||
<span className="text-green-400">
|
<span className="text-emerald-400">
|
||||||
<FontAwesomeIcon icon={faArrowUp} size="1x" />
|
<FontAwesomeIcon icon={faArrowUp} size="1x" />
|
||||||
</span>
|
</span>
|
||||||
<span className="text-green-600">{commify(value)}</span>
|
<span className="text-emerald-600">{commify(value)}</span>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ type PercentageBarProps = {
|
||||||
|
|
||||||
const PercentageBar: React.FC<PercentageBarProps> = ({ perc }) => (
|
const PercentageBar: React.FC<PercentageBarProps> = ({ perc }) => (
|
||||||
<div className="self-center w-40 border rounded border-gray-200">
|
<div className="self-center w-40 border rounded border-gray-200">
|
||||||
<div className="w-full h-5 rounded bg-gradient-to-r from-red-400 via-yellow-300 to-green-400 relative">
|
<div className="w-full h-5 rounded bg-gradient-to-r from-red-400 via-amber-300 to-emerald-400 relative">
|
||||||
<div
|
<div
|
||||||
className="absolute top-0 right-0 bg-white h-full rounded-r"
|
className="absolute top-0 right-0 bg-white h-full rounded-r"
|
||||||
style={{ width: `${100 - perc}%` }}
|
style={{ width: `${100 - perc}%` }}
|
||||||
|
|
|
@ -66,7 +66,7 @@ const HighlighterBox: React.FC<PropsWithChildren<HighlighterBoxProps>> =
|
||||||
React.memo(({ selected, select, deselect, children }) => (
|
React.memo(({ selected, select, deselect, children }) => (
|
||||||
<div
|
<div
|
||||||
className={`border border-dashed rounded hover:bg-transparent hover:border-transparent px-1 truncate ${
|
className={`border border-dashed rounded hover:bg-transparent hover:border-transparent px-1 truncate ${
|
||||||
selected ? "border-orange-400 bg-yellow-100" : "border-transparent"
|
selected ? "border-orange-400 bg-amber-100" : "border-transparent"
|
||||||
}`}
|
}`}
|
||||||
onMouseEnter={select}
|
onMouseEnter={select}
|
||||||
onMouseLeave={deselect}
|
onMouseLeave={deselect}
|
||||||
|
|
|
@ -74,7 +74,7 @@ const Content: React.FC<ContentProps> = ({
|
||||||
}) => (
|
}) => (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
className={`self-center w-5 h-5 ${linkable ? "" : "filter grayscale"}`}
|
className={`self-center w-5 h-5 ${linkable ? "" : "grayscale"}`}
|
||||||
>
|
>
|
||||||
<TokenLogo chainId={chainId} address={address} name={name} />
|
<TokenLogo chainId={chainId} address={address} name={name} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,15 +23,15 @@ const TransactionDirection: React.FC<TransactionDirectionProps> = ({
|
||||||
direction,
|
direction,
|
||||||
flags,
|
flags,
|
||||||
}) => {
|
}) => {
|
||||||
let bgColor = "bg-green-50";
|
let bgColor = "bg-emerald-50";
|
||||||
let fgColor = "text-green-500";
|
let fgColor = "text-emerald-500";
|
||||||
let msg: string | null = null;
|
let msg: string | null = null;
|
||||||
|
|
||||||
if (direction === Direction.IN) {
|
if (direction === Direction.IN) {
|
||||||
msg = "IN";
|
msg = "IN";
|
||||||
} else if (direction === Direction.OUT) {
|
} else if (direction === Direction.OUT) {
|
||||||
bgColor = "bg-yellow-100";
|
bgColor = "bg-amber-100";
|
||||||
fgColor = "text-yellow-600";
|
fgColor = "text-amber-600";
|
||||||
msg = "OUT";
|
msg = "OUT";
|
||||||
} else if (direction === Direction.SELF) {
|
} else if (direction === Direction.SELF) {
|
||||||
bgColor = "bg-gray-200";
|
bgColor = "bg-gray-200";
|
||||||
|
@ -39,12 +39,12 @@ const TransactionDirection: React.FC<TransactionDirectionProps> = ({
|
||||||
msg = "SELF";
|
msg = "SELF";
|
||||||
} else if (direction === Direction.INTERNAL) {
|
} else if (direction === Direction.INTERNAL) {
|
||||||
msg = "INT";
|
msg = "INT";
|
||||||
bgColor = "bg-green-100";
|
bgColor = "bg-emerald-100";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags === Flags.MINER) {
|
if (flags === Flags.MINER) {
|
||||||
bgColor = "bg-yellow-50";
|
bgColor = "bg-amber-50";
|
||||||
fgColor = "text-yellow-400";
|
fgColor = "text-amber-400";
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -77,7 +77,7 @@ const Content: React.FC<ContentProps> = ({
|
||||||
}) => (
|
}) => (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
className={`self-center w-5 h-5 ${linkable ? "" : "filter grayscale"}`}
|
className={`self-center w-5 h-5 ${linkable ? "" : "grayscale"}`}
|
||||||
>
|
>
|
||||||
<TokenLogo chainId={chainId} address={address} name={name} />
|
<TokenLogo chainId={chainId} address={address} name={name} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -94,7 +94,7 @@ const Content: React.FC<ContentProps> = ({
|
||||||
}) => (
|
}) => (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
className={`self-center w-5 h-5 ${linkable ? "" : "filter grayscale"}`}
|
className={`self-center w-5 h-5 ${linkable ? "" : "grayscale"}`}
|
||||||
>
|
>
|
||||||
<TokenLogo chainId={chainId} address={address} name={name} />
|
<TokenLogo chainId={chainId} address={address} name={name} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -102,7 +102,7 @@ const Content: React.FC<ContentProps> = ({
|
||||||
}) => (
|
}) => (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
className={`self-center w-5 h-5 ${linkable ? "" : "filter grayscale"}`}
|
className={`self-center w-5 h-5 ${linkable ? "" : "grayscale"}`}
|
||||||
>
|
>
|
||||||
<TokenLogo chainId={chainId} address={address} name={name} />
|
<TokenLogo chainId={chainId} address={address} name={name} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,7 +25,7 @@ const ValueHighlighter: React.FC<ValueHighlighterProps> = ({
|
||||||
selection !== null &&
|
selection !== null &&
|
||||||
selection.type === "value" &&
|
selection.type === "value" &&
|
||||||
selection.content === value.toString()
|
selection.content === value.toString()
|
||||||
? "border-orange-400 bg-yellow-100"
|
? "border-orange-400 bg-amber-100"
|
||||||
: "border-transparent"
|
: "border-transparent"
|
||||||
}`}
|
}`}
|
||||||
onMouseEnter={select}
|
onMouseEnter={select}
|
||||||
|
|
|
@ -13,7 +13,7 @@ const PageButton: React.FC<PropsWithChildren<PageButtonProps>> = ({
|
||||||
}) => {
|
}) => {
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
return (
|
return (
|
||||||
<span className="bg-link-blue bg-opacity-10 text-gray-400 rounded-lg px-3 py-2 text-xs">
|
<span className="bg-link-blue/10 text-gray-400 rounded-lg px-3 py-2 text-xs">
|
||||||
{children}
|
{children}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
@ -21,7 +21,7 @@ const PageButton: React.FC<PropsWithChildren<PageButtonProps>> = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NavLink
|
<NavLink
|
||||||
className="transition-colors bg-link-blue bg-opacity-10 text-link-blue hover:bg-opacity-100 hover:text-white disabled:bg-link-blue disabled:text-gray-400 disabled:cursor-default rounded-lg px-3 py-2 text-xs"
|
className="transition-colors bg-link-blue/10 text-link-blue hover:bg-link-blue/100 hover:text-white disabled:bg-link-blue disabled:text-gray-400 disabled:cursor-default rounded-lg px-3 py-2 text-xs"
|
||||||
to={`?p=${goToPage}`}
|
to={`?p=${goToPage}`}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
|
@ -65,9 +65,7 @@ const TransactionItem: React.FC<TransactionItemProps> = ({
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`grid grid-cols-12 gap-x-1 items-baseline text-sm border-t border-gray-200 ${
|
className={`grid grid-cols-12 gap-x-1 items-baseline text-sm border-t border-gray-200 ${
|
||||||
flash
|
flash ? "bg-amber-100 hover:bg-amber-200" : "hover:bg-skin-table-hover"
|
||||||
? "bg-yellow-100 hover:bg-yellow-200"
|
|
||||||
: "hover:bg-skin-table-hover"
|
|
||||||
} px-2 py-3`}
|
} px-2 py-3`}
|
||||||
>
|
>
|
||||||
<div className="col-span-2 flex space-x-1 items-baseline">
|
<div className="col-span-2 flex space-x-1 items-baseline">
|
||||||
|
|
|
@ -13,7 +13,7 @@ const UndefinedPageButton: React.FC<
|
||||||
> = ({ address, direction, hash, disabled, children }) => {
|
> = ({ address, direction, hash, disabled, children }) => {
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
return (
|
return (
|
||||||
<span className="bg-link-blue bg-opacity-10 text-gray-400 rounded-lg px-3 py-2 text-xs">
|
<span className="bg-link-blue/10 text-gray-400 rounded-lg px-3 py-2 text-xs">
|
||||||
{children}
|
{children}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
@ -21,7 +21,7 @@ const UndefinedPageButton: React.FC<
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NavLink
|
<NavLink
|
||||||
className="transition-colors bg-link-blue bg-opacity-10 text-link-blue hover:bg-opacity-100 hover:text-white disabled:bg-link-blue disabled:text-gray-400 disabled:cursor-default rounded-lg px-3 py-2 text-xs"
|
className="transition-colors bg-link-blue/10 text-link-blue hover:bg-link-blue/100 hover:text-white disabled:bg-link-blue disabled:text-gray-400 disabled:cursor-default rounded-lg px-3 py-2 text-xs"
|
||||||
to={`/address/${address}/txs/${direction}${
|
to={`/address/${address}/txs/${direction}${
|
||||||
direction === "prev" || direction === "next" ? `?h=${hash}` : ""
|
direction === "prev" || direction === "next" ? `?h=${hash}` : ""
|
||||||
}`}
|
}`}
|
||||||
|
|
|
@ -12,7 +12,7 @@ const Blip: React.FC<BlipProps> = ({ value }) => {
|
||||||
<Transition
|
<Transition
|
||||||
show
|
show
|
||||||
appear
|
appear
|
||||||
enter="transition transform ease-in duration-1000 translate-x-full pl-3"
|
enter="transition ease-in duration-1000 translate-x-full pl-3"
|
||||||
enterFrom="opacity-100 translate-y-0"
|
enterFrom="opacity-100 translate-y-0"
|
||||||
enterTo="opacity-0 -translate-y-5"
|
enterTo="opacity-0 -translate-y-5"
|
||||||
afterEnter={() => setShow(false)}
|
afterEnter={() => setShow(false)}
|
||||||
|
@ -20,7 +20,7 @@ const Blip: React.FC<BlipProps> = ({ value }) => {
|
||||||
{show && value !== 0 && (
|
{show && value !== 0 && (
|
||||||
<div
|
<div
|
||||||
className={`absolute bottom-0 font-bold ${
|
className={`absolute bottom-0 font-bold ${
|
||||||
value > 0 ? "text-green-500" : "text-red-500"
|
value > 0 ? "text-emerald-500" : "text-red-500"
|
||||||
} text-3xl`}
|
} text-3xl`}
|
||||||
>
|
>
|
||||||
{value > 0 ? `+${value}` : `${value}`}
|
{value > 0 ? `+${value}` : `${value}`}
|
||||||
|
|
|
@ -33,7 +33,7 @@ const BlockRow: React.FC<BlockRowProps> = ({ now, block, baseFeeDelta }) => {
|
||||||
<div
|
<div
|
||||||
className={`text-right ${
|
className={`text-right ${
|
||||||
block.gasUsed.gt(gasTarget)
|
block.gasUsed.gt(gasTarget)
|
||||||
? "text-green-500"
|
? "text-emerald-500"
|
||||||
: block.gasUsed.lt(gasTarget)
|
: block.gasUsed.lt(gasTarget)
|
||||||
? "text-red-500"
|
? "text-red-500"
|
||||||
: ""
|
: ""
|
||||||
|
|
|
@ -124,7 +124,7 @@ const Blocks: React.FC<BlocksProps> = ({ latestBlock, targetBlockNumber }) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full flex-grow">
|
<div className="w-full grow">
|
||||||
<div className="px-9 pt-3 pb-12 divide-y-2">
|
<div className="px-9 pt-3 pb-12 divide-y-2">
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<div className="flex justify-center items-baseline space-x-2 px-3 pb-2 text-lg text-orange-500 ">
|
<div className="flex justify-center items-baseline space-x-2 px-3 pb-2 text-lg text-orange-500 ">
|
||||||
|
@ -161,7 +161,7 @@ const Blocks: React.FC<BlocksProps> = ({ latestBlock, targetBlockNumber }) => {
|
||||||
<div className="text-right">Gas target</div>
|
<div className="text-right">Gas target</div>
|
||||||
<div className="text-right">Base fee</div>
|
<div className="text-right">Base fee</div>
|
||||||
<div className="text-right col-span-2 flex space-x-1 justify-end items-baseline">
|
<div className="text-right col-span-2 flex space-x-1 justify-end items-baseline">
|
||||||
<span className="text-yellow-400">
|
<span className="text-amber-400">
|
||||||
<FontAwesomeIcon icon={faCoins} />
|
<FontAwesomeIcon icon={faCoins} />
|
||||||
</span>
|
</span>
|
||||||
<span>Rewards</span>
|
<span>Rewards</span>
|
||||||
|
@ -184,10 +184,10 @@ const Blocks: React.FC<BlocksProps> = ({ latestBlock, targetBlockNumber }) => {
|
||||||
key={b.hash}
|
key={b.hash}
|
||||||
show={i < MAX_BLOCK_HISTORY}
|
show={i < MAX_BLOCK_HISTORY}
|
||||||
appear
|
appear
|
||||||
enter="transition transform ease-out duration-500"
|
enter="transition ease-out duration-500"
|
||||||
enterFrom="opacity-0 -translate-y-10"
|
enterFrom="opacity-0 -translate-y-10"
|
||||||
enterTo="opacity-100 translate-y-0"
|
enterTo="opacity-100 translate-y-0"
|
||||||
leave="transition transform ease-out duration-1000"
|
leave="transition ease-out duration-1000"
|
||||||
leaveFrom="opacity-100 translate-y-0"
|
leaveFrom="opacity-100 translate-y-0"
|
||||||
leaveTo="opacity-0 translate-y-10"
|
leaveTo="opacity-0 translate-y-10"
|
||||||
>
|
>
|
||||||
|
|
|
@ -9,7 +9,7 @@ const London: React.FC = () => {
|
||||||
const { provider } = useContext(RuntimeContext);
|
const { provider } = useContext(RuntimeContext);
|
||||||
const block = useLatestBlock(provider);
|
const block = useLatestBlock(provider);
|
||||||
if (!provider || !block) {
|
if (!provider || !block) {
|
||||||
return <div className="flex-grow"></div>;
|
return <div className="grow"></div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display countdown
|
// Display countdown
|
||||||
|
|
|
@ -138,7 +138,7 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
{txData.confirmedData === undefined ? (
|
{txData.confirmedData === undefined ? (
|
||||||
<span className="italic text-gray-400">Pending</span>
|
<span className="italic text-gray-400">Pending</span>
|
||||||
) : txData.confirmedData.status ? (
|
) : txData.confirmedData.status ? (
|
||||||
<span className="flex items-baseline w-min rounded-lg space-x-1 px-3 py-1 bg-green-50 text-green-500 text-xs">
|
<span className="flex items-baseline w-min rounded-lg space-x-1 px-3 py-1 bg-emerald-50 text-emerald-500 text-xs">
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
className="self-center"
|
className="self-center"
|
||||||
icon={faCheckCircle}
|
icon={faCheckCircle}
|
||||||
|
@ -369,7 +369,7 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
<FormattedBalance value={txData.gasPrice} decimals={9} /> Gwei)
|
<FormattedBalance value={txData.gasPrice} decimals={9} /> Gwei)
|
||||||
</span>
|
</span>
|
||||||
{sendsEthToMiner && (
|
{sendsEthToMiner && (
|
||||||
<span className="rounded text-yellow-500 bg-yellow-100 text-xs px-2 py-1">
|
<span className="rounded text-amber-500 bg-amber-100 text-xs px-2 py-1">
|
||||||
Flashbots
|
Flashbots
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -47,7 +47,7 @@ const LogEntry: React.FC<LogEntryProps> = ({ log, logDesc, metadatas }) => {
|
||||||
return (
|
return (
|
||||||
<div className="flex space-x-10 py-5">
|
<div className="flex space-x-10 py-5">
|
||||||
<div>
|
<div>
|
||||||
<span className="rounded-full w-12 h-12 flex items-center justify-center bg-green-50 text-green-500">
|
<span className="rounded-full w-12 h-12 flex items-center justify-center bg-emerald-50 text-emerald-500">
|
||||||
{log.logIndex}
|
{log.logIndex}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,7 +18,7 @@ const NavButton: React.FC<PropsWithChildren<NavButtonProps>> = ({
|
||||||
}) => {
|
}) => {
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
return (
|
return (
|
||||||
<span className="bg-link-blue bg-opacity-10 text-gray-300 rounded px-2 py-1 text-xs">
|
<span className="bg-link-blue/10 text-gray-300 rounded px-2 py-1 text-xs">
|
||||||
{children}
|
{children}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
@ -26,7 +26,7 @@ const NavButton: React.FC<PropsWithChildren<NavButtonProps>> = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NavLink
|
<NavLink
|
||||||
className="bg-link-blue bg-opacity-10 text-link-blue hover:bg-opacity-100 hover:text-white rounded px-2 py-1 text-xs"
|
className="bg-link-blue/10 text-link-blue hover:bg-link-blue/100 hover:text-white rounded px-2 py-1 text-xs"
|
||||||
to={addressByNonceURL(sender, nonce)}
|
to={addressByNonceURL(sender, nonce)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
|
@ -49,13 +49,13 @@ const RewardSplit: React.FC<RewardSplitProps> = ({ txData }) => {
|
||||||
</div>
|
</div>
|
||||||
<PercentageGauge
|
<PercentageGauge
|
||||||
perc={minerPerc}
|
perc={minerPerc}
|
||||||
bgColor="bg-yellow-100"
|
bgColor="bg-amber-100"
|
||||||
bgColorPerc="bg-yellow-300"
|
bgColorPerc="bg-amber-300"
|
||||||
textColor="text-yellow-700"
|
textColor="text-amber-700"
|
||||||
/>
|
/>
|
||||||
<div className="flex items-baseline space-x-1">
|
<div className="flex items-baseline space-x-1">
|
||||||
<span className="flex space-x-1">
|
<span className="flex space-x-1">
|
||||||
<span className="text-yellow-300" title="Miner fees">
|
<span className="text-amber-300" title="Miner fees">
|
||||||
<FontAwesomeIcon icon={faCoins} size="1x" />
|
<FontAwesomeIcon icon={faCoins} size="1x" />
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
|
|
|
@ -17,13 +17,13 @@ const TraceItem: React.FC<TraceItemProps> = ({ t, last }) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="flex relative">
|
<div className="flex relative">
|
||||||
<div className="absolute border-l border-b w-5 h-6 transform -translate-y-3"></div>
|
<div className="absolute border-l border-b w-5 h-6 -translate-y-3"></div>
|
||||||
{!last && (
|
{!last && (
|
||||||
<div className="absolute left-0 border-l w-5 h-full transform translate-y-3"></div>
|
<div className="absolute left-0 border-l w-5 h-full translate-y-3"></div>
|
||||||
)}
|
)}
|
||||||
{t.children && (
|
{t.children && (
|
||||||
<Switch
|
<Switch
|
||||||
className="absolute left-0 bg-white transform -translate-x-1/2 text-gray-500"
|
className="absolute left-0 bg-white -translate-x-1/2 text-gray-500"
|
||||||
checked={expanded}
|
checked={expanded}
|
||||||
onChange={setExpanded}
|
onChange={setExpanded}
|
||||||
>
|
>
|
||||||
|
|
|
@ -5,7 +5,7 @@ type BooleanDecoderProps = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const BooleanDecoder: React.FC<BooleanDecoderProps> = ({ r }) => (
|
const BooleanDecoder: React.FC<BooleanDecoderProps> = ({ r }) => (
|
||||||
<span className={`${r ? "text-green-700" : "text-red-700"}`}>
|
<span className={`${r ? "text-emerald-700" : "text-red-700"}`}>
|
||||||
{r.toString()}
|
{r.toString()}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
|
@ -27,7 +27,7 @@ const DecodedParamsTable: React.FC<DecodedParamsTableProps> = ({
|
||||||
<th className="col-span-8 pr-1">value</th>
|
<th className="col-span-8 pr-1">value</th>
|
||||||
</tr>
|
</tr>
|
||||||
{!hasParamNames && (
|
{!hasParamNames && (
|
||||||
<tr className="grid grid-cols-12 text-left gap-x-2 py-2 bg-yellow-100 text-red-700">
|
<tr className="grid grid-cols-12 text-left gap-x-2 py-2 bg-amber-100 text-red-700">
|
||||||
<th className="col-span-12 px-1">
|
<th className="col-span-12 px-1">
|
||||||
{paramTypes.length > 0 && paramTypes[0].name !== null
|
{paramTypes.length > 0 && paramTypes[0].name !== null
|
||||||
? "Parameter names are estimated."
|
? "Parameter names are estimated."
|
||||||
|
|
|
@ -10,8 +10,7 @@ function withOpacity(variableName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
purge: ["./src/**/*.{js,jsx,ts,tsx}", "./index.html"],
|
content: ["./src/**/*.{js,jsx,ts,tsx}", "./index.html"],
|
||||||
darkMode: false, // or 'media' or 'class'
|
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {
|
||||||
colors: {
|
colors: {
|
||||||
|
@ -53,12 +52,5 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
variants: {
|
|
||||||
extend: {
|
|
||||||
cursor: ["disabled"],
|
|
||||||
backgroundColor: ["disabled"],
|
|
||||||
textColor: ["disabled"],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
plugins: [],
|
plugins: [],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue