Summary
Add an end-to-end test path that proves a contract membership event can result in an API access decision.
Current Behaviour
Contract tests and backend code exist separately. There is no test that validates the integration boundary between MembershipNFT, contract ABI helpers, database state, the policy engine, and the access API.
Expected Behaviour
The repository should include at least one deterministic integration scenario that starts with contract-like membership data and ends with a successful or denied API access decision.
Suggested Implementation
Use Foundry tests for contract behaviour and TypeScript integration tests for decoded fixture events. Generate or maintain event fixtures from the Solidity contract, apply them to the database through the indexer or sync service, then call the Fastify route with app.inject().
Files or Areas Likely Affected
contracts/test/MembershipNFT.t.sol
packages/contracts/src/index.ts
apps/access-api/src/workers/
apps/access-api/src/**/*.test.ts
apps/access-api/prisma/
README.md
Acceptance Criteria
Additional Notes
This can depend on the on-chain event indexing issue, but should remain focused on regression coverage rather than worker implementation details.
Summary
Add an end-to-end test path that proves a contract membership event can result in an API access decision.
Current Behaviour
Contract tests and backend code exist separately. There is no test that validates the integration boundary between
MembershipNFT, contract ABI helpers, database state, the policy engine, and the access API.Expected Behaviour
The repository should include at least one deterministic integration scenario that starts with contract-like membership data and ends with a successful or denied API access decision.
Suggested Implementation
Use Foundry tests for contract behaviour and TypeScript integration tests for decoded fixture events. Generate or maintain event fixtures from the Solidity contract, apply them to the database through the indexer or sync service, then call the Fastify route with
app.inject().Files or Areas Likely Affected
contracts/test/MembershipNFT.t.solpackages/contracts/src/index.tsapps/access-api/src/workers/apps/access-api/src/**/*.test.tsapps/access-api/prisma/README.mdAcceptance Criteria
MembershipNFTeventsAdditional Notes
This can depend on the on-chain event indexing issue, but should remain focused on regression coverage rather than worker implementation details.