otterscan/src/address/DecodedABI.tsx
Willian Mitsuda 0228a6b6ae Fix overflow
2021-10-25 14:49:17 -03:00

21 lines
488 B
TypeScript

import { Interface } from "@ethersproject/abi";
import React from "react";
import DecodedFragment from "./DecodedFragment";
type DecodedABIProps = {
abi: any[];
};
const DecodedABI: React.FC<DecodedABIProps> = ({ abi }) => {
const intf = new Interface(abi);
return (
<div className="border overflow-x-auto">
{intf.fragments.map((f, i) => (
<DecodedFragment key={i} intf={intf} fragment={f} />
))}
</div>
);
};
export default React.memo(DecodedABI);