File tree 3 files changed +9
-2
lines changed
packages/hardhat-verify/src/internal
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @nomicfoundation/hardhat-verify " : patch
3
+ ---
4
+
5
+ Fixed case-sensitive address comparison for detecting verified contracts
Original file line number Diff line number Diff line change @@ -368,7 +368,7 @@ function mergeLibraries(
368
368
) {
369
369
const detectedAddress = detectedLibraries [ sourceName ] [ libraryName ] ;
370
370
// Our detection logic encodes bytes into lowercase hex.
371
- if ( libraryAddress . toLowerCase ( ) !== detectedAddress ) {
371
+ if ( libraryAddress . toLowerCase ( ) !== detectedAddress . toLowerCase ( ) ) {
372
372
conflicts . push ( {
373
373
library : `${ sourceName } :${ libraryName } ` ,
374
374
detectedAddress,
Original file line number Diff line number Diff line change @@ -43,7 +43,9 @@ export class Sourcify {
43
43
throw new Error ( `Unexpected response body: ${ JSON . stringify ( json ) } ` ) ;
44
44
}
45
45
46
- const contract = json . find ( ( match ) => match . address === address ) ;
46
+ const contract = json . find (
47
+ ( match ) => match . address . toLowerCase ( ) === address . toLowerCase ( )
48
+ ) ;
47
49
if ( contract === undefined ) {
48
50
return false ;
49
51
}
You can’t perform that action at this time.
0 commit comments