npm install
cp .env.example .envAdd your credentials to .env:
VITE_PRIVY_APP_ID=your-privy-app-id
VITE_PRIVY_CLIENT_ID=your-privy-client-id
npm run devOpen http://localhost:5173 and click "Connect Wallet" to see login options (Google, Email, Passkey).
src/components/VeChainKitProvider.tsx- VeChain Kit + Privy configurationsrc/main.tsx- Provider wrapper
npm run test:contractsRuns 15 tests covering deployment, swapping, slippage protection, and access control.
npm run compilenpx hardhat run scripts/deploy.cjs --network vechain_testnetcontracts/B3TRVetSwapper.sol- Main swap contract with ReentrancyGuardtest/B3TRVetSwapper.test.cjs- Test suite
| Contract | Address |
|---|---|
| VeRocket Router | 0x576da7124C7bB65a692d95848276367e5a844d95 |
| B3TR Token | 0x5ef79995FE8a89e0812330E4378eB2660ceDe699 |
The B3TR swap is integrated into the UI via:
src/services/b3trSwap.ts- Contract ABI and helperssrc/hooks/useB3TRSwap.ts- React hook for swap transactionssrc/App.tsx- "B3TR to VET Swap" UI section