Skip to content

Commit

Permalink
Minor verification fixes:
Browse files Browse the repository at this point in the history
- Update solidity verifier library.
- Accept '-' as part of the contract filenames inside build info.
  • Loading branch information
Juan Ignacio Ubeira committed Jul 2, 2024
1 parent 2b2ba69 commit 0c3a1fa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@nomiclabs/hardhat-etherscan": "^3.1.2",
"@nomiclabs/hardhat-vyper": "^3.0.5",
"@nomiclabs/hardhat-waffle": "^2.0.5",
"@solidity-parser/parser": "^0.14.5",
"@solidity-parser/parser": "^0.18.0",
"@types/async-retry": "^1",
"@types/chai": "^4",
"@types/lodash": "^4.14.186",
Expand Down
2 changes: 1 addition & 1 deletion src/verifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export default class Verifier {
private getAbsoluteSourcePath(relativeSourcePath: string, input: CompilerInput): string {
// We're not actually converting from relative to absolute but rather guessing: we'll extract the filename from the
// relative path, and then look for a source name in the inputs that matches it.
const contractName = (relativeSourcePath.match(/.*\/(\w*)\.sol/) as RegExpMatchArray)[1];
const contractName = (relativeSourcePath.match(/.*\/([\w'-]+)\.sol/) as RegExpMatchArray)[1];
return this.getContractSourceName(contractName, input);
}

Expand Down
18 changes: 8 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ __metadata:
"@nomiclabs/hardhat-etherscan": "npm:^3.1.2"
"@nomiclabs/hardhat-vyper": "npm:^3.0.5"
"@nomiclabs/hardhat-waffle": "npm:^2.0.5"
"@solidity-parser/parser": "npm:^0.14.5"
"@solidity-parser/parser": "npm:^0.18.0"
"@types/async-retry": "npm:^1"
"@types/chai": "npm:^4"
"@types/lodash": "npm:^4.14.186"
Expand Down Expand Up @@ -1347,15 +1347,6 @@ __metadata:
languageName: node
linkType: hard

"@solidity-parser/parser@npm:^0.14.5":
version: 0.14.5
resolution: "@solidity-parser/parser@npm:0.14.5"
dependencies:
antlr4ts: "npm:^0.5.0-alpha.4"
checksum: b8086c3e87d75a50fdb7928d5a656bf3cb72aae2d83d8963e85c7cc1bc3553ca1b4d9e36df961e5408ff712b506f3f733453d53ba3e472edd3d1394a018299cb
languageName: node
linkType: hard

"@solidity-parser/parser@npm:^0.16.0":
version: 0.16.0
resolution: "@solidity-parser/parser@npm:0.16.0"
Expand All @@ -1365,6 +1356,13 @@ __metadata:
languageName: node
linkType: hard

"@solidity-parser/parser@npm:^0.18.0":
version: 0.18.0
resolution: "@solidity-parser/parser@npm:0.18.0"
checksum: 42c904be5c499026aa66cd226125dc753665d5c75a6d3c6f79b7f875fc302c04d06f4d48909c577b6a1ffd5fdf13e4b3bacc9d2dfe10f4c316eeb7da7be0fcd5
languageName: node
linkType: hard

"@solidity-parser/parser@npm:^0.8.1":
version: 0.8.2
resolution: "@solidity-parser/parser@npm:0.8.2"
Expand Down

0 comments on commit 0c3a1fa

Please sign in to comment.