MCPcopy Create free account
hub / github.com/NomicFoundation/hardhat / #parse

Method #parse

packages/hardhat-verify/src/internal/bytecode.ts:32–42  ·  view source on GitHub ↗
(bytecode: string)

Source from the content-addressed store, hash-verified

30 ) {}
31
32 static async #parse(bytecode: string): Promise<Bytecode> {
33 const bytecodeBytes = hexStringToBytes(bytecode);
34
35 const solcVersion = await inferSolcVersion(bytecodeBytes);
36 const executableSection = bytecode.slice(
37 0,
38 bytecode.length - getMetadataSectionBytesLength(bytecodeBytes) * 2,
39 );
40
41 return new Bytecode(bytecode, solcVersion, executableSection);
42 }
43
44 public static async getDeployedContractBytecode(
45 provider: EthereumProvider,

Callers 1

Calls 3

hexStringToBytesFunction · 0.90
inferSolcVersionFunction · 0.85

Tested by

no test coverage detected