EVM → TON Migration
Migrate Solidity contracts to TON-native equivalents with architecture mapping, gap detection, and automated validation.
How It Works
The migration engine follows a five-stage pipeline:
- 1Parse — Analyze Solidity source, extract contract structure, storage layout, and function signatures.
- 2Map — Match EVM patterns to TON equivalents (e.g., ERC-20 → Jetton, mapping → child contracts).
- 3Generate — Produce Tact or FunC source code following TON best practices and TEP standards.
- 4Validate — Compile the generated code and verify structural correctness.
- 5Audit — Run the full security scanner on the generated contracts to catch any issues.
Supported Migrations
ERC-20 → Jetton
Fungible token standard. Maps balanceOf → get_wallet_data, transfer → internal message with op::transfer.
ERC-721 → NFT (TEP-62)
Non-fungible tokens. Converts to collection + item pattern with on-chain metadata per TEP-64.
ERC-1155 → SBT (TEP-85)
Multi-token standard maps to soulbound tokens where transferability is restricted by design.
ERC-4626 → Vault
Tokenized vault standard. Converts deposit/withdraw patterns to TON message-based flows.
Governor → DAO
Governance contracts. Maps propose/vote/execute to TON DAO patterns with on-chain voting.
Multisig → Multisig
Multi-signature wallets. Converts to TON-native multisig with order-based confirmation flow.
Usage
# Migrate a single Solidity file ton-dev migrate ./contracts/MyToken.sol # Migrate to FunC instead of Tact ton-dev migrate ./contracts/MyToken.sol --lang func # Migrate a directory with report ton-dev migrate ./contracts/ --output ./ton-contracts/ --report
EVM Patterns Removed During Migration
These Solidity patterns have no equivalent in TON and are intentionally removed or replaced:
approve / transferFrom
TON uses direct transfers via internal messages. No allowance pattern needed — the owner sends a transfer message to their wallet contract.
Unlimited allowances
No equivalent in TON. Each transfer is explicitly authorized by the owner.
ERC-165 supportsInterface
TON uses get-methods for interface discovery. TEP standards define specific get-methods.
Reentrancy guards
TON's actor model processes messages sequentially. Cross-contract calls are asynchronous, eliminating same-transaction reentrancy.
Block-based timing
Replaced with unix timestamp from block headers. TON blocks are faster and more predictable.
Global storage (mapping)
TON uses a sharded architecture. Data is stored in individual contract instances (e.g., one wallet contract per jetton holder).
Sample Migration Report
┌──────────────────────────────────────────────────────────┐ │ TON Dev Skills — Migration Report │ │ Source: MyToken.sol (ERC-20) │ │ Target: Tact (Jetton) │ ├──────────────────────────────────────────────────────────┤ │ │ │ Pattern Detection │ │ ├── ERC-20 standard ✅ Detected │ │ ├── Ownable ✅ Detected │ │ ├── approve/transferFrom 🔄 Removed (not needed) │ │ └── Reentrancy guard 🔄 Removed (actor model) │ │ │ │ Generated Files │ │ ├── JettonMinter.tact ✅ Compiled │ │ ├── JettonWallet.tact ✅ Compiled │ │ └── deploy.ts ✅ Generated │ │ │ │ TEP Compliance │ │ ├── TEP-74 (Jetton Standard) ✅ Compliant │ │ └── TEP-64 (Token Metadata) ✅ Compliant │ │ │ │ Security Audit │ │ ├── Critical: 0 │ │ ├── High: 0 │ │ ├── Medium: 0 │ │ └── Info: 2 │ │ │ │ Verdict: PASS ✅ │ │ Confidence: 94% │ └──────────────────────────────────────────────────────────┘
