Skip to content

Provable-Games/metagame_extensions

Repository files navigation

Scarb Starknet Foundry codecov

Budokan Extensions

Modular entry validators for tournament platforms on Starknet. Compatible with Budokan and any platform implementing the same interfaces. Each validator defines qualification criteria that determine who can enter a tournament and how many entries they receive.

Packages

Package Description
entry_validator_interfaces Pure traits and types for entry validators
entry_validator_component EntryValidatorComponent SDK for building validators
entry_requirement_extensions Pre-built validator contracts
entry_validator_test_common Shared test mocks and constants

Validators

Validator Description
ERC20 Balance Entries based on ERC20 token balance with min/max thresholds
Governance Entries based on governance voting power and participation
Snapshot Entries based on historical point-in-time snapshot data
Opus Troves Entries based on Opus Protocol debt positions
Tournament Entries based on prior tournament qualification
ZK Passport Privacy-preserving entry via ZK proofs (Garaga Honk verifier)

Getting Started

Prerequisites

Toolchain versions are pinned in .tool-versions:

Build

scarb build                             # Build all packages

Test

snforge test --workspace                # Run all tests
snforge test -p entry_requirement_extensions        # Run validator tests only
snforge test -p entry_requirement_extensions <name> # Run a specific test by filter
snforge test --workspace --coverage     # Run with code coverage

Format

scarb fmt --workspace                   # Format Cairo files
scarb fmt --check --workspace           # Check formatting (used in CI)

Deployed Contracts

Validator Mainnet Sepolia
ZK Passport 0x01a2...2f4c 0x046a...0c7f

Deployment

Deployment scripts are in scripts/. Each validator has its own deploy script.

# 1. Configure environment
cp .env.example .env
# Edit .env with STARKNET_NETWORK, OWNER_ADDRESS, etc.

# 2. Deploy a validator
./scripts/deploy_snapshot_validator.sh
./scripts/deploy_erc20_balance_validator.sh
./scripts/deploy_tournament_validator.sh
./scripts/deploy_opus_troves_validator.sh
./scripts/deploy_open_entry_validator.sh

Requires starkli and scarb. See scripts/README.md for detailed deployment instructions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors