Skip to content

feat: Data Access V1#125

Open
tnunamak wants to merge 9 commits intomainfrom
feat/data-access-v1
Open

feat: Data Access V1#125
tnunamak wants to merge 9 commits intomainfrom
feat/data-access-v1

Conversation

@tnunamak
Copy link
Member

@tnunamak tnunamak commented Nov 13, 2025

Adds Data Access V1 contracts deployed on Moksha but not Mainnet:

  • ProtocolConfig, AttestationPolicy, DatasetRegistry
  • VanaRuntimeServers, VanaRuntimePermissions, AccessSettlement

New controllers: accessSettlement, runtimePermissions

Also automates SERVER_PATHS and schema type generation from OpenAPI spec.

ABI sources:

  • Data Access V1: Moksha (contracts not on Mainnet)
  • Others: Mainnet (avoid Moksha regressions per PRO-794)

Public APIs exist for contracts not on Mainnet.

…ype generation

Adds 6 Data Access V1 contracts (ProtocolConfig, AttestationPolicy, DatasetRegistry, VanaRuntimeServers, VanaRuntimePermissions, AccessSettlement) to enable protocol configuration and runtime permission management.

Automates SERVER_PATHS generation by extracting endpoint paths directly from OpenAPI spec using operationIds converted to camelCase, eliminating manual maintenance when server API changes.
@vercel
Copy link

vercel bot commented Nov 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
vana-console Ready Ready Preview Nov 21, 2025 0:16am
vana-rbac-auditor Ready Ready Preview Nov 21, 2025 0:16am
vana-vibes-demo Ready Ready Preview Nov 21, 2025 0:16am

@github-actions
Copy link

Findings

  • High – updateIndexFile dynamically imports ../src/config/contracts.config.js, but that .js file does not exist in the workspace (type: module project keeps it as .ts). Running npm run fetch-abis will throw ERR_MODULE_NOT_FOUND before regenerating ABIs. Please import the .ts module (or leave the extension off) instead. (packages/vana-sdk/scripts/fetch-abis.ts:314-317)
  • Medium – generateServerPaths only inspects the first value returned by Object.values(pathConfig). As soon as a path defines multiple HTTP methods (e.g. both get and post, or even has a parameters property before the first verb), every subsequent operation on that path is skipped, so SERVER_PATHS will silently drop endpoints. Iterating all methods and handling only the HTTP verbs would avoid the missing exports. (packages/vana-sdk/scripts/fetch-server-types.ts:135-168)

…P methods

Fixes dynamic import to use .ts extension instead of .js for contracts.config, preventing ERR_MODULE_NOT_FOUND errors. Iterates through all HTTP methods per path to avoid silently dropping endpoints when a path defines multiple operations.
- Add RuntimePermissionsController for dataset monetization via runtime
- Add AccessSettlementController for operation payment settlement
- Add DLP Operations page to vana-console for permission management
- Add type-safe RuntimeGrantFile to relayer union types
- Export new controllers and types from SDK entry points
- Add utility functions for runtime grant file handling
…ions controllers

- Add 16 tests for AccessSettlementController (read/write operations)
- Add 15 tests for RuntimePermissionsController (CRUD operations)
- Test error handling, wallet validation, and contract interactions
- Coverage now at 76.18% (above 76% threshold)
- All tests passing (2211 passed, 3 skipped)
- Replace placeholder permissionId (0n) with actual event parsing
- Use waitForTransactionEvents to extract PermissionCreated event
- Add test for missing event error case
- Update test expectations to match real permission IDs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add inline comments to contracts.config.ts documenting which contracts
should have their ABIs fetched from Moksha testnet:

- Data Access V1 contracts (not yet deployed to Mainnet)
- UniswapV3NonfungiblePositionManager (Mainnet contract not verified)
- DataLiquidityPool (template contract with identical ABIs)

These comments serve as the source of truth for ABI generation strategy
until Data Access V1 deploys to Mainnet.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@tnunamak tnunamak changed the title feat(contracts): add Data Access V1 contracts with automated server type generation feat: add Data Access V1 contracts with automated server type generation Nov 19, 2025
Fix production readiness issues in dataset controller and console UI:

SDK Changes:
- Fix template literal type violations in DatasetController error handling
- Add proper type guards for error messages (5 locations)

Console Changes:
- Fix Promise type annotation in file loading
- Consolidate duplicate wagmi imports
- Remove unused imports (Checkbox, Filter, UserFile)
- Fix floating promises in useEffect hooks
- Fix confusing void expressions in event handlers
- Fix Select component items prop type error

All validation checks now pass: lint, typecheck, and tests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove requirement for NEXT_PUBLIC_PERSONAL_SERVER_BASE_URL environment
variable in vana-console to fix Vercel deployment.

Changes:
- Default to empty string in SDKConfigProvider
- Conditionally pass defaultPersonalServerUrl to SDK only when defined
- Remove error throws in API routes for missing env var

The personal server URL is optional and the SDK/app should work without it.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments