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.
QR Stablecoin Payments (BNB Chain)
Live demo: https://bnbchainqrpayments.netlify.app
PaymentProcessor (BNB Chain testnet):
0x369bdf926Eaaf7170Be7E7BD30c7Efa2aA72A3EAFeature showcase
paymentStatus(invoiceId), and display totals./api/invoicesmanages storage;/api/invoices/statusreadspaymentStatusserver-side usingBSC_RPC_URL./api/faucetto mint 10 mock USDT per request via the provided private key.Architecture
Deployment guide
1. Deploy PaymentProcessor via Remix (BNB Chain testnet)
contracts/src/PaymentProcessor.sol.PaymentProcessorpassing the stablecoin address (e.g., yourUSDYMockdeployment). The live demo uses0x369bdf926Eaaf7170Be7E7BD30c7Efa2aA72A3EA.USDYMock.soland mint test balances to customer wallets.2. Provision Supabase
public.invoicestable with the schema defined insupabase/migrations/001_create_invoices.sql(invoice_id,nonce, status, timestamps, etc.).3. Configure environment variables
In
frontend/.env.local(copy from.env.example), set:NEXT_PUBLIC_*values are exposed to the browser.BSC_RPC_URLis only consumed by API routes (server-side) when checking settlement.USDY_FAUCET_PRIVATE_KEYis used by the/api/faucetroute to mint 10 USDT per request (the hackathon key provided is0x1578...006a—store it securely in envs, never hard-code in client bundles).4. Install & run frontend
Set
npm run build && npm start(or deploy via Netlify/Vercel) for production; the live site uses Netlify.5. Merchant workflow
/merchant.registerMerchant).6. Customer workflow
/pay?payload=...(from QR link)./api/invoices/status.Repo scripts
Supabase schema (for reference)
Notes
USDYMock.solacts as a USDT mock withmintexposed; ensure customers mint or receive tokens on BNB Testnet./api/invoices/status, which uses server-side RPC to readpaymentStatus(invoiceId)fromPaymentProcessor.Feel free to extend with Moralis streams, NFC hooks, or production-grade storage. The current stack is tuned for hackathon demos with rapid QR issuance and Supabase-backed tracking.