MCPcopy Create free account
hub / github.com/NomicFoundation/hardhat / buildBytecode

Function buildBytecode

packages/hardhat-verify/test/bytecode.ts:653–665  ·  view source on GitHub ↗
(
  executableSection: string,
  metadataSection: string,
)

Source from the content-addressed store, hash-verified

651});
652
653function buildBytecode(
654 executableSection: string,
655 metadataSection: string,
656): string {
657 // calculate the length of the metadata section in bytes
658 // and pad it to the required size
659 const metadataBytesLength = metadataSection.length / 2;
660 const metadataSectionLength = metadataBytesLength
661 .toString(16)
662 .padStart(METADATA_LENGTH_FIELD_SIZE * 2, "0");
663
664 return executableSection + metadataSection + metadataSectionLength;
665}
666
667function buildCompilerOutputBytecode(
668 bytecode: string,

Callers 1

bytecode.tsFile · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected