TrustlessTask now supports real Cardano blockchain transactions for:
- Milestone Approval & Fund Release - Client approves work and releases payment to freelancer
- On-chain Metadata - Transaction includes project and milestone details
- Blockfrost Integration - Submits transactions to Cardano testnet/mainnet
- Wallet Signing - Uses Nami, Lace, Eternl, or Flint to sign transactions
- User clicks "Approve & Release Funds"
- Frontend builds transaction using Lucid library
- Wallet prompts for signature (Nami/Lace/etc)
- Transaction submitted to Cardano blockchain via Blockfrost
- Transaction hash returned and stored in database
- Funds transferred from client to freelancer on-chain
Each transaction includes metadata (label 674):
{
"type": "milestone_payment",
"projectId": "project_123",
"milestoneId": 1,
"projectTitle": "Build Website",
"milestoneDescription": "Complete homepage design",
"timestamp": "2024-12-15T16:00:00Z"
}Install one of these browser extensions:
- Nami: https://namiwallet.io/
- Lace: https://www.lace.io/
- Eternl: https://eternl.io/
- Flint: https://flint-wallet.com/
Get free testnet ADA from the faucet:
- Visit: https://docs.cardano.org/cardano-testnet/tools/faucet/
- Enter your wallet address
- Request testnet ADA (free)
- Wait ~20 seconds for confirmation
Minimum Required: 2 ADA per transaction (1 ADA + fees)
Get a free API key:
- Visit: https://blockfrost.io
- Sign up for free account
- Create new project: Cardano Preprod Testnet
- Copy your project ID (starts with
preprod...)
Create frontend/.env:
VITE_BLOCKFROST_PROJECT_ID=preprodYourKeyHere
VITE_NETWORK=preprod
VITE_API_URL=http://localhost:8080/api/v1Create backend-api/.env:
BLOCKFROST_PROJECT_ID=preprodYourKeyHere
CARDANO_NETWORK=preprod# Terminal 1 - Backend
cd backend-api
npm run dev
# Terminal 2 - Frontend
cd frontend
npm run dev- Open http://localhost:3000
- Click "Connect Wallet"
- Select your wallet (Nami/Lace/etc)
- Approve the connection
- Verify your address displays
- Click "Create Project"
- Fill in project details:
- Title: "Test Project"
- Description: "Testing real blockchain transactions"
- Freelancer Address: (use another wallet address or same for testing)
- Milestone: 2,000,000 lovelace (2 ADA)
- Click "Create Project"
- Go to project detail page
- If you're the freelancer, click "Mark Complete"
- This updates the database (no blockchain transaction)
- As the client, click "Approve & Release Funds"
- Wallet will prompt for signature - Review the transaction:
- Amount: 2 ADA
- Recipient: Freelancer address
- Fee: ~0.17 ADA
- Click "Confirm" in wallet
- Wait for transaction to submit (~5 seconds)
- Success! Transaction hash displayed
- Copy the transaction hash
- Visit: https://preprod.cardanoscan.io/
- Paste transaction hash
- View transaction details:
- β Amount transferred
- β Metadata included
- β Confirmed on blockchain
Client Wallet (2 ADA)
β
[Build Transaction with Lucid]
β
[Sign with Wallet]
β
[Submit to Blockfrost API]
β
[Cardano Blockchain]
β
Freelancer Wallet (+2 ADA)
- β Actual ADA transferred on Cardano
- β Immutable transaction records
- β Verifiable on blockchain explorers
- β Project and milestone info on-chain
- β Timestamp and description
- β Searchable transaction history
- β Multiple wallet support
- β Secure signing process
- β Balance checking
- β Insufficient funds detection
- β Invalid API key warnings
- β Network error recovery
- β Fallback to simulated mode
Cause: Running in production build mode
Solution: Use development mode
cd frontend
npm run devCause: Wallet extension not detected or not connected
Solution:
- Install wallet extension
- Create/unlock wallet
- Click "Connect Wallet" in app
- Approve connection
Cause: Wallet has 0 ADA
Solution:
- Visit testnet faucet
- Request testnet ADA
- Wait for confirmation
- Refresh and try again
Cause: Blockfrost API key is invalid or missing
Solution:
- Get API key from https://blockfrost.io
- Add to
frontend/.env - Restart frontend server
Cause: Not enough ADA for transaction + fees
Solution:
- Need at least 2 ADA per transaction
- Request more from faucet
- Check wallet balance
Cause: Network congestion or invalid transaction
Solution:
- Check transaction on explorer
- Wait 2-3 minutes
- If still pending, try again
- Check Blockfrost status page
- ADA: Free from faucet
- Fees: ~0.17 ADA per transaction
- API: Free (Blockfrost)
- ADA: Purchase from exchange
- Fees: ~0.17 ADA per transaction
- API: Free tier available (Blockfrost)
- Wallet never shares private keys
- Transactions signed locally
- User approves each transaction
- Metadata is public (by design)
- Always verify transaction details before signing
- Check recipient address carefully
- Start with small amounts on testnet
- Keep wallet seed phrase secure
VITE_NETWORK=preprod
VITE_BLOCKFROST_PROJECT_ID=preprodYourKey- Free testnet ADA
- Safe for testing
- No real money
VITE_NETWORK=mainnet
VITE_BLOCKFROST_PROJECT_ID=mainnetYourKey- Real ADA required
- Real money transactions
- Use with caution
- β Milestone payment transactions
- β Metadata on-chain
- β Blockfrost submission
- π Escrow smart contracts (Plutus)
- π Multi-signature approvals
- π Automated dispute resolution
- π Staking rewards for arbiters
- π NFT certificates for completed projects
- Wallet installed and funded
- Blockfrost API key configured
- Development servers running
- Wallet connected to app
- Test project created
- Milestone completed
- Funds approved and released
- Transaction verified on explorer
- Freelancer received payment
Issues?
- Check browser console (F12) for detailed logs
- Review transaction on Cardano explorer
- Verify Blockfrost API key is valid
- Ensure wallet has sufficient funds
Resources:
- Blockfrost Docs: https://docs.blockfrost.io
- Cardano Docs: https://docs.cardano.org
- Lucid Docs: https://lucid.spacebudz.io
Status: β Real blockchain transactions fully implemented Network: Cardano Preprod Testnet Last Updated: December 15, 2024