Smart Contract Integration
Overview
┌─────────────────────────────────────────────────────────────────┐
│ Payment Flow (V4) │
│ │
│ 1. Compute Address ──→ 2. Customer Pays ──→ 3. Process Payment │
│ │ │
│ ▼ │
│ 4. Callback to Your │
│ Contract (optional)│
└─────────────────────────────────────────────────────────────────┘The onPaymentReceived Callback
onPaymentReceived CallbackInterface
When Is It Called?
Callback Data
Real-World Example: Gas Tank Deposits
How It Works
GasTank Implementation
Key Security Pattern
Use Case Examples
1. Automated Subscription Service
2. NFT Minting on Payment
3. Escrow Release
4. DAO Treasury Deposits
CREATE2 Deterministic Addresses
How Address Computation Works
Why This Matters
Computing Addresses Off-Chain
V4 Contract Reference
PaymentWalletFactoryV4
computeAddress()
computeAddress()process()
process()processNoFee()
processNoFee()getWalletStatus()
getWalletStatus()PaymentWalletV4
execute()
execute()Security Considerations
1. Always Verify the Caller
2. Handle Reentrancy
3. Validate Token Address
4. Callback Failures Revert Everything
Integration Checklist
Deployed Contract Addresses
MakaChain Mainnet (Chain ID: 777178)
Contract
Address
Other Chains
Need Help?
Last updated
