
🎲 Rolling the Dice: Second Game Component Ready
ChainHackers Weekly - Developer Notes Entry #3

Simplifying Casino Games for Mobile
ChainHackers Weekly

Deploy Your Own BetSwirl Affiliate Mini-App in 30 Minutes
A step-by-step guide to launching BetSwirl games as a Farcaster mini-app in 30 minutes.
<100 subscribers

We’re back with another dose of dev progress. This week’s highlight? You can now play the game right in the browser via our demo Storybook — no need to integrate anything just yet.
After last week’s layout and styling adventures, we wrapped the entire game flow into two clean exports:
A single hook: usePlaceBet
A React component: <CoinTossGame />
All the on-chain complexity — randomness, wallet checks, error handling, event listening — is baked in. Just import and go.

Here's all it takes to wire up the game component in your app:
const config = createConfig({
chains: [base],
transports: { [base.id]: http() },
})
export function CoinTossGamePage() {
return (
<WagmiProvider config={config}>
<QueryClientProvider client={new QueryClient()}>
<OnchainKitProvider chain={base}>
<BettingConfigProvider value={{ affiliate: "0x0" }}>
<CoinTossGame />
</BettingConfigProvider>
</OnchainKitProvider>
</QueryClientProvider>
</WagmiProvider>
)
}
That’s it. If your wallet is connected, you can play. If not, OnchainKit handles it.
Most stable: Desktop browsers with browser wallets (e.g. Coinbase Wallet, MetaMask)
Mobile: Coming soon — we’re starting Farcaster Frame support!
Also keeping an eye on Base minikit — hoping to plug into that as well.
In the coming week:
📦 Publish the first npm package for easy component installs
🎨 Polish token selection and mobile layout
Begin Farcaster frame integration using Base minikit
The component is real, live, and working—no mockups. And it’s not just for meme sites. Anyone building with on-chain vibes can plug this in and start earning from gameplay.
More soon!

We’re back with another dose of dev progress. This week’s highlight? You can now play the game right in the browser via our demo Storybook — no need to integrate anything just yet.
After last week’s layout and styling adventures, we wrapped the entire game flow into two clean exports:
A single hook: usePlaceBet
A React component: <CoinTossGame />
All the on-chain complexity — randomness, wallet checks, error handling, event listening — is baked in. Just import and go.

Here's all it takes to wire up the game component in your app:
const config = createConfig({
chains: [base],
transports: { [base.id]: http() },
})
export function CoinTossGamePage() {
return (
<WagmiProvider config={config}>
<QueryClientProvider client={new QueryClient()}>
<OnchainKitProvider chain={base}>
<BettingConfigProvider value={{ affiliate: "0x0" }}>
<CoinTossGame />
</BettingConfigProvider>
</OnchainKitProvider>
</QueryClientProvider>
</WagmiProvider>
)
}
That’s it. If your wallet is connected, you can play. If not, OnchainKit handles it.
Most stable: Desktop browsers with browser wallets (e.g. Coinbase Wallet, MetaMask)
Mobile: Coming soon — we’re starting Farcaster Frame support!
Also keeping an eye on Base minikit — hoping to plug into that as well.
In the coming week:
📦 Publish the first npm package for easy component installs
🎨 Polish token selection and mobile layout
Begin Farcaster frame integration using Base minikit
The component is real, live, and working—no mockups. And it’s not just for meme sites. Anyone building with on-chain vibes can plug this in and start earning from gameplay.
More soon!

🎲 Rolling the Dice: Second Game Component Ready
ChainHackers Weekly - Developer Notes Entry #3

Simplifying Casino Games for Mobile
ChainHackers Weekly

Deploy Your Own BetSwirl Affiliate Mini-App in 30 Minutes
A step-by-step guide to launching BetSwirl games as a Farcaster mini-app in 30 minutes.
Share Dialog
Share Dialog
4 comments
What are you building this week?
I built this handmade
This: https://paragraph.com/@chainhacker/game-component-goes-live First chain working is Base
First @betswirl SDK game component just got playable!