Skip to content

feat: add FoR indexer and Sepolia deployment flow#68

Open
aowheel wants to merge 6 commits intomainfrom
feature/indexer
Open

feat: add FoR indexer and Sepolia deployment flow#68
aowheel wants to merge 6 commits intomainfrom
feature/indexer

Conversation

@aowheel
Copy link
Collaborator

@aowheel aowheel commented Feb 25, 2026

概要

  • Router の TransferWithDistribution / DistributionRatioUpdated を index する packages/indexer を追加
  • Router.solDistributionRatioUpdated emit を実装(setFundRatio / setBurnRatio
  • contract/indexer の Sepolia デプロイ手順を README で整備
  • Sepolia へ Router をデプロイし、subgraph を Goldsky へデプロイして疎通確認済み

変更内容

  • packages/indexer を新規追加
  • schema.graphqlTransfer / User / DistributionRatio を追加
  • src/mapping.tshandleTransferWithDistribution / handleDistributionRatioUpdated を実装
  • subgraph.template.yaml + config/sepolia.json / config/base.json で manifest 生成
  • packages/contract/contracts/Router.solDistributionRatioUpdated イベント追加
  • packages/contract/ignition/modules/Router.ts を現行 RouterFactory 引数に追従
  • packages/contract/package.jsondeploy: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 成功
  • Goldsky endpoint 疎通確認
  • Sepolia endpoint: 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

Copilot AI review requested due to automatic review settings February 25, 2026 11:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TransferWithDistribution and DistributionRatioUpdated events
  • Added DistributionRatioUpdated event emission to Router contract's setFundRatio and setBurnRatio functions
  • Introduced FoRToken.sol with allowlist functionality and EIP712 signature support
  • Updated Router and RouterFactory to accept initialAdmin parameter
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants