feat(rosen-service): add Firo chain integration#19
Open
reubenyap wants to merge 4 commits intorosen-bridge:devfrom
Open
feat(rosen-service): add Firo chain integration#19reubenyap wants to merge 4 commits intorosen-bridge:devfrom
reubenyap wants to merge 4 commits intorosen-bridge:devfrom
Conversation
- Register `firo` in the `NETWORKS` constant (no token support, native
token `firo`).
- Add `FiroCalculator` that reads locked amounts from the Firo
insight-api (`/insight-api-zcoin/addr/{address}/balance`).
- Add `FiroCalculatorInterface` and register `FiroCalculator` in
`AssetCalculator`.
Part of the RCS-003 Bridge Expansion Kit for Firo.
|
@reubenyap is attempting to deploy a commit to the rosen-bridge Team on Vercel. A member of the Team first needs to authorize it. |
022b7bb to
4e10d20
Compare
This was referenced Apr 22, 2026
Required because `Network = keyof typeof NETWORKS` now includes `'firo'`,
and the three maps in @rosen-ui/utils are exhaustive `{ [key in Network]: ... }`
— without these entries, `tsc --noEmit` fails in packages/utils.
- getAddressUrl: https://explorer.firo.org/address
- getTxUrl: https://explorer.firo.org/tx
- getTokenUrl: '' (Firo has no native token scheme, same as Doge)
URL paths verified against explorer.firo.org's AngularJS insight-ui
pushState routes.
With firo in NETWORKS_KEYS but not yet in configs.chains, ChainChoices is wider than keyof typeof configs.chains. Adjust the two spots that index configs.chains[chain] so tsc stays green until the backend Firo config lands: - assetAggregator: cast chain to keyof typeof configs.chains at the index site. - assetDataAdapters: narrow createChainSpecificDataAdapter's chain parameter from ChainChoices to keyof typeof configs.chains (the switch never handled firo anyway), removing the now-unused ChainChoices import.
- Add `@rosen-bridge/firo-scanner` and `@rosen-bridge/firo-observation-extractor` as dependencies. - Wire up a new `FiroRpcScanner` in `scanner-service`, reading from the configured Firo RPC node using a failover connector manager. - Register `FiroRpcObservationExtractor` for the lock address. - Register the `firo-extractor` event-trigger extractor on the Ergo scanner. - Register a Firo scanner-sync health check (`firoScannerWarnDiff` / `firoScannerCriticalDiff`). - Pass the Firo calculator config (addresses + `explorerUrl`) to `AssetCalculator`. - Add `firo` network section plus health-check thresholds and `calculator.addresses.firo` defaults to `config/default.yaml`. - Add `FIRO_SCANNER_INTERVAL`, `FIRO_SCANNER_LOGGER_NAME`, and `FIRO_BLOCK_TIME` constants. Part of the RCS-003 Bridge Expansion Kit for Firo. Builds on the Firo asset-calculator integration.
4e10d20 to
ee6406a
Compare
vorujack
approved these changes
Apr 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the RCS-003 Bridge Expansion Kit for Firo. Supersedes #18 — this PR carries the full Firo asset-calculator + rosen-service change set, organised as four review-friendly commits against
dev:feat: add Firo chain support to asset-calculatorRegisters
firoinNETWORKS(no token support, native tokenfiro), addsFiroCalculatorreading locked amounts from the Firo insight-api (/insight-api-zcoin/addr/{address}/balance), addsFiroCalculatorInterface, registers the calculator inAssetCalculator, and updates the existing asset-calculator tests.feat(utils): add firo URL entries to address/tx/token mapsNetwork = keyof typeof NETWORKSnow includes'firo', and the three maps in@rosen-ui/utilsare exhaustive{ [key in Network]: ... }— without these entries,tsc --noEmitwould fail inpackages/utils. Uses Firo's native explorer (https://explorer.firo.org) for address and transaction URLs; token URL is empty (Firo has no native token scheme, same as Doge). Per RCS-003 § Utils.fix(rosen-service2): narrow chain types so firo doesn't break tscAdding
firotoNETWORKS_KEYSwidensChainChoicespastkeyof typeof configs.chains. The Firo backend config hasn't landed inrosen-service2yet, so the two index sites (assetAggregator,assetDataAdapters) are narrowed tokeyof typeof configs.chainsas an interim fix — per maintainer guidance on feat: add Firo network support #16. This can be reverted once the rosen-service2 Firo config lands.feat: add Firo chain support to rosen-serviceAdds
FiroRpcScanner,FiroRpcObservationExtractor, event-trigger extractor, and scanner-sync health check. Wires the Firo calculator config (addresses+explorerUrl) into theAssetCalculatorconstructor. Adds afirosection toapps/rosen-service/src/configs.tsandapps/rosen-service/config/default.yaml, pluscalculator.addresses.firodefaults and thefiroScannerWarnDiff/firoScannerCriticalDiffhealth-check keys. Adds@rosen-bridge/firo-scannerand@rosen-bridge/firo-observation-extractoras dependencies.Why one PR instead of two
Splitting commits 1 and 4 into separate PRs would leave
devnon-buildable between merges: addingfiroCalculatorto the positionalAssetCalculatorconstructor is a breaking change and the only consumer isapps/rosen-service/src/calculator/calculator-service.ts. The Doge reference commit (20fe8df3) bundled the calculator + calculator-service changes for the same reason. The commits above can still be reviewed independently.What's not here
.lintstagedrc.mjsknip-path fix is split out to chore: fix lint-staged knip workspace path on Windows #20 — unrelated to Firo.