Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ We'll review and merge within 24 hours.
| `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. |
| `featuredOrder` | integer | No | Maintainer-defined featured priority. Nonnegative; lower values appear first in mobile Discover. Requires `featured: true`. |
| `new` | boolean | No | Automatically set for new listings. Removed after 30 days. |

### Contract Specification
Expand Down
1 change: 1 addition & 0 deletions registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"category": "defi",
"networks": ["mainnet"],
"featured": true,
"featuredOrder": 0,
"new": true
},
{
Expand Down
7 changes: 7 additions & 0 deletions validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ for (const app of registry.apps) {
pass(`networks: ${app.networks.join(', ')}`);
}

// Optional featured ordering is managed by maintainers.
if (app.featuredOrder !== undefined) {
if (app.featured !== true || !Number.isSafeInteger(app.featuredOrder) || app.featuredOrder < 0) {
fail('"featuredOrder" must be a nonnegative safe integer on a featured app');
}
}

// contracts
if (app.contracts !== undefined) {
if (!Array.isArray(app.contracts)) {
Expand Down
Loading