diff --git a/packages/lib-sourcify/src/lib/CheckedContract.ts b/packages/lib-sourcify/src/lib/CheckedContract.ts index a0ded8143..00e9ce7d7 100644 --- a/packages/lib-sourcify/src/lib/CheckedContract.ts +++ b/packages/lib-sourcify/src/lib/CheckedContract.ts @@ -114,7 +114,13 @@ export class CheckedContract { async tryToFindPerfectMetadata( deployedBytecode: string ): Promise { - const decodedAuxdata = decodeBytecode(deployedBytecode); + let decodedAuxdata; + try { + decodedAuxdata = decodeBytecode(deployedBytecode); + } catch (err) { + // There is no auxdata at all in this contract + return null; + } const pathContent: PathContent[] = Object.keys(this.solidity).map( (path) => {