This guide will help you start building/modifying your EVM frontend with TAC SDK. You’ll learn how to set up the SDK and make your first cross-chain transaction that will trigger your solidity code deployed on TAC.

Installation

Install the TAC SDK using npm:

npm install tac-sdk

Basic Setup

Once you’ve installed the SDK, you can start building. Here’s a basic setup to get you started:

1

Import dependencies

import { TacSdk } from "tac-sdk";
import { TonConnectUI } from "@tonconnect/ui";
import { ethers } from "ethers";
2

Initialize TON Connect

const tonConnectUI = new TonConnectUI({
    manifestUrl: "YOUR_MANIFEST_URL"
});
3

Create a TAC SDK instance

const tacSdk = new TacSdk({
    network: "TESTNET" // Use "MAINNET" for production
});

Making Your First Cross-Chain Transaction

Here’s a simple example of making a cross-chain transaction:

// 1. Encode your parameters using ethers
const abi = new ethers.AbiCoder();
const encodedParameters = abi.encode(
    ['address', 'uint256'],
    [targetAddress, amount]
);

// 2. Set up transaction parameters
const params = {
    fromAddress: "YOUR_TON_ADDRESS",
    jettonAmount: 100,
    proxyMsg: {
        evmTargetAddress: "EVM_CONTRACT_ADDRESS",
        methodName: 'transfer(address,uint256)',
        encodedParameters: encodedParameters,
    },
    tokenAddress: "TON_TOKEN_ADDRESS",
    tonConnect: tonConnectUI
};

// 3. Send the transaction
await tacSdk.sendJettonWithProxyMsg(params);

API Endpoints

You can use these public endpoints for development:

Next Steps

Now that you’ve made your first cross-chain transaction, you can: