Add Entropy Arcade Example (Pyth Entropy) #78
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Pyth Examples Contribution
Type of Contribution
Project Information
Project/Example Name: Entropy Arcade
Pyth Product Used:
Blockchain/Platform:
Description
What does this contribution do?
Adds Entropy Arcade, an on-chain arcade that demonstrates Pyth Entropy integration for provably fair randomness in blockchain games. Try our signature game Plinko, which is the most optimized and responsive example since it runs on the PlinkoEntropy.sol contract.
Other games currently share the same randomness logic and can sometimes take a little longer to respond. A dedicated contract — EntropyArcadeV1.sol (see EntropyArcadeV1.json) — is already implemented and will soon handle game-specific entropy for improved performance.
How does it integrate with Pyth?
Each game contract uses requestWithCallback() from the official Pyth Entropy contract. Once the randomness is received, the callback finalizes the outcome and emits events that update the frontend in real time.
What problem does it solve or demonstrate?
Shows how developers can build transparent, verifiable, and tamper-proof on-chain games using Pyth Entropy.
It’s a simple end-to-end reference — from requesting randomness to displaying results on-chain and in the frontend.
Directory Structure (for new examples)
entropy-arcade/
├── contracts/ # Solidity contracts (PlinkoEntropy.sol, EntropyArcadeV1.sol)
├── scripts/ # Hardhat deploy and fund scripts
├── src/ # Next.js + Tailwind frontend (Wagmi + Viem)
├── public/ # Static assets
├── README.md # Project documentation
└── .gitignore
Testing & Verification
How to Test This Contribution
Prerequisites
Setup & Run Instructions
bash
git clone https://github.com/PranavPipariya/pyth-examples.git
cd entropy-arcade
pnpm install
-- if you wanna deploy the contract yourself aswell:
pnpm hardhat compile
pnpm hardhat run scripts/deploy.ts --network baseSepolia
(this will display you an address and replace the address with the current address by doing a simple search across the project)
pnpm dev
Open http://localhost:3000
Deployment Information
Network: Base Sepolia
Contract Address(es): 0xA14eC31d36C5ba64307e3eDd5a7B7497a02BB8fB
Checklist
Code Quality
Testing