Loops HouseRolet NEAR

NEAR HACKATHON
Team
1 member- SAOwner
Samet Şeyhanlıoğlu
Overview
Rolet is a turn-based revolver duel for two players, and every rule runs in a NEAR smart contract. The contract loads 8 chambers with a random 2 to 6 live rounds and announces the count. Each turn you either play an item card or pull the trigger: at your opponent, or at yourself, which keeps your turn if the round is a blank. Each player has 4 HP, a match is best of 3 rounds, and the winner is paid from the contract's treasury.
How it uses NEAR:
- The Rust near-sdk contract handles match rules, the shared deck (9 item types x 4 copies), timeouts, the leaderboard and payouts. Every action is emitted as a NEP-297 event.
- Randomness is commit-reveal: both players commit to a secret, and each draw mixes the match seed, a nonce and the block random seed, so no single party chooses the outcome.
- A character NFT (NEP-171) is the entry ticket. Character sales fund the treasury.
- Turns are signed with a function-call access key limited to the game contract, so there is no wallet popup per move. On testnet, a full match was played with only function-call keys.
This is a port. Rolet started on Solana/MagicBlock, and that baseline is tagged pre-hackathon. Everything after it was built for NEAR at this hackathon, and the README links the diff. The contract has 136 unit tests and 9 sandbox integration tests. A TypeScript rules engine is checked against vectors exported from the contract. The web client is a top-down 2D card board, and its /duel page plays on chain against the testnet contract. A 1-minute demo video is in the repo at docs/demo.mp4.