feat: add FoR indexer and Sepolia deployment flow#68
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a FoR indexer implementation using Goldsky and completes the Sepolia deployment flow for both contracts and the subgraph.
Changes:
- Added complete indexer package with GraphQL schema, subgraph manifest template, and event mapping handlers for
TransferWithDistributionandDistributionRatioUpdatedevents - Added
DistributionRatioUpdatedevent emission to Router contract'ssetFundRatioandsetBurnRatiofunctions - Introduced FoRToken.sol with allowlist functionality and EIP712 signature support
- Updated Router and RouterFactory to accept
initialAdminparameter - Added deployment configurations and scripts for Sepolia and Base networks
- Updated documentation with indexer setup instructions
Reviewed changes
Copilot reviewed 37 out of 41 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/indexer/* | New indexer package with schema, mappings, configs, and deployment scripts for Goldsky subgraph |
| packages/contract/contracts/Router.sol | Added DistributionRatioUpdated event and emissions in ratio setter functions |
| packages/contract/contracts/FoRToken.sol | New ERC20 token with permit, allowlist, and signature-based access control |
| packages/contract/ignition/modules/Router.ts | Updated to use FoRToken module and accept initialAdmin parameter |
| packages/contract/ignition/parameters.*.json | Added initialAdmin parameter to deployment configs |
| packages/contract/test/* | Formatting updates to align with code style |
| packages/contract/README.md | Updated with new deployment workflow and environment variable requirements |
| README.md | Added indexer section and updated commands |
| AGENTS.md | New file documenting repository guidelines |
| .vscode/* | Removed IDE-specific settings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
概要
TransferWithDistribution/DistributionRatioUpdatedを index するpackages/indexerを追加Router.solにDistributionRatioUpdatedemit を実装(setFundRatio/setBurnRatio)変更内容
packages/indexerを新規追加schema.graphqlにTransfer/User/DistributionRatioを追加src/mapping.tsにhandleTransferWithDistribution/handleDistributionRatioUpdatedを実装subgraph.template.yaml+config/sepolia.json/config/base.jsonで manifest 生成packages/contract/contracts/Router.solにDistributionRatioUpdatedイベント追加packages/contract/ignition/modules/Router.tsを現行 RouterFactory 引数に追従packages/contract/package.jsonにdeploy:local:Router/deploy:sepolia:Routerを追加packages/contract/README.md/packages/indexer/README.mdを実運用フローに更新動作確認
pnpm --filter @for/indexer build:sepolia成功pnpm --filter @for/indexer build:base成功https://api.goldsky.com/api/public/project_cm5nv64onnxxz01wf8smdgk1e/subgraphs/for-sepolia/0.0.0/gn注意事項
for-sepolia/0.0.0は同名再デプロイ不可のため、運用時はバージョン命名ルールが必要packages/contract/ignition/deployments/*の生成物更新を含むCloses #21
Closes #22
Closes #23
Closes #24
Closes #25