trufflesuite/truffle

View on GitHub
packages/codec-components/src/react/components/codec/bytecode-decoding.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import React from "react";
import type * as Codec from "@truffle/codec";
import { createCodecComponent } from "../../utils/create-codec-component";
import { Code } from "../common/code";

export const { BytecodeDecoding } = createCodecComponent(
  "BytecodeDecoding",
  (data: Codec.BytecodeDecoding) => (
    <Code
      type="bytes"
      title={`${data.class.typeName} contract${
        data.address ? ` (${data.address})` : ""
      } bytecode`}
    >
      {data.bytecode}
    </Code>
  )
);