Installation & Setup
Setting up Hardhat for TAC development requires no special configuration - it works exactly like any other EVM chain.Initialize Project
Create a new Hardhat project or navigate to your existing project:Select “Create a JavaScript project” or “Create a TypeScript project” based on your preference.
Install Dependencies
Install essential dependencies for TAC development:
Core dependencies
Configure Networks
Update
hardhat.config.js
to include TAC networks:hardhat.config.js
Environment Setup
Create a
.env
file for your private key:Never commit your private key to version control. Add
.env
to your .gitignore
file.Contract Development
Develop contracts for TAC exactly as you would for Ethereum - full Solidity compatibility is maintained.Basic Contract Example
TAC Cross-Chain Proxy Contract
For contracts that need to receive messages from TON, inherit from the TAC proxy base:Testing
Local Testing
Run Tests
Deployment
Deploy contracts to TAC using standard Hardhat deployment scripts.Deployment Script
Deploy Commands
- Testnet Deployment
- Mainnet Deployment
Advanced Configuration
Gas Optimization
Multiple Environment Setup
Common Issues & Solutions
Connection Issues
Connection Issues
Problem: RPC connection failures or timeoutsSolutions:
- Verify RPC URLs are correct
- Check network connectivity
- Increase timeout in network configuration
- Try alternative RPC endpoints if available
Gas Estimation Failures
Gas Estimation Failures
Problem: Gas estimation fails for complex transactionsSolutions:
- Set manual gas limit in deployment scripts
- Use gas reporter for optimization
- Test with smaller contract chunks