Account abstraction for TAC enabling programmable wallets and advanced transaction patterns
Smart accounts (account abstraction) enable programmable wallet logic on TAC, allowing developers to create accounts with custom execution rules, gas payment mechanisms, and transaction batching capabilities. TAC provides a shared factory that all developers can use, creating one smart account per user per proxy for seamless cross-chain interactions.
Contract Addresses: Find the latest TacSAFactory and TacSmartAccount
addresses for both testnet and mainnet on the Contract
Addresses page.
Calculate smart account addresses before transactions for encoding in arguments:
Copy
Ask AI
// Get the smart account address for a specific user and proxyconst smartAccountAddress = await tacSAFactory.getSmartAccountForApplication( tvmWalletCaller, // TON wallet address in EQ format (e.g., "EQAbc123...") proxyAddress // Address of your proxy contract);// Use this address in your transaction argumentsconst encodedArguments = ethers.AbiCoder.defaultAbiCoder().encode( ["address", "bytes", "uint256"], [smartAccountAddress, callData, value]);
import { SaHooksBuilder } from "@tonappchain/sdk";// Create hooks for a complex DeFi operationconst hooksBuilder = new SaHooksBuilder() .addContractInterface(tokenAddress, tokenABI) .addContractInterface(dexAddress, dexABI) // Pre-hook: Approve tokens from smart account .addPreHookCallFromSA(tokenAddress, "approve", [dexAddress, amount]) // Main call: Execute swap from proxy perspective .setMainCallHookCallFromSelf(dexAddress, "swapTokens", [ tokenIn, tokenOut, amount, minAmountOut, ]) // Post-hook: Check balance from smart account .addPostHookCallFromSA(tokenAddress, "balanceOf", [smartAccountAddress]);const encodedHooks = hooksBuilder.encode();
System Control: The smart account abstraction system is currently under
the control of a multisig account managed by the TAC team. This ensures
coordinated upgrades and security oversight during the protocol’s early
phases.