> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tac.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Hardhat

> Deploy, test, and verify Solidity contracts on TAC using Hardhat - the complete development environment

> [card] [Hardhat](https://hardhat.org/docs/getting-started)
>
> Official documentation

TAC EVM Layer provides full compatibility with Hardhat, Ethereum's most popular development framework. Deploy your existing Solidity contracts without modification, test, and verify contracts on the [Block Explorer](https://docs.tac.build/explorer/overview.md).

## Installation & Setup

Setting up Hardhat for TAC development requires no special configuration - it works exactly like any other EVM chain.

Refer to our example app [create-tac-app](https://docs.tac.build/quickstart/overview.md) to see the relevant hardhat deployment approach.

## Deployment

Below you can find the deployment commands used within [create-tac-app](https://docs.tac.build/quickstart/overview.md)

> [!WARNING]
>
> Ensure you have sufficient TAC tokens for gas fees before deploying to mainnet.

> [tab] Testnet Deployment
>
> ```bash theme={null}
> # Deploy to TAC Saint Petersburg Testnet
> npx hardhat run scripts/deploy.ts --network tacTestnet
> ```

> [tab] Mainnet Deployment
>
> ```bash theme={null}
> # Deploy to TAC Mainnet (production)
> npx hardhat run scripts/deploy.ts --network tacMainnet
> ```

## Common Issues & Solutions

> [accordion] Connection Issues
>
> **Problem**: RPC connection failures or timeouts
>
> **Solutions**:
>
> * Verify RPC URLs are correct
> * Increase timeout in network configuration
>
> ```javascript theme={null}
> networks: {
>     tacTestnet: {
>         url: "https://rpc-public-spb.tac.build",
>         timeout: 60000, // Increase timeout
>     }
> }
> ```
>
> * Try alternative RPC endpoints if available


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.