From 1f886fc91e03fa2304ed227facd012e30bd71761 Mon Sep 17 00:00:00 2001 From: UvRoxx Date: Mon, 14 Sep 2026 18:14:28 -0400 Subject: [PATCH] Accept stagenet as an app network Midnight Passport runs on stagenet and filters the app grid by the network the wallet is on, so an app that runs on stagenet could not be listed for it: the validator refused the word. Add it to the accepted networks for apps and for contracts, and to the two places the README states the list. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01XfhTmo7yhiuuT5Ep7D3e5c --- README.md | 4 ++-- validate.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d2e9684..f8ff8b6 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ We'll review and merge within 24 hours. | `icon` | string (URL) | Yes | App icon URL. Must be HTTPS. PNG or SVG, 128x128px recommended. | | `url` | string (URL) | Yes | DApp URL. Must be HTTPS. | | `category` | string | Yes | One of: `defi`, `tools`, `gaming`, `social`, `nft`, `identity`, `other` | -| `networks` | string[] | Yes | Supported networks: `preview`, `preprod`, `mainnet`, or `*` for all. | +| `networks` | string[] | Yes | Supported networks: `stagenet`, `preview`, `preprod`, `mainnet`, or `*` for all. | | `contracts` | object[] | No | Verified public contracts for this app. Used by 1AM Explorer to show partner themes and verified badges. | | `featured` | boolean | No | Set by maintainers only. Do not include in submissions. | | `new` | boolean | No | Automatically set for new listings. Removed after 30 days. | @@ -85,7 +85,7 @@ We'll review and merge within 24 hours. | Field | Type | Required | Description | |---|---|---|---| | `address` | string | Yes | 64-character Midnight contract address hex. | -| `network` | string | Yes | Contract network: `preview`, `preprod`, or `mainnet`. Must also be listed in the app `networks`. | +| `network` | string | Yes | Contract network: `stagenet`, `preview`, `preprod`, or `mainnet`. Must also be listed in the app `networks`. | | `name` | string | Yes | Human-readable contract name. Max 40 chars. | | `role` | string | Yes | Short role label, such as `Registry`, `Application`, or `Router`. | | `description` | string | Yes | One-line contract description. Max 120 chars. | diff --git a/validate.js b/validate.js index 00f9680..13d9f14 100644 --- a/validate.js +++ b/validate.js @@ -9,7 +9,7 @@ const fs = require('fs'); const path = require('path'); const VALID_CATEGORIES = ['defi', 'tools', 'gaming', 'social', 'nft', 'identity', 'other']; -const VALID_NETWORKS = ['preview', 'preprod', 'mainnet', '*']; +const VALID_NETWORKS = ['stagenet', 'preview', 'preprod', 'mainnet', '*']; const VALID_CONTRACT_THEMES = ['ascend']; const MAX_ID_LENGTH = 32; const MAX_NAME_LENGTH = 40; @@ -118,7 +118,7 @@ for (const app of registry.apps) { } if (!VALID_NETWORKS.includes(contract.network) || contract.network === '*') { - fail(`Invalid contract network "${contract.network}" — must be one of: preview, preprod, mainnet`); + fail(`Invalid contract network "${contract.network}" — must be one of: stagenet, preview, preprod, mainnet`); } else if (!Array.isArray(app.networks) || (!app.networks.includes('*') && !app.networks.includes(contract.network))) { fail(`contract network "${contract.network}" is not listed in app.networks`); } else {