Privy MPC wallet demo #97
Open
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.
π BNB Ping Pong DApp β Privy MPC Wallet Demo
This is a minimal web3 DApp that demonstrates how to use Privy Embedded Wallets to interact with a smart contract on the BNB Testnet. Players can click Ping or Pong, which sends an on-chain transaction via Privy, updating the contract state.
π Demo Details
97
)0x52943bFb088221cd6E3181fbc19081A6B34be948
https://data-seed-prebsc-1-s1.binance.org:8545/
π¦ Tech Stack
π How to Run Locally
1. Clone the repo
git clone https://github.com/yourusername/bnb-pingpong.git cd bnb-pingpong
2. Install dependencies
3. Configure environment variables
Copy the
.env.example
to.env.local
:Then update the following fields with your Privy credentials:
4. Create a Privy Project
NEXT_PUBLIC_PRIVY_APP_ID
PRIVY_APP_SECRET
http://localhost:3000
to the allowed origins in your Privy dashboard5. Start the dev server
Visit
http://localhost:3000
in your browser.π Smart Contract ABI
π UX Notes
useSendTransaction()
with success callbacksπ§ͺ BNB Testnet Faucet
Get testnet BNB from:
π https://bnb-faucet.netlify.app/
π .env.example
Use this template to set up your local
.env.local
file:π License
MIT β use freely for demos, hacks, and experimentation.
Made with π on BNB Testnet.