Skip to content

Commit 5efcb7e

Browse files
committed
0.1.6 Update viem, fix chainId by number, fix nargo version error
1 parent ff241a6 commit 5efcb7e

5 files changed

Lines changed: 82 additions & 33 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "circuitscan",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"main": "cli.js",
55
"type": "module",
66
"author": "numtel <ben@latenightsketches.com>",
@@ -26,7 +26,7 @@
2626
"commander": "^12.0.0",
2727
"hardhat": "npm:hardhat-plugin-noop@0.0.1",
2828
"solc": "^0.8.26",
29-
"viem": "^2.22.17"
29+
"viem": "^2.31.0"
3030
},
3131
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
3232
}

src/circuitscan.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export async function verifyCircuit(action, pkgName, chainId, contract, options)
112112
body: JSON.stringify(event),
113113
});
114114
if (!response.ok && response.status !== 400) {
115+
console.error(response);
115116
throw new Error('Network response was not ok');
116117
}
117118
const data = await response.json();

src/noir/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919

2020
const DEFAULT_NARGO = "0.33.0";
2121
const VERSIONS = {
22+
"1.0.0-beta.3": "0.84.0",
2223
"0.34.0": "0.55.0",
2324
"0.33.0": "0.47.1",
2425
"0.32.0": "0.46.1",
@@ -93,7 +94,7 @@ async function compileFile(packageDir, options) {
9394
const nargoToml = readFileSync(join(packageDir, 'Nargo.toml'), 'utf8');
9495
const nargoVersion = options.nargoVersion || DEFAULT_NARGO;
9596
if(!VERSIONS.hasOwnProperty(nargoVersion))
96-
throw new error('INVALID_NARGO_VERSION');
97+
throw new Error('INVALID_NARGO_VERSION');
9798
const payload = {
9899
pipeline: 'noir',
99100
files,

src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export function viemChain(nameOrId) {
116116
if(isNaN(nameOrId)) {
117117
return chains[nameOrId];
118118
}
119-
for(let chain of chains) {
119+
for(let chain in chains) {
120120
if(chain.id === Number(nameOrId)) return chain;
121121
}
122122
}

yarn.lock

Lines changed: 76 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,42 @@
189189
resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d"
190190
integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==
191191

192-
"@noble/curves@1.8.1", "@noble/curves@^1.6.0", "@noble/curves@~1.8.1":
192+
"@noble/ciphers@^1.3.0":
193+
version "1.3.0"
194+
resolved "https://registry.yarnpkg.com/@noble/ciphers/-/ciphers-1.3.0.tgz#f64b8ff886c240e644e5573c097f86e5b43676dc"
195+
integrity sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==
196+
197+
"@noble/curves@1.9.1":
198+
version "1.9.1"
199+
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.9.1.tgz#9654a0bc6c13420ae252ddcf975eaf0f58f0a35c"
200+
integrity sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA==
201+
dependencies:
202+
"@noble/hashes" "1.8.0"
203+
204+
"@noble/curves@^1.6.0", "@noble/curves@~1.8.1":
193205
version "1.8.1"
194206
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.8.1.tgz#19bc3970e205c99e4bdb1c64a4785706bce497ff"
195207
integrity sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==
196208
dependencies:
197209
"@noble/hashes" "1.7.1"
198210

211+
"@noble/curves@~1.9.0":
212+
version "1.9.2"
213+
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.9.2.tgz#73388356ce733922396214a933ff7c95afcef911"
214+
integrity sha512-HxngEd2XUcg9xi20JkwlLCtYwfoFw4JGkuZpT+WlsPD4gB/cxkvTD8fSsoAnphGZhFdZYKeQIPCuFlWPm1uE0g==
215+
dependencies:
216+
"@noble/hashes" "1.8.0"
217+
199218
"@noble/hashes@1.7.1", "@noble/hashes@^1.5.0", "@noble/hashes@~1.7.1":
200219
version "1.7.1"
201220
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.7.1.tgz#5738f6d765710921e7a751e00c20ae091ed8db0f"
202221
integrity sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==
203222

223+
"@noble/hashes@1.8.0", "@noble/hashes@~1.8.0":
224+
version "1.8.0"
225+
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.8.0.tgz#cee43d801fcef9644b11b8194857695acd5f815a"
226+
integrity sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==
227+
204228
"@nomicfoundation/hardhat-verify@^2.0.8":
205229
version "2.0.8"
206230
resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.8.tgz#6a77dc03de990a1a3aa8e6dc073c393263dbf258"
@@ -221,7 +245,21 @@
221245
resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.4.tgz#002eb571a35d69bdb4c214d0995dff76a8dcd2a9"
222246
integrity sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==
223247

224-
"@scure/bip32@1.6.2", "@scure/bip32@^1.5.0":
248+
"@scure/base@~1.2.5":
249+
version "1.2.6"
250+
resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.6.tgz#ca917184b8231394dd8847509c67a0be522e59f6"
251+
integrity sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==
252+
253+
"@scure/bip32@1.7.0":
254+
version "1.7.0"
255+
resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.7.0.tgz#b8683bab172369f988f1589640e53c4606984219"
256+
integrity sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==
257+
dependencies:
258+
"@noble/curves" "~1.9.0"
259+
"@noble/hashes" "~1.8.0"
260+
"@scure/base" "~1.2.5"
261+
262+
"@scure/bip32@^1.5.0":
225263
version "1.6.2"
226264
resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.6.2.tgz#093caa94961619927659ed0e711a6e4bf35bffd0"
227265
integrity sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==
@@ -230,7 +268,15 @@
230268
"@noble/hashes" "~1.7.1"
231269
"@scure/base" "~1.2.2"
232270

233-
"@scure/bip39@1.5.4", "@scure/bip39@^1.4.0":
271+
"@scure/bip39@1.6.0":
272+
version "1.6.0"
273+
resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.6.0.tgz#475970ace440d7be87a6086cbee77cb8f1a684f9"
274+
integrity sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==
275+
dependencies:
276+
"@noble/hashes" "~1.8.0"
277+
"@scure/base" "~1.2.5"
278+
279+
"@scure/bip39@^1.4.0":
234280
version "1.5.4"
235281
resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.5.4.tgz#07fd920423aa671be4540d59bdd344cc1461db51"
236282
integrity sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==
@@ -657,10 +703,10 @@ is-unicode-supported@^0.1.0:
657703
resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7"
658704
integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==
659705

660-
isows@1.0.6:
661-
version "1.0.6"
662-
resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.6.tgz#0da29d706fa51551c663c627ace42769850f86e7"
663-
integrity sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw==
706+
isows@1.0.7:
707+
version "1.0.7"
708+
resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.7.tgz#1c06400b7eed216fbba3bcbd68f12490fc342915"
709+
integrity sha512-I1fSfDCZL5P0v33sVqeTDSpcstAg/N+wF5HS033mogOVIp4B+oHC7oOCsA3axAbBSGTJ8QubbNmnIRN/h8U7hg==
664710

665711
js-sha3@0.8.0:
666712
version "0.8.0"
@@ -791,12 +837,13 @@ os-tmpdir@~1.0.2:
791837
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
792838
integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==
793839

794-
ox@0.6.7:
795-
version "0.6.7"
796-
resolved "https://registry.yarnpkg.com/ox/-/ox-0.6.7.tgz#afd53f2ecef68b8526660e9d29dee6e6b599a832"
797-
integrity sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA==
840+
ox@0.7.1:
841+
version "0.7.1"
842+
resolved "https://registry.yarnpkg.com/ox/-/ox-0.7.1.tgz#fb23a770dd966c051ad916d4e2e655a6f995e1cf"
843+
integrity sha512-+k9fY9PRNuAMHRFIUbiK9Nt5seYHHzSQs9Bj+iMETcGtlpS7SmBzcGSVUQO3+nqGLEiNK4598pHNFlVRaZbRsg==
798844
dependencies:
799845
"@adraffy/ens-normalize" "^1.10.1"
846+
"@noble/ciphers" "^1.3.0"
800847
"@noble/curves" "^1.6.0"
801848
"@noble/hashes" "^1.5.0"
802849
"@scure/bip32" "^1.5.0"
@@ -889,9 +936,9 @@ slice-ansi@^4.0.0:
889936
is-fullwidth-code-point "^3.0.0"
890937

891938
solc@^0.8.26:
892-
version "0.8.26"
893-
resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.26.tgz#afc78078953f6ab3e727c338a2fefcd80dd5b01a"
894-
integrity sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g==
939+
version "0.8.29"
940+
resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.29.tgz#ec8fc1859a17ba60e7eed19ff4c9f90fc9abd23e"
941+
integrity sha512-M1hmcsejAtT1RWC+wy45Oi8a82nSnDl65wDzA3/8uWTC7R7VcnrMVIHv6/LHqnQPZ7OM2RIeKh3zpNo4E5lYbw==
895942
dependencies:
896943
command-exists "^1.2.8"
897944
commander "^8.1.0"
@@ -982,19 +1029,19 @@ uri-js@^4.4.1:
9821029
dependencies:
9831030
punycode "^2.1.0"
9841031

985-
viem@^2.22.17:
986-
version "2.22.17"
987-
resolved "https://registry.yarnpkg.com/viem/-/viem-2.22.17.tgz#71cb5793d898e7850d440653b0043803c2d00c8d"
988-
integrity sha512-eqNhlPGgRLR29XEVUT2uuaoEyMiaQZEKx63xT1py9OYsE+ZwlVgjnfrqbXad7Flg2iJ0Bs5Hh7o0FfRWUJGHvg==
1032+
viem@^2.31.0:
1033+
version "2.31.0"
1034+
resolved "https://registry.yarnpkg.com/viem/-/viem-2.31.0.tgz#2263426cce091d440e283b88183dff6f1d8bae5c"
1035+
integrity sha512-U7OMQ6yqK+bRbEIarf2vqxL7unSEQvNxvML/1zG7suAmKuJmipqdVTVJGKBCJiYsm/EremyO2FS4dHIPpGv+eA==
9891036
dependencies:
990-
"@noble/curves" "1.8.1"
991-
"@noble/hashes" "1.7.1"
992-
"@scure/bip32" "1.6.2"
993-
"@scure/bip39" "1.5.4"
1037+
"@noble/curves" "1.9.1"
1038+
"@noble/hashes" "1.8.0"
1039+
"@scure/bip32" "1.7.0"
1040+
"@scure/bip39" "1.6.0"
9941041
abitype "1.0.8"
995-
isows "1.0.6"
996-
ox "0.6.7"
997-
ws "8.18.0"
1042+
isows "1.0.7"
1043+
ox "0.7.1"
1044+
ws "8.18.2"
9981045

9991046
workerpool@6.2.1:
10001047
version "6.2.1"
@@ -1015,10 +1062,10 @@ wrappy@1:
10151062
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
10161063
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
10171064

1018-
ws@8.18.0:
1019-
version "8.18.0"
1020-
resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc"
1021-
integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==
1065+
ws@8.18.2:
1066+
version "8.18.2"
1067+
resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.2.tgz#42738b2be57ced85f46154320aabb51ab003705a"
1068+
integrity sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==
10221069

10231070
y18n@^5.0.5:
10241071
version "5.0.8"

0 commit comments

Comments
 (0)