Skip to content

**feat(env+docs+sdk): AVNU paymaster, Starknet v8, E2E updates**#7

Merged
hooftly merged 3 commits intomainfrom
develop
Oct 15, 2025
Merged

**feat(env+docs+sdk): AVNU paymaster, Starknet v8, E2E updates**#7
hooftly merged 3 commits intomainfrom
develop

Conversation

@hooftly
Copy link
Member

@hooftly hooftly commented Oct 15, 2025

Summary

Standardizes env templates, upgrades to starknet 8.5.5, introduces AVNU sponsorship, and refactors paymaster integration. E2E flows now support attach-only Sepolia with AVNU first and clean Noop fallback. Docs and interfaces are aligned to validAfter and validUntil, guardian events, and the full error surface. Contract validation tightened for owner paths.

Changes

  • Env

    • Add root .env for devnet and trim .env.sepolia to the vars the scripts consume
    • Add .env.sepolia.example with AVNU fields and clear comments
    • Update .gitignore to allow checked-in .env for demos
  • Docs

    • Add demo checklist with commands and expected logs
    • Clarify sncast usage, zero-arg calls without calldata, and --contract-name UA2Account
    • Update interfaces: owner_epoch, guardian events, error list, ERC20 value-cap notes
    • Refresh SDK API and RFC to validAfter and validUntil and paymaster examples
  • Dependencies and build

    • Bump starknet to 8.5.5 across workspaces
    • Wire new tsx commands with explicit example tsconfig
    • Add @ua2/paymasters dependency to @ua2/core and example app
  • Core SDK

    • Add mapContractError and export via UA2.errors
    • Split paymaster runner into paymasterRunner.ts
    • Expose NoopPaymaster and new AvnuPaymaster via @ua2/paymasters
    • Update index exports and tests
  • Paymasters package

    • New AvnuPaymaster adapter with sponsored and default modes
    • Rehome NoopPaymaster with stricter typing and input validation
    • Package exports include types and source for consumers
  • E2E

    • Devnet script uses v3 tx options and helper resource bounds
    • Sepolia script is attach-only, prefers AVNU sponsorship, falls back to Noop with clear logs
    • Shared toolkit refactor: deterministic deploy support, declare v2 path, resource bounds helpers, stricter ctor building, improved diagnostics
  • Contracts

    • Factor assert_valid_owner_signature helper
    • Enforce owner signature in __validate_deploy__
  • Tests

    • Add errors.spec.ts for mapContractError
    • Update index and paymaster tests for new exports and runner

Motivation

Make the demo reproducible and judge friendly, reduce env friction, move to current starknet client APIs, and provide a concrete sponsored path on Sepolia while preserving a safe fallback. Improve developer ergonomics with typed error mapping and a cleaner paymaster integration.

Testing

  • Env

    • .env devnet run: npm run e2e:devnet prints success summary
    • .env.sepolia exported then npm run e2e:sepolia shows AVNU availability and PASS
    • Override PAYMASTER_URL to confirm Noop fallback path
  • SDK

    • vitest green for @ua2/core, @ua2/paymasters, @ua2/react, example
    • errors.spec.ts maps known ERR_* codes and unknown fallbacks
  • Contracts

    • Owner signature required on deploy validate path
  • Manual

    • Demo checklist followed end to end, Vite server boots and UI renders

Checklist

  • Tests
  • Docs
  • Lint
  • Ready for review

- Add AVNU paymaster adapter alongside refactored Noop; export both from
  @ua2/paymasters for sponsorship and token-fee flows
- Introduce dedicated paymaster runner in @ua2/core plus factory helpers
  to instantiate Noop or AVNU adapters
- Update Sepolia E2E to prefer AVNU with clear Noop fallback messaging;
  provide example environment template for paymaster settings
- Refresh SDK/API docs, Sepolia runbook, interface notes, and demo
  checklist to cover AVNU modes, valid_after/valid_until usage, and
  end-to-end demo expectations
- Update SDK & RFC docs to use validAfter/validUntil, note ERC-20
  transferFrom enforcement, and clarify sncast usage (no empty calldata
  flags)
- Sync interface references with contract: owner_epoch, guardian
  lifecycle events, full Cairo error surface, and mapContractError helper
- Implement mapContractError in core, expose via public SDK surface, and
  add targeted tests ensuring Cairo reverts map to helpful error classes
@hooftly hooftly merged commit 2d200a9 into main Oct 15, 2025
2 checks passed
@hooftly hooftly deleted the develop branch October 15, 2025 07:31
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