Skip to content

Add Avnu paymaster and VRF integration#399

Merged
kariy merged 84 commits intomainfrom
wedoavnu
Feb 6, 2026
Merged

Add Avnu paymaster and VRF integration#399
kariy merged 84 commits intomainfrom
wedoavnu

Conversation

@tarrencev
Copy link
Contributor

@tarrencev tarrencev commented Jan 22, 2026

Depends on #417

Adds sidecar integration for paymaster-service and vrf-server, including CLI/config flags, bootstrap, VRF wrapping in cartridge outside execution, and paymaster profile generation with Avnu pricing. Removes custom katana paymaster/VRF crates, updates Docker to install sidecar binaries from .tool-versions, refreshes spec, trims the release workflow, derives a u64 VRF secret from the configured account key for vrf-server compatibility, and fixes paymaster/VRF CLI arg ids/defaults to avoid startup crashes. Adds unit tests for sidecar helpers and VRF seed/parsing to improve coverage. Tests: cargo check -p katana-node --features cartridge, cargo test -p katana-node --features cartridge, cargo test -p katana-rpc-server --features cartridge --lib, cargo test -p katana-rpc-server --features cartridge --test paymaster_proxy, cargo test -p katana-cli --features cartridge.

Paymaster service: https://github.com/avnu-labs/paymaster/tree/main/crates/paymaster-service
VRF Service: https://github.com/cartridge-gg/vrf/tree/main/server

@codecov
Copy link

codecov bot commented Jan 24, 2026

Codecov Report

❌ Patch coverage is 18.37192% with 1093 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.51%. Comparing base (9bde0ae) to head (2bba963).
⚠️ Report is 248 commits behind head on main.

Files with missing lines Patch % Lines
crates/paymaster/src/lib.rs 0.00% 405 Missing ⚠️
crates/cartridge/src/vrf/bootstrap.rs 18.91% 180 Missing ⚠️
crates/rpc/rpc-server/src/cartridge/mod.rs 0.00% 124 Missing ⚠️
crates/cli/src/args.rs 60.93% 75 Missing ⚠️
crates/cartridge/src/vrf/mod.rs 0.00% 69 Missing ⚠️
crates/cli/src/sidecar.rs 0.00% 63 Missing ⚠️
crates/cli/src/options.rs 13.46% 45 Missing ⚠️
crates/node/src/lib.rs 8.69% 42 Missing ⚠️
crates/rpc/rpc-server/src/cartridge/vrf.rs 47.29% 39 Missing ⚠️
crates/cartridge/src/vrf/client.rs 0.00% 15 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #399      +/-   ##
==========================================
- Coverage   73.32%   66.51%   -6.81%     
==========================================
  Files         209      273      +64     
  Lines       23132    32961    +9829     
==========================================
+ Hits        16961    21924    +4963     
- Misses       6171    11037    +4866     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tarrencev tarrencev changed the title Add Avnu paymaster and VRF integration spec Add Avnu paymaster and VRF integration Jan 26, 2026
@kariy kariy force-pushed the wedoavnu branch 3 times, most recently from 81be2d3 to ab2b31b Compare January 30, 2026 00:01
@kariy kariy marked this pull request as draft January 30, 2026 19:19
@kariy kariy force-pushed the wedoavnu branch 3 times, most recently from 478f6da to 98a836b Compare February 6, 2026 17:05
@kariy kariy marked this pull request as ready for review February 6, 2026 17:24
kariy and others added 26 commits February 6, 2026 14:51
- Update build.rs to use asdf for scarb version management, allowing
  different scarb versions per directory via .tool-versions files
- Add VRF contracts compilation and artifact copying to build script
- Add doc comments with full hex strings for HASH and CASM_HASH constants
  in the contract! macro
- Add vrf module with CartridgeVrfProvider, CartridgeVrfConsumer, and
  CartridgeVrfAccount contracts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…efinitions

- Add avnu-labs/paymaster as git submodule at v1.0.0
- Update build.rs to build AVNU contracts with scarb via asdf
- Add avnu module with AvnuForwarder contract to katana-contracts
- Update controller and cartridge crates to use contracts from katana-contracts
  instead of include_str! with JSON files
- Remove classes/ directory from controller (all contract artifacts now
  come from katana-contracts crate)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use ASDF_SCARB_VERSION env var to explicitly set scarb 2.11.4 for AVNU
contracts, since the submodule doesn't have a .tool-versions file.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use `asdf exec scarb` for version management, build all three contract
sets (main, VRF, AVNU) and copy artifacts to the shared build directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kariy kariy merged commit f694280 into main Feb 6, 2026
8 of 11 checks passed
@kariy kariy deleted the wedoavnu branch February 6, 2026 22:53
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.

2 participants