Difficulty: Expert
Type: feature
Background
The README explicitly lists "Multi-chain support (current: EVM only)" as a deferred area, and notes that after deploying MembershipNFT, operators set a single MEMBERSHIP_NFT_ADDRESS and CHAIN_ID in .env — implying the current architecture assumes one contract on one chain.
Problem
Communities that deploy MembershipNFT on more than one EVM chain (e.g., mainnet + an L2) have no way to represent that in the data model or access API, since membership resolution is implicitly single-chain.
Expected outcome
The data model and access API support multiple (chainId, contractAddress) pairs per community, with membership resolution correctly disambiguating a wallet's memberships across chains, and packages/contracts exposing per-chain ABI/address configuration instead of a single global address.
Suggested implementation
- Extend the
memberships/communities Prisma schema to key membership records by (chainId, contractAddress, tokenId) rather than assuming a single global contract.
- Update
packages/contracts to support a registry of { chainId, address, abi } entries per community instead of a single MEMBERSHIP_NFT_ADDRESS/CHAIN_ID pair.
- Update the event-ingestion module (see the reorg-handling issue, if implemented, or the current test-simulated flow) to run per configured chain and correctly attribute events to the right
(chainId, contractAddress).
- Update
/v1/memberships/:wallet and /v1/access/check to correctly aggregate or disambiguate memberships across chains for a single wallet.
- Update
.env.example, README, and docs/openapi.json to reflect the new multi-chain configuration model, including a migration guide from the current single-chain setup.
Acceptance criteria
Likely affected files/directories
packages/contracts/
apps/access-api/prisma/schema.prisma
apps/access-api/src/routes/
.env.example
README.md, docs/openapi.json
Difficulty: Expert
Type: feature
Background
The README explicitly lists "Multi-chain support (current: EVM only)" as a deferred area, and notes that after deploying
MembershipNFT, operators set a singleMEMBERSHIP_NFT_ADDRESSandCHAIN_IDin.env— implying the current architecture assumes one contract on one chain.Problem
Communities that deploy
MembershipNFTon more than one EVM chain (e.g., mainnet + an L2) have no way to represent that in the data model or access API, since membership resolution is implicitly single-chain.Expected outcome
The data model and access API support multiple
(chainId, contractAddress)pairs per community, with membership resolution correctly disambiguating a wallet's memberships across chains, andpackages/contractsexposing per-chain ABI/address configuration instead of a single global address.Suggested implementation
memberships/communitiesPrisma schema to key membership records by(chainId, contractAddress, tokenId)rather than assuming a single global contract.packages/contractsto support a registry of{ chainId, address, abi }entries per community instead of a singleMEMBERSHIP_NFT_ADDRESS/CHAIN_IDpair.(chainId, contractAddress)./v1/memberships/:walletand/v1/access/checkto correctly aggregate or disambiguate memberships across chains for a single wallet..env.example, README, anddocs/openapi.jsonto reflect the new multi-chain configuration model, including a migration guide from the current single-chain setup.Acceptance criteria
MembershipNFTdeployments on more than one chain simultaneously.env.example/OpenAPI updatedLikely affected files/directories
packages/contracts/apps/access-api/prisma/schema.prismaapps/access-api/src/routes/.env.exampleREADME.md,docs/openapi.json