-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Milestone
Description
We have 3 pieces where contract addresses get involved, discounting the current sdk constants.ts which is slowly being eaten away into oblivion.
- wagmi.config.ts which fetches ABIs from a pinned
GIT_REFfor ABI and an address each for FWSS on mainnet and calibnet. When run it makes a generated.ts with the addresses for the contracts it discovers via a multicall and their ABIs. - chains.ts which imports generated.ts to build viem Chain objects
- filecoin-services deployments.json which has canonical addresses updated on release of new contracts.
How do we make sure we have the right ABI and addresses here and we don't get out of sync?
One challenge is that we have been bumping that commit to pull in newer ABIs than are released, maybe we need to change that, or do it on feature branches that only get merged once we have a release. We could make that a practice post-v1.
Some options:
- Build-time validation script -
pnpm buildcould fetch deployments.json and do an update for you and get everything in sync. - CI linter in synapse-sdk - fails you when you're out of sync
Both of those options are reactive rather than proactive, they require someone to be making a change for anything to get updated, and they'd get mixed up in PRs that are entirely unrealted to the contract updates.
- Cron GHA in Synapse that opens a PR when it detects a change
- Release trigger on filecoin-services that opens a PR, or delegates to Synapse, to open a PR when a release has been cut
- Publish a new package,
@filoz/contract-addressesfrom filecoin-services whenever we cut a release there and include deployments.json data in it, versioned the same as filecoin-services, depend on it in Synapse (but then what .. do we rebuild here, do we put the wagmi / generated stuff into that package so it does the building?)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
🐱 Todo