feat: refinance example — Aave/Spark/Morpho across chains (G2) - #27
Merged
Conversation
- scripts/check-snippets.ts: assert examples/refinance.ts is actually discovered by the snippet materializer (generic zero-files check plus a specific by-name check) so a missing/unreadable examples/ dir can never silently pass CI without type-checking the release-gate example. - examples/refinance.ts: run main() only on direct execution (compare process.argv[1] against this module's own URL via fileURLToPath), not merely when RPC_URL happens to be set in the importing process; RPC_URL itself is still validated inside main() with a helpful error + exit(1).
halaprix
added a commit
that referenced
this pull request
Jul 23, 2026
* chore: release v1.3.0 - Version bump 1.2.0 → 1.3.0 in package.json and npm-lock - CHANGELOG.md: [1.3.0] entry with facts verified against git log v1.2.0..HEAD (PRs #25, #26, #27): * Added: MultichainResolver, examples/refinance.ts * Changed: handlers reimplemented on defineTask (parity-gated, observable deltas documented) * Bundle size 15→18KB (current 16.8KB measured) - README.md: updated bundle badge, added MultichainResolver to API table, added Multichain section with compiling example and refinance.ts pointer - MIGRATION.md: appended v1.2.x → v1.3.0 section (additive, no consumer action required) - SUMMARY.md: updated TOC with new sections - docs/benchmarks.md: updated size figures (13.9 → 16.8 KB) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: fix API accuracy — multichain, pinBlock, ethers - README multichain example: replace task instance reuse with factory pattern (flattened duplicate validation throws before any execution) - api-reference MultichainResolver.chain(): returns MulticallResolver (cached), throws on unknown chainId (not undefined) - Remove fake per-chain onPin Record — onPin is single inherited callback from BatchOptions; each chain reports once - Remove fake chainId < 1 validation rule — real rule: lowest-chainId rejection on concurrent failures - docs/index.html: Fix ethers claim — "requires an adapter" (domino doesn't depend on ethers) - pinBlock performance: Clarify +1 RPC only for absent/tag blocks; explicit blockNumber/blockHash add none - CHANGELOG: Correct MultichainResolver description (blocks map, not per-chain onPin; deterministic rejection) - Verify all snippets compile and bundle badge matches measured size Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: halaprix <halaprix@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
halaprix
added a commit
that referenced
this pull request
Jul 24, 2026
* feat: refinance example — Aave/Spark/Morpho across chains (G2) * fix: guard release-gate example discovery + entry point (G2 review) - scripts/check-snippets.ts: assert examples/refinance.ts is actually discovered by the snippet materializer (generic zero-files check plus a specific by-name check) so a missing/unreadable examples/ dir can never silently pass CI without type-checking the release-gate example. - examples/refinance.ts: run main() only on direct execution (compare process.argv[1] against this module's own URL via fileURLToPath), not merely when RPC_URL happens to be set in the importing process; RPC_URL itself is still validated inside main() with a helpful error + exit(1). --------- Co-authored-by: halaprix <halaprix@users.noreply.github.com>
halaprix
added a commit
that referenced
this pull request
Jul 24, 2026
* chore: release v1.3.0 - Version bump 1.2.0 → 1.3.0 in package.json and npm-lock - CHANGELOG.md: [1.3.0] entry with facts verified against git log v1.2.0..HEAD (PRs #25, #26, #27): * Added: MultichainResolver, examples/refinance.ts * Changed: handlers reimplemented on defineTask (parity-gated, observable deltas documented) * Bundle size 15→18KB (current 16.8KB measured) - README.md: updated bundle badge, added MultichainResolver to API table, added Multichain section with compiling example and refinance.ts pointer - MIGRATION.md: appended v1.2.x → v1.3.0 section (additive, no consumer action required) - SUMMARY.md: updated TOC with new sections - docs/benchmarks.md: updated size figures (13.9 → 16.8 KB) * docs: fix API accuracy — multichain, pinBlock, ethers - README multichain example: replace task instance reuse with factory pattern (flattened duplicate validation throws before any execution) - api-reference MultichainResolver.chain(): returns MulticallResolver (cached), throws on unknown chainId (not undefined) - Remove fake per-chain onPin Record — onPin is single inherited callback from BatchOptions; each chain reports once - Remove fake chainId < 1 validation rule — real rule: lowest-chainId rejection on concurrent failures - docs/index.html: Fix ethers claim — "requires an adapter" (domino doesn't depend on ethers) - pinBlock performance: Clarify +1 RPC only for absent/tag blocks; explicit blockNumber/blockHash add none - CHANGELOG: Correct MultichainResolver description (blocks map, not per-chain onPin; deterministic rejection) - Verify all snippets compile and bundle badge matches measured size --------- Co-authored-by: halaprix <halaprix@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
halaprix
added a commit
that referenced
this pull request
Jul 24, 2026
* feat: refinance example — Aave/Spark/Morpho across chains (G2) * fix: guard release-gate example discovery + entry point (G2 review) - scripts/check-snippets.ts: assert examples/refinance.ts is actually discovered by the snippet materializer (generic zero-files check plus a specific by-name check) so a missing/unreadable examples/ dir can never silently pass CI without type-checking the release-gate example. - examples/refinance.ts: run main() only on direct execution (compare process.argv[1] against this module's own URL via fileURLToPath), not merely when RPC_URL happens to be set in the importing process; RPC_URL itself is still validated inside main() with a helpful error + exit(1). --------- Co-authored-by: halaprix <halaprix@users.noreply.github.com>
halaprix
added a commit
that referenced
this pull request
Jul 24, 2026
* chore: release v1.3.0 - Version bump 1.2.0 → 1.3.0 in package.json and npm-lock - CHANGELOG.md: [1.3.0] entry with facts verified against git log v1.2.0..HEAD (PRs #25, #26, #27): * Added: MultichainResolver, examples/refinance.ts * Changed: handlers reimplemented on defineTask (parity-gated, observable deltas documented) * Bundle size 15→18KB (current 16.8KB measured) - README.md: updated bundle badge, added MultichainResolver to API table, added Multichain section with compiling example and refinance.ts pointer - MIGRATION.md: appended v1.2.x → v1.3.0 section (additive, no consumer action required) - SUMMARY.md: updated TOC with new sections - docs/benchmarks.md: updated size figures (13.9 → 16.8 KB) * docs: fix API accuracy — multichain, pinBlock, ethers - README multichain example: replace task instance reuse with factory pattern (flattened duplicate validation throws before any execution) - api-reference MultichainResolver.chain(): returns MulticallResolver (cached), throws on unknown chainId (not undefined) - Remove fake per-chain onPin Record — onPin is single inherited callback from BatchOptions; each chain reports once - Remove fake chainId < 1 validation rule — real rule: lowest-chainId rejection on concurrent failures - docs/index.html: Fix ethers claim — "requires an adapter" (domino doesn't depend on ethers) - pinBlock performance: Clarify +1 RPC only for absent/tag blocks; explicit blockNumber/blockHash add none - CHANGELOG: Correct MultichainResolver description (blocks map, not per-chain onPin; deterministic rejection) - Verify all snippets compile and bundle badge matches measured size --------- Co-authored-by: halaprix <halaprix@users.noreply.github.com>
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.
Summary
Implements spec G2, the 1.3.0 release-gate example proving the whole 1.x surface composes on real protocols (
examples/refinance.ts, type-checked in CI against the built dist — the snippet checker now hard-fails if the example ever drops out of discovery):getReserveDatabulk viadefineTask+ human-readable ABI, rate fields extracted witht.derivefrom the faithfully-declared reserve struct.idToMarketParams/marketon Morpho, step 2 callsborrowRateViewON the IRM address that only exists once step 1 resolves (target: Ref<Address | undefined>).runMultistepTaskscall underPresets.throughput— the mixed-depth batching note from CLAUDE.md demonstrated deliberately (2 round-trips total, not 3).MultichainResolver+snapshot()+ explicit per-chainblockspinning (mainnet + optionalRPC_URL_8453Base per the env convention), with the snapshot-vs-pinBlock reasoning in comments.main()runs only on direct execution withRPC_URLvalidated (import-safe); mocked-executor smoke tests cover task construction. On-chain literals that can't be verified without a live RPC are flagged inline (sandbox has no egress; live run available viaRPC_URL=... node).Test evidence
341/341 unit + smoke, compat-vs-dist 38/38, 26 snippets/examples type-checked against dist with the release-gate discovery assertion verified active (both failure branches manually triggered).
Spec:
spec.md§ 1.3.0 G2.