> For the complete documentation index, see [llms.txt](https://docs.pivotalchain.io/pivotal-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pivotalchain.io/pivotal-docs/pivotalchain-tools/toolchains/hardhat.md).

# Hardhat

## Hardhat

Hardhat is an Ethereum development environment for flexible, extensible, and fast smart contract development.

You can use Hardhat to edit, compile, debug, and deploy your smart contracts to Pivotal.

***

## Using Hardhat with Pivotal

To configure [Hardhat](https://hardhat.org/) to deploy smart contracts to Pivotal, update your project’s `hardhat.config.ts` file by adding Pivotal as a network:

```
networks: {
   // for mainnet
   "pivotal-mainnet": {
     url: 'https://mainnet.thepivotal.xyz',
     accounts: [process.env.PRIVATE_KEY as string],
     gasPrice: 1000000000,
   },
   // for Sepolia testnet
   "pivotal-sepolia": {
     url: "https://sepolia.thepivotal.xyz",
     accounts: [process.env.PRIVATE_KEY as string],
     gasPrice: 1000000000,
   },
   // for local dev environment
   "pivotal-local": {
     url: "http://localhost:8545",
     accounts: [process.env.PRIVATE_KEY as string],
     gasPrice: 1000000000,
   },
 },
 defaultNetwork: "pivotal-local",
```

{% hint style="info" %}
For a complete guide on using Hardhat to deploy contracts on Pivotal, see [Deploying a Smart Contract.](/pivotal-docs/build-on-pivotalchain/pivotal-contracts.md)
{% endhint %}
