otterscan/src/transaction/DecodedLogSignature.tsx

24 lines
593 B
TypeScript
Raw Normal View History

2021-09-17 22:42:19 +00:00
import React from "react";
import { EventFragment } from "@ethersproject/abi";
type DecodedLogSignatureProps = {
event: EventFragment;
};
const DecodedLogSignature: React.FC<DecodedLogSignatureProps> = ({ event }) => {
return (
<span>
<span className="text-blue-900 font-bold">{event.name}</span>(
{event.inputs.map((input, i) => (
2021-09-18 18:46:29 +00:00
<span key={i}>
2021-09-17 22:42:19 +00:00
{i > 0 ? ", " : ""}
<span>{input.format("full")}</span>
2021-09-18 18:46:29 +00:00
</span>
2021-09-17 22:42:19 +00:00
))}
){event.anonymous ? " anonymous" : ""}
</span>
);
};
export default React.memo(DecodedLogSignature);