init: foc-devnet-info library in synapse-core#600
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
synapse-dev | ff67e43 | Commit Preview URL Branch Preview URL |
Feb 16 2026, 11:47 AM |
|
Things to fix (synced with @hugomrdias ) :
|
|
Did more debugging on this, this needs some more work, and a sister PR on the foc-devnet side as well. |
|
Works with latest foc-devnet: Needs the sister PR on foc-devnet for working well: FilOzone/foc-devnet#61 |
|
This is being done in support of FilOzone/foc-devnet#7, and more specifically I believe it closes #589 |
There was a problem hiding this comment.
Pull request overview
Introduces a new foc-devnet-info helper in @filoz/synapse-core to validate foc-devnet’s devnet-info.json and convert it into a Synapse Chain, and updates the utils E2E example to use this new flow.
Changes:
- Add
foc-devnet-infolibrary (Zod schema +toChainconverter) and export it from@filoz/synapse-core. - Add unit tests covering devnet-info validation and chain conversion.
- Update
utils/example-storage-e2e.jsto load config from devnet-info by default and switch from ethers-based usage to viem-based usage.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/package.json | Add workspace dependency on @filoz/synapse-core and switch utils to viem. |
| utils/example-storage-e2e.js | Load devnet config from devnet-info by default; update to viem + new foc-devnet-info helpers. |
| packages/synapse-sdk/src/test/synapse.test.ts | Remove unused session-key-related import. |
| packages/synapse-core/test/foc-devnet-info.test.ts | Add tests for devnet-info validation and chain construction. |
| packages/synapse-core/src/index.ts | Export the new focDevnetInfo module from synapse-core. |
| packages/synapse-core/src/foc-devnet-info/src/schema.ts | New Zod schema + validation wrapper for devnet-info.json. |
| packages/synapse-core/src/foc-devnet-info/src/index.ts | New public API: loadDevnetInfo + toChain (+ re-exports). |
| packages/synapse-core/package.json | Add package export + typesVersions mapping for ./foc-devnet-info. |
| package.json | Adjust Node devEngine version constraint. |
| examples/script-tag/biome.json | Update Biome schema reference URL. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@rvagg request re-review. Especially biome.json? not opinionated, but needs fixing. |
hugomrdias
left a comment
There was a problem hiding this comment.
LGTM just rebase from master to fix biome things
remove: submodule add: lint fix
test: mocked JSON RPC Update packages/synapse-core/test/foc-devnet-info.test.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Update packages/synapse-core/src/foc-devnet-info/src/index.ts Co-authored-by: Rod Vagg <rod@vagg.org> fix: make example script work again, refactor for maximum example utility (#604) Borrowed a lot of this from #593, and merged with foc-devnet-info support. Update packages/synapse-core/src/foc-devnet-info/src/index.ts Co-authored-by: Rod Vagg <rod@vagg.org> fixes: PR review fix: remove redundant loadDevnetInfo() function
17f4028 to
ff67e43
Compare
Request signoff and merge @hugomrdias @rjan90 |
|
Given that this has been rebased, and Hugo gave a thumbs up for merging here in slack, I will go ahead and merge this |
Introduce:
foc-devnet-infolibraryChainfromDevnetInfoexported byfoc-devnete2etest uses this library now, as an example to interface withfoc-devnet