# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pivotalchain.io/pivotal-docs/pivotalchain-tools/toolchains/hardhat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
