How rasathelamedude/vaultpay works
VaultPay is a local-chain ERC-20 escrow dApp. A payer connects a wallet, obtains mock tUSD, approves VaultPay, and creates a payment with a recipient and deadline; the recipient can claim it, or the payer can cancel after expiry. The React app also displays wallet and transaction status, while the contracts enforce token and escrow operations. The README documents these capabilities; contract implementation details beyond the supplied excerpts are represented only where documented.
Main entry points: App.tsx Payment UI · MockTUSD.sol Mock tUSD · wagmi.ts Wallet config · VaultPay.sol VaultPay escrow
Components 11
Web application
- Browser app
frontend/src/main.tsx - Payment UI
frontend/src/App.tsx - Wallet config
frontend/src/wagmi.ts - Contract addresses
frontend/src/config.ts - Contract ABIs
frontend/src/abis.ts
Escrow contracts
- VaultPay escrow
contracts/VaultPay.sol - Mock tUSD
contracts/MockTUSD.sol
Local blockchain
- Hardhat local EVM
Other components
- Payer
- Recipient
- Injected wallet
Connections 15
- Payer → Payment UI: uses
- Recipient → Payment UI: uses
- Browser app → Payment UI: renders
- Browser app → Wallet config: provides config
- Payment UI → Contract addresses: reads addresses
- Payment UI → Contract ABIs: uses interfaces
- Payment UI → Injected wallet: connects and signs
- Wallet config → Injected wallet: configures connectors
- Wallet config → Hardhat local EVM: sends RPC
- Payment UI → Mock tUSD: reads balance and allowance
- Payment UI → Mock tUSD: requests faucet and approval
- Payment UI → VaultPay escrow: creates, claims, cancels
- VaultPay escrow → Mock tUSD: escrows and transfers
- Mock tUSD → Hardhat local EVM: executes on
- VaultPay escrow → Hardhat local EVM: executes on