# 🎲 Rolling the Dice: Second Game Component Ready

*ChainHackers Weekly - Developer Notes Entry #3*

By [ChainHacker](https://paragraph.com/@chainhacker) · 2025-06-09

betswirl, sdk, devtools, web3

---

This week, we didn’t just roll the dice—we shipped it. DiceGame is live, and it’s the second fully working, on-chain BetSwirl game component we’ve added to the SDK.

Brainpower Bonus
----------------

We got backup: a core dev from BetSwirl joined the party and walked us through how to structure React hooks for cleaner, custom UI integration. Hooks, providers, separation of concerns—it clicked. Expect a blog post or recipe guide soon, especially for those building skins and extensions.

Visual Boost
------------

We added a bunch of new backgrounds—ranging from tasteful to completely chaotic—and started putting Playwright + Synpress to work for proper E2E tests. It’s no longer just a weekend project; we’re locking in real infra.

The Game
--------

Pick a number from 1 to 99 and bet that the dice will roll under it. Pick 20? You’ve got a 20% chance of winning ~5x. Pick 80? You’ve got an 80% chance of winning ~1.25x. Classic high risk vs low risk.

One SDK, Two Games
------------------

DiceGame follows the same architecture as CoinToss. Same GameFrame, same theming system, same `usePlaceBet` logic behind the scenes. Swapping games is as simple as changing one component name. Yes, you can render both in the same app.

![](https://storage.googleapis.com/papyrus_images/beacf7a18db729bfac41b9b2e7835c60.png)

  

Who’s It For?
-------------

We’ve seen interest from memecoin communities, token projects, and even DeFi dashboards. The use case is always the same: plug in a game, give users something fun to do, and earn a revenue share without building a casino from scratch.

Each game call is fully on-chain, randomness is handled by Chainlink VRF, and users can verify every outcome.

Where We Are Now
----------------

Storybook hosts both games with full theme toggles and wallet integration. Want to test them? Go for it. The SDK is nearly package-ready—we're preparing the npm release and polishing the final DX.

Coming Up
---------

*   📦 npm packaging + docs
    
*   💱 Token selector (currently only ETH)
    
*   🎯 Next games: Roulette + Keno
    
*   📱 Farcaster frame experiments
    

We’re still early, but getting more confident with each release. Curious what the web will do with on-chain games this easy to drop in.

Try the games: [Storybook link](https://demo.betswirl-sdk.chainhackers.xyz/?path=/docs/game-dicegame--docs)

* * *

_Want to build with us? Ping us anytime:_  
Twitter: [https://x.com/ChainHackerClan](https://x.com/ChainHackerClan)  
Farcaster: [https://farcaster.xyz/chainhacker](https://farcaster.xyz/chainhacker)

---

*Originally published on [ChainHacker](https://paragraph.com/@chainhacker/rolling-the-dice)*
