Skip to main content
TAC EVM Layer provides full compatibility with Foundry, the blazing fast development toolkit for Ethereum.

Foundry

Official documentation

Installation & Setup

Foundry works seamlessly with TAC - no special configuration required beyond standard network setup.

Install Foundry

Install Foundry using the official installer:
Verify installation:

Initialize Project

Create a new Foundry project or initialize in existing directory:
This creates the standard Foundry structure:

Configure Networks

Update foundry.toml to include TAC networks:

Environment Setup

Never commit your private key to version control. Add .env to your .gitignore file.
Create a .env file for your private key:

Contract Development

Foundry excels at rapid iteration and testing. Develop contracts using familiar Solidity patterns with enhanced testing capabilities.

Basic Contract Example

Build & Compilation

Testing & Debugging

Foundry’s Solidity-based testing provides unmatched speed and power for smart contract testing.
Foundry’s fuzzing capabilities are excellent for testing edge cases in cross-chain scenarios.

Run Tests

Deployment

Deploy contracts efficiently using Foundry’s built-in deployment scripts and tools.

Deploy Commands

Ensure you have sufficient TAC tokens for gas fees before deploying to mainnet.

Cast Commands for TAC

Common Issues & Solutions

Problem: Compilation errors or dependency issuesSolutions:
  • Update Foundry: foundryup
  • Rebuild artifacts:
  • Reinstall dependencies: forge install --no-commit
  • Check Solidity version compatibility
Problem: Network timeouts or connection failuresSolutions:
  • Verify RPC URLs in foundry.toml
  • Use environment variables for RPC endpoints
  • Increase timeout settings