feat: add guarded Base Sepolia encore
This commit is contained in:
@@ -34,6 +34,14 @@ export function validatePublicManifest(manifest) {
|
||||
for (const field of ["token", "proxy", "implementation", "owner"]) assertAddress(manifest[field], field);
|
||||
assertActors(manifest.actors);
|
||||
for (const field of optionalFields) if (Object.hasOwn(manifest, field)) assertPublicUrl(manifest[field], field);
|
||||
if (manifest.network === "baseSepolia") {
|
||||
if (Object.hasOwn(manifest, "rpcUrl") && new URL(manifest.rpcUrl).protocol !== "https:") {
|
||||
throw new Error("manifest Base Sepolia rpcUrl must use HTTPS");
|
||||
}
|
||||
if (Object.hasOwn(manifest, "explorerBaseUrl") && manifest.explorerBaseUrl !== "https://sepolia.basescan.org") {
|
||||
throw new Error("manifest Base Sepolia explorerBaseUrl must use BaseScan");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isRecord(value) { return typeof value === "object" && value !== null && !Array.isArray(value); }
|
||||
|
||||
Reference in New Issue
Block a user