Skip to content

Commit 698b37c

Browse files
committed
0.1.12 Update solidity contract regex to support noir verifier
1 parent 2ed0c21 commit 698b37c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "circuitscan",
3-
"version": "0.1.11",
3+
"version": "0.1.12",
44
"main": "cli.js",
55
"type": "module",
66
"author": "numtel <ben@latenightsketches.com>",

src/solidity.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export function compileContract(source) {
199199
}
200200

201201
function findContractName(soliditySource, returnAll) {
202-
const regex = /contract\s+([a-zA-Z_][a-zA-Z0-9_]*)\s*(?:is\s+[a-zA-Z_][a-zA-Z0-9_,\s]*)?\s*\{/g;
202+
const regex = /contract\s+([a-zA-Z_][a-zA-Z0-9_]*)\s*(?:is\s+[a-zA-Z_][a-zA-Z0-9_]*(?:\([^)]*\))?(?:\s*,\s*[a-zA-Z_][a-zA-Z0-9_]*(?:\([^)]*\))?)*)?\s*\{/g;
203203
const matches = [];
204204

205205
for (const match of soliditySource.matchAll(regex)) {

0 commit comments

Comments
 (0)