Skip to content

Commit 35057b7

Browse files
committed
docs(static): document contracts registry feed artifacts
1 parent e77e75f commit 35057b7

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ Base URL: `https://static.qubic.org/v1/general/data/`
4444
- **Smart Contracts**
4545
- [smart_contracts.json](https://static.qubic.org/v1/general/data/smart_contracts.json)
4646
- [smart_contracts.min.json](https://static.qubic.org/v1/general/data/smart_contracts.min.json)
47+
- [contracts_registry.json](https://static.qubic.org/v1/general/data/contracts_registry.json)
48+
- [contracts_registry.manifest.json](https://static.qubic.org/v1/general/data/contracts_registry.manifest.json)
4749

4850
**Fields per contract:**
4951
| Field | Type | Description |
@@ -68,6 +70,10 @@ Base URL: `https://static.qubic.org/v1/general/data/`
6870

6971
> **About the `fee` field:** Fees are currently extracted for the following procedures: `Transfer Share Management Rights`, `Revoke Asset Management Rights`, and `Transfer Share Ownership and Possession`. The fee is included only when it can be resolved to a fixed value from the source code. If a procedure does not have a `fee` field, it does not necessarily mean it is free — the fee may be determined dynamically at execution time (e.g., fetched from another contract or calculated based on state).
7072
73+
**Contracts registry files:**
74+
- `contracts_registry.json` uses the `ContractsRegistry` schema from `@qubic.ts/contracts` and includes contract entries plus `ioTypes`.
75+
- `contracts_registry.manifest.json` includes `schema_version`, `registry_hash`, `generated_at`, `source_revision`, and Ed25519 `signature` for client-side verification.
76+
7177
- **Exchanges**
7278
- [exchanges.json](https://static.qubic.org/v1/general/data/exchanges.json)
7379
- [exchanges.min.json](https://static.qubic.org/v1/general/data/exchanges.min.json)
@@ -138,6 +144,7 @@ Dev: https://static.qubic.org/dev/v1/{product}/{path-to-file}
138144
```
139145
https://static.qubic.org/v1/general/data/smart_contracts.json
140146
https://static.qubic.org/staging/v1/general/data/smart_contracts.json
147+
https://static.qubic.org/v1/general/data/contracts_registry.manifest.json
141148
```
142149

143150
**Wallet App:**
@@ -174,6 +181,7 @@ The `version.json` contains SHA-256 hashes and file sizes for all files, enablin
174181
```
175182
data/ # General/shared source data
176183
├── smart_contracts.json
184+
├── contracts_registry.json
177185
├── exchanges.json
178186
├── tokens.json
179187
└── address_labels.json
@@ -186,7 +194,8 @@ products/ # Product-specific source data
186194
187195
scripts/ # Build and update utilities
188196
├── build_dist.py # Build distribution files
189-
└── update_smart_contracts.py # Update SC data from GitHub
197+
├── update_smart_contracts.py # Update SC data from GitHub
198+
└── update_contracts_registry.py # Update contracts registry from qubic.ts
190199
191200
.github/workflows/ # CI/CD automation
192201
├── commitlint.yml # Commit message validation
@@ -235,15 +244,18 @@ Semantic-release automatically:
235244
- Generates changelogs
236245
- Triggers deployments
237246

238-
### Automated Smart Contracts Updates
247+
### Automated Contracts Updates
239248

240-
Smart contract data is automatically refreshed every **Wednesday at 14:00 UTC** via a scheduled GitHub Action workflow.
249+
Contracts data feeds are automatically refreshed every **Wednesday at 14:00 UTC** via a scheduled GitHub Action workflow.
241250

242251
**How it works:**
243-
1. The workflow runs `scripts/update_smart_contracts.py` which fetches the latest contract data from the [qubic-core](https://github.com/qubic/core) repository
252+
1. The workflow runs:
253+
- `scripts/update_smart_contracts.py` for the curated smart contracts feed
254+
- `scripts/update_contracts_registry.py` for the canonical runtime registry feed sourced from [qubic.ts](https://github.com/qubic/qubic.ts) (via token-authenticated GitHub API when required)
244255
2. If changes are detected (new contracts, updated procedures, etc.), a PR is automatically created to the `main` branch
245256
3. Once merged, a new release is created and deployed to production
246-
4. After the release, merge `main` back to `dev` and `staging` to keep branches in sync
257+
4. During deploy, `contracts_registry.manifest.json` is generated and Ed25519-signed in CI.
258+
5. After the release, merge `main` back to `dev` and `staging` to keep branches in sync
247259

248260
**Manual trigger:** The workflow can also be triggered manually from the [Actions tab](../../actions/workflows/refresh-smart-contracts.yml) if an immediate update is needed.
249261

index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,15 @@ <h2>General Data (Shared)</h2>
395395
<div class="endpoint-group" id="smart-contracts">
396396
<h3>Smart Contracts</h3>
397397
<p class="description">Comprehensive list of Qubic smart contracts including names, indexes, procedures,
398-
GitHub source links, and addresses. This data is automatically updated weekly from the
398+
GitHub source links, and addresses. The canonical runtime contracts registry is also published with
399+
a signed manifest for client-side integrity verification. This data is automatically updated weekly from the
399400
<a href="https://github.com/qubic/core" target="_blank" style="color: #CCFCFF; text-decoration: underline;">qubic-core</a> repository.</p>
400401
<ul class="endpoints">
401402
<li><a href="v1/general/data/smart_contracts.json" target="_blank">smart_contracts.json</a></li>
402403
<li><a href="v1/general/data/smart_contracts.min.json" target="_blank">smart_contracts.min.json</a>
403404
</li>
405+
<li><a href="v1/general/data/contracts_registry.json" target="_blank">contracts_registry.json</a></li>
406+
<li><a href="v1/general/data/contracts_registry.manifest.json" target="_blank">contracts_registry.manifest.json</a></li>
404407
</ul>
405408
</div>
406409

@@ -678,4 +681,4 @@ <h3>Locales</h3>
678681
</script>
679682
</body>
680683

681-
</html>
684+
</html>

0 commit comments

Comments
 (0)