# Solidity Typescript Hardhat

It can be found on the following link

{% embed url="<https://github.com/protokol/solidity-typescript-hardhat-template>" %}

## Hardhat Configuration

* typescript support enabled
* typechain plugin installed (typescript type bindings are generated from smart contracts)/check Typechain docs
* hardhat-deploy plugin enabled (use deployments from `deploy` folder, order and tag them; multi-network)
* hardhat console enabled - to allow console.log usage within solidity code
* testing environment configured and operational

Check the Hardhat documentation for more information.

{% embed url="<https://hardhat.org/getting-started/>" %}

We recommend installing `hh autocomplete` so you can use `hh` shorthand globally.

`npm i -g hardhat-shorthand`

{% embed url="<https://hardhat.org/guides/shorthand.html>" %}

## Usage

Run `npm install` and then:

* `hh compile` - to compile smart contract and generate typechain ts bindings
* `hh test` - to run tests
* `hh deploy` - to deploy to local network (see options for more)
* `hh TABTAB` - to use autocomplete
* `hh node` - to run a localhost node

Check `package.json` scripts for more options. Use `.env.example` file and adapt it to you values and settings.


---

# 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.protokol.com/developers/protokol-templates/solidity-typescript-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.
