The CapSign subgraph indexes data from Base Sepolia (testnet) and Base Mainnet using Goldsky.
Since all infrastructure contracts use CREATE2 deployment, they have the same addresses on both networks - only the start blocks differ.
We use The Graph's standard multi-network approach:
networks.json: Defines network-specific configuration (addresses + start blocks)subgraph.yaml: Single config file that referencesnetworks.json- Build with
--networkflag: Generates network-specific artifacts - Deploy to Goldsky: Separate subgraph instances per network
cd subgraph
pnpm run deploy:sepoliaThis will:
- Backup
subgraph.yaml - Update network fields to
base-sepolia - Run
pnpm codegento generate types - Run
graph buildto build artifacts - Deploy to Goldsky as
capsign-base-sepolia/0.2.16 - Tag as
prod - Restore original
subgraph.yaml
cd subgraph
pnpm run deploy:mainnetThis will:
- Backup
subgraph.yaml - Update network fields to
base - Run
pnpm codegento generate types - Run
graph buildto build artifacts - Deploy to Goldsky as
capsign-base/0.2.16 - Tag as
prod - Restore original
subgraph.yaml
- Chain ID: 84532
- Start Block: 32,367,301 (WalletFactory deployment)
- Goldsky Instance:
capsign-base-sepolia
- Chain ID: 8453
- Start Block: 36,593,031 (infrastructure deployment)
- Goldsky Instance:
capsign-base
- DiamondFactory:
0x036478441d6673FE1215c62df08e68a8255974cA - EAS:
0x4200000000000000000000000000000000000021
- WalletFactory:
0x9D65c0fF2fa20252f4E9Db24f9601b38658987bD - OfferingFactory:
0xd3a61dC2a539cabb335a1de30cc84bb3239c792b - TokenFactory:
0x24Fa5Dbf02e2E15F6d10f6DDC96a9EA74380Ad41
- DocumentComplianceModule:
0x802ee5ca1030F0F9bF0c6c8756E969750BfE40D1 - EligibilityComplianceModule:
0x5ea4931C63A05F329601e72e526f150F5c2e07e1 - WhitelistComplianceModule:
0x1753bC2Bc7044cc4209028d091838fCA278DC81D - AccreditationConditionModule:
0xFF1bf26fB3c24d16f709B4a530Fb27fa1Bd4F1D7 - LockupConditionModule:
0x3b38D865D489236D13149f92436cEB4df2f2772e - VestingConditionModule:
0x6a4D1fCC8e64e5503D03F5367dE7B91BB91C879C
After deployment, your subgraphs will be available at:
- Sepolia:
https://api.goldsky.com/api/public/project_<id>/subgraphs/capsign-base-sepolia/prod/gn - Mainnet:
https://api.goldsky.com/api/public/project_<id>/subgraphs/capsign-base/prod/gn
When you update schema.graphql:
- Run
pnpm codegento regenerate TypeScript types - Update mapping files if needed
- Bump version in
package.json - Deploy to both networks
- Separate Instances: Each network has its own subgraph instance in Goldsky
- Independent Versioning: Each instance can be versioned separately
- No Cross-Chain Queries: Queries are per-network (standard pattern)
- Same Codebase: Both networks use the same schema/mappings, just different start blocks