TAC Proxy contracts are Solidity contracts that can receive function calls from TON users. This guide walks you through creating your first basic proxy contract, explaining each concept as we build.
Regular smart contracts can only be called by users on the same blockchain. TAC Proxy contracts solve a different problem: they let TON users call your EVM functions directly.Without proxies:
TON user bridges tokens to TAC
User switches to MetaMask
User interacts with your dApp
User bridges tokens back to TON
With proxies:
TON user calls your function directly from TON wallet
✨ Everything else happens automatically
Think of proxy contracts as API endpoints that TON users can call with blockchain transactions instead of HTTP requests.
The crossChainLayer address is TAC’s infrastructure contract that will call your functions. You get this address from TAC documentation or contract addresses page.
Sometimes you want to send tokens back to the TON user. Use the OutMessageV1 structure:
Copy
Ask AI
import { TokenAmount, OutMessageV1 } from "@tonappchain/evm-ccl/contracts/core/Structs.sol";// Send back to TON user (no fees for RoundTrip messages)OutMessageV1 memory outMsg = OutMessageV1({ shardsKey: header.shardsKey, // Link to original operation tvmTarget: header.tvmCaller, // Send back to caller tvmPayload: "", // Must be empty - not supported tvmProtocolFee: 0, // 0 for RoundTrip - already paid on TON tvmExecutorFee: 0, // 0 for RoundTrip - already paid on TON tvmValidExecutors: new string[](0), // Empty for RoundTrip - already defined on TON toBridge: tokensToSend, // Tokens to send toBridgeNFT: new NFTAmount[](0) // No NFTs});_sendMessageV1(outMsg, 0);