- Problem: Contracts calling other contracts (e.g.,
contract-call? 'SP...arkadiko-dao) fail on testnet if those contracts don't exist - Current: We detect and warn about dependencies, but can't resolve them
- Production Solution:
- Dependency graph builder - identify all contracts that need migration
- Batch migration - migrate dependency tree in correct order
- Mock contract generator - create stub contracts for testing
- Mainnet fork simulation (like Foundry's anvil for EVM)
- Problem: Using seed phrase in
.envis insecure - Current: Server-side signing with environment variable
- Production Solution:
- Integrate Leather/Xverse wallet connect
- Client-side transaction signing
- Hardware wallet support (Ledger)
- Multi-sig support for team deployments
- Problem: Migrated contracts start with empty state
- Current: Side-by-side comparison + manual replication via Contract Explorer (call read functions on original, use values to call write functions on migrated)
- Production Solution:
- State snapshot export from original contract
- Init function generator based on contract analysis
- State replay engine - replay historical transactions
- Map bulk-initialization helper
- Principal address mapping (mainnet → testnet equivalents)
- Problem: Original contract may hold assets (STX, tokens, NFTs)
- Current: No interaction with original contract
- Production Solution:
- Dual-contract explorer (mainnet + testnet side by side)
- Asset inventory viewer (tokens, NFTs, STX balance)
- Migration plan for assets (requires owner action on mainnet)
- Pause/deprecation helper for original contract
- Redirect/proxy pattern implementation
- Problem: No safe path for contracts with real users/assets
- Current: Only testnet deployment
- Production Solution:
- Staged migration workflow:
- Deploy to testnet → Test
- Deploy to mainnet (new address)
- Migration period (both contracts active)
- Asset migration tools
- Original contract deprecation
- User notification system
- Liquidity migration helpers
- Staged migration workflow:
- Problem: Limited validation before deployment
- Current: Syntax validation only
- Production Solution:
- Unit test generation for migrated functions
- Invariant testing (state properties that should hold)
- Fuzzing support
- Integration test scaffolding
- CI/CD pipeline integration
- Problem: No record of migrations
- Current: One-shot migration, no history
- Production Solution:
- Migration history with timestamps
- Diff snapshots for each migration
- Rollback support (redeploy previous version)
- Git integration for contract versioning
- Team collaboration features
- Problem: Limited to mainnet→testnet flow
- Current: Hardcoded networks
- Production Solution:
- Custom network support (devnet, mocknet)
- Cross-network deployment
- Network-specific configurations
- Testnet faucet integration
| Feature | Current (Hackathon) | Production Ready |
|---|---|---|
| Migration Analysis | AI-powered | AI + Static analysis |
| Deployment | Testnet only | Any network |
| Wallet | Seed phrase | Wallet connect |
| Dependencies | Warning only | Auto-resolve |
| State | Compare only | Full replication |
| Testing | Manual | Automated suite |
| Security | Basic | Audit-grade |
| History | None | Full versioning |
- Seed phrase in environment - never use with real funds
- No transaction simulation - unexpected behavior possible
- No post-conditions - assets could be lost
- Server-side signing - key exposure risk
- Client-side signing only
- Hardware wallet support
- Transaction simulation mandatory
- Post-condition builder
- Audit trail logging
- Rate limiting and abuse prevention
- Wallet connect integration (Leather/Xverse)
- Remove seed phrase dependency
- Transaction simulation
- Dependency graph visualization
- Mock contract generator
- Batch migration support
- State export/import
- Init function generator
- Principal mapping
- Mainnet deployment support
- Migration history
- Team collaboration