fix: enforce optional manifest fields

This commit is contained in:
golem
2026-08-21 03:00:23 -06:00
parent c6bf8a683f
commit 54c893fdb7
4 changed files with 73 additions and 1 deletions
+3 -1
View File
@@ -159,7 +159,9 @@ function assertExactSchema(manifest) {
function assertManifestUrls(manifest, spec) {
if (manifest.network === "anvil") {
if (manifest.rpcUrl !== spec.rpcUrl) throw new Error("manifest anvil rpcUrl must use the local public endpoint");
if (Object.hasOwn(manifest, "rpcUrl") && manifest.rpcUrl !== spec.rpcUrl) {
throw new Error("manifest anvil rpcUrl must use the local public endpoint");
}
if (Object.hasOwn(manifest, "explorerBaseUrl")) throw new Error("manifest anvil must omit explorerBaseUrl");
return;
}