1. Onchain Components
Get started with TAC development in minutes
This guide will help you deploying your Solidity code on the TAC EVM. You can then invoke this code on TON side with the TAC SDK. Here you will learn on how to connect directly to the TAC EVM with an EVM wallet and deploy your solidity code.
View the Network Details for more information about the TAC EVM.
Environment Setup
To be able to deploy solidity code on TAC you will need to create and configure an EVM wallet like Rabby and then install and configure an EVM toolkit like Foundry or HardHat.
In this guide, we will use Foundry as our EVM toolkit. Foundry is a smart contract development toolkit for EVM chains. Start by installing Foundry with the following command:
Next, run the following commands to create a new Foundry project:
The folder structure should look like this:
In the src
folder, create a new Solidity file, for example MyContract.sol
:
And write your smart contract code in MyContract.sol
. To compile the contract, run the following command:
Get TAC Testnet Gastokens
You will need to load some TAC Testnet tokens to pay TAC gasfees to deploy a solidity contract on TAC EVM.
To get some testnet tokens, please visit the Turin Faucet (Coming Soon - later this week)
Deploy TON Jettons First (if needed)
If your application requires tokens, you must first deploy your Jettons on TON since Telegram guidelines require all tokens to be native to TON.
Get Testnet TON
Before deploying Jettons, you’ll need testnet TON tokens:
- Visit the TON testnet faucet
- Enter your TON wallet address
- Complete the verification to receive testnet TON
Deploy Jetton Contract
You have two options to deploy a Jetton on TON:
Option 1: Deploy Jetton Contract
If you’re familiar with FunC, you can deploy a Jetton contract directly. Create a new file jetton.fc:
Option 2: Using TypeScript SDK
For most developers, using the TypeScript SDK is easier. Create a new project:
create deploy.ts
with the following content:
To deploy:
Make sure to:
- Replace the mnemonic with your actual wallet words
- Have sufficient testnet TON from the faucet
- Save the deployed Jetton address - you’ll need it for TAC integration
Deploying Solidity Code
To deploy your contract on to the TAC network, run the following forge create command.
Make sure to replace TAC_RPC_URL
with the actual RPC URL of the TAC network
and YOUR_PRIVATE_KEY
with your actual private key.
Once the transaction is confirmed, you will see the contract address in the terminal. You can verify the contract on the Turin Block Explorer
Next Steps
Now that you’ve deployed solidity code on TAC, you need to build/modify a frontend or a Telegram Mini APP (TMA) that will interact with the solidity code you just deployed.