TAC Proxy development currently requires Hardhat. Foundry support is planned
for a future release.
Installation
Install the TAC cross-chain library that provides all necessary components for proxy development:@tonappchain/evm-ccl
package includes:
- Base proxy contracts (
TacProxyV1
,TacProxyV1Upgradeable
) - Core data structures and interfaces
- Local testing SDK for development
- Cross-chain message utilities
Hardhat Environment Setup
Ensure your Hardhat project includes the necessary dependencies:package.json
hardhat.config.js
for TAC networks:
hardhat.config.js
Project Structure Setup
Create an organized project structure for proxy development:Create Contract Directory
Organize your contracts with clear separation between proxy and application logic:
Setup Testing Environment
Create a test directory with proper organization:
Configure Environment Variables
Create a
.env
file for sensitive configuration:.env
Never commit your
.env
file. Add it to your .gitignore
immediately.Verify Installation
Create a basic proxy contract to verify your setup:contracts/TestProxy.sol
If compilation succeeds, your environment is properly configured for TAC Proxy development.
Advanced Configuration Options
Custom Network Configuration
For specific deployment needs, configure additional network settings:TypeScript Configuration
For TypeScript projects, ensure proper type resolution:tsconfig.json
Local Testing Configuration
Configure the local test SDK for comprehensive testing:test/helpers/tacTestHelpers.js
Dependency Management
OpenZeppelin Integration
For upgradeable proxies, install OpenZeppelin upgradeable contracts:Testing Dependencies
Install additional testing utilities for comprehensive proxy testing:Common Setup Issues
Compilation Errors
Compilation Errors
Problem: Import resolution failures or compilation errorsSolutions:
- Ensure
@tonappchain/evm-ccl
is properly installed - Verify Solidity version compatibility (0.8.28+)
- Check import paths are correct
- Clean and rebuild:
npx hardhat clean && npx hardhat compile
Network Connection Issues
Network Connection Issues
Problem: Unable to connect to TAC networksSolutions:
- Verify RPC URLs are correct
- Check network configuration in hardhat.config.js
- Test connection manually:
curl https://spb.rpc.tac.build
- Ensure firewall allows outbound connections
Private Key Issues
Private Key Issues
Problem: Deployment fails with account/key errorsSolutions:
- Verify private key is in
.env
file - Ensure private key starts with
0x
if required by your configuration - Check that the account has sufficient TAC tokens for deployment
- Use different private key formats if needed
Next Steps
With your development environment configured, you’re ready to create your first TAC Proxy contract:Creating Proxy Contracts
Build basic and upgradeable proxy contracts with cross-chain functionality
Understanding Message Flow
Learn how cross-chain messages work and how to handle them
Keep your development environment up to date by regularly updating the
@tonappchain/evm-ccl
package as new features and improvements are released.