Cartridge VRF Integration

Integrate Cartridge VRF for atomic randomness in Dojo games.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/cartridge-gg/scoundrel --skill cartridge-vrf-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Cartridge VRF Integration
Source: https://github.com/cartridge-gg/scoundrel/tree/main/.agents/skills/dojo-vrf
Command: npx skills add https://github.com/cartridge-gg/scoundrel --skill cartridge-vrf-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cartridge VRF Integration provides provably fair, atomic randomness for on-chain Dojo games, eliminating trust gaps in randomness across game actions.

Core Features & Use Cases

  • Atomic randomness within a single transaction for game actions like dice rolls, shuffles, or combat outcomes.
  • Easy integration with Dojo by consuming VRF values through the provider and ensuring end-to-end verifiability.
  • Supports testing with mock providers and clear guidance for deploying to mainnet or Sepolia.

Quick Start

Set up your Dojo game to request randomness via request_random and consume_random in the same transaction to obtain a verifiable random value.

Frequently Asked Questions about Cartridge VRF Integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get verifiable randomness in a Dojo game on Starknet?

Verifiable randomness in a Dojo game is achieved by integrating Cartridge VRF, using the request_random and consume_random functions within the same transaction to ensure atomic, provably fair outcomes.

What is atomic randomness for on-chain game actions?

Atomic randomness is verifiable random data generated and consumed within a single transaction, ensuring deterministic outcomes for game actions like dice rolls, shuffles, and combat without trust gaps.

Can I use a mock VRF provider to test Dojo game randomness?

Yes, you can use mock providers to test randomness logic during Dojo game development before deploying to Starknet mainnet or Sepolia, ensuring your request and consume flow works correctly.

How do I generate provably fair dice rolls and shuffles in Cairo?

Provably fair dice rolls and shuffles in Cairo are generated by requesting and consuming on-chain VRF values in a single transaction, providing end-to-end verifiable randomness for game mechanics.

Does Starknet support in-transaction verifiable randomness for games?

Starknet supports in-transaction verifiable randomness through Cartridge VRF integration, allowing Dojo games to request and consume random values atomically for deterministic game outcomes.

What is the best way to implement combat outcomes in Dojo games?

The best way to implement combat outcomes in Dojo games is using Cartridge VRF to request and consume verifiable randomness atomically, ensuring provably fair and transparent on-chain results.