What problem does it solve?
Many on-chain games need cheap, deterministic, and trust-minimized randomness that can be generated and verified within a single transaction; this Skill removes reliance on off-chain or expensive RNG patterns by integrating Cartridge's verifiable RNG into contract flows.
Core Features & Use Cases
- Atomic verifiable randomness: Generate and verify randomness within one transaction to avoid race conditions and external oracle delays.
- Flexible source selection: Support for per-address nonces or explicit salts so developers can choose deterministic or varying seeds.
- Integration pattern and policy: Demonstrates calling request_random as the first multicall entry, consuming the result via consume_random in game logic, and adding the VRF provider to Controller policies for allowed methods.
- Use Cases: Ideal for dice rolls, loot drops, random map generation, and on-chain prediction outcomes where verifiability and atomicity are required.
Quick Start
Call request_random as the first entry in your multicall with a nonce or salt source, then invoke your game entrypoint that calls consume_random to retrieve the verifiable random value.