# Build Tools

You can use Kinto with all your favorite build tools:

* [<mark style="color:purple;">Foundry</mark>](#foundry)
* [<mark style="color:purple;">Hardhat</mark>](#hardhat)
* [<mark style="color:purple;">Truffle</mark>](#truffle)

{% hint style="info" %}
For a complete guide on deploying contracts on Kinto, see our [development guide](https://github.com/KintoXYZ/docs-kinto/blob/main/building-on-kinto/tools/broken-reference/README.md).
{% endhint %}

## Foundry

Foundry is a smart contract development toolchain.

With Foundry you can manage your dependencies, compile your project, run tests, deploy smart contracts, and interact with the chain from the command-line and via Solidity scripts.

Check out the [<mark style="color:purple;">Foundry Book</mark>](https://book.getfoundry.sh/) to get started with using Foundry with Kinto.

***

### Using Foundry with Kinto

Foundry supports Kinto out of the box. To install Foundry, you can just follow the instructions [<mark style="color:purple;">here</mark>](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/getting-started#foundry).

Provide the Kinto RPC URL and Chain ID when deploying and verifying your contracts.

#### Deploying a smart contract[​](https://docs.base.org/tools/foundry#deploying-a-smart-contract) <a href="#deploying-a-smart-contract" id="deploying-a-smart-contract"></a>

```
forge create ... --rpc-url=$KINTO_RPC_URL
```

#### Verifying a smart contract[​](https://docs.base.org/tools/foundry#verifying-a-smart-contract) <a href="#verifying-a-smart-contract" id="verifying-a-smart-contract"></a>

```
//Example of contract verification in our blockscout
  
  forge verify-contract 
    0xdb791AF345A21588957E4e45596411b2Be2BD4cd 
    src/sample/Counter.sol:Counter 
    --verifier-url https://explorer.kinto.xyz/api  
    --verifier blockscout

```

***

## Hardhat

Hardhat is a development environment for extensible and rapid smart contract development.

You can use Hardhat to modify, build, debug, and deploy your smart contracts to Kinto.

To setup Hardhat, follow the instructions [<mark style="color:purple;">here</mark>](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/getting-started#hardhat).

Now, access a hardhat terminal:

```
yarn
yarn hardhat console --network kinto
```

***

### Using Hardhat with Kinto

To configure [<mark style="color:purple;">Hardhat</mark>](https://hardhat.org/) to deploy smart contracts to Kinto, update your project’s `hardhat.config.ts` file by adding Kinto as a network:

But make sure that your *<mark style="color:orange;">hardhat.config.js</mark>* includes the kinto network

```javascript
module.exports = {
  solidity: "0.8.13",
  networks: {
    "kinto": {
      url: "https://kinto-mainnet.calderachain.xyz/http",
      accounts: ['youraccountprivatekeygoeshere'],
      gas: 10000000
   },
  }
};
```

***

## Truffle

Truffle is a comprehensive suite of tools for smart contract development.

Truffle can quickly build, test, debug, and deploy your smart contracts to Kinto.

***

### Using Truffle with Kinto

To configure [<mark style="color:purple;">Truffle</mark>](https://trufflesuite.com/docs/truffle/) to deploy smart contracts to Kinto:

1. Install Truffle by running the following command:

   ```
   npm install -g truffle
   ```
2. Create a new Truffle project by running the following command:

   ```
   truffle init
   ```
3. Update your project's `truffle-config.js` file by adding Kinto as a network:

   ```
   const HDWalletProvider = require('@truffle/hdwallet-provider');

   module.exports = {
     networks: {
       'kinto': {
         provider: function () {
           return new HDWalletProvider('MNEMONIC', 'https://kinto-mainnet.calderachain.xyz/http
   ');
         },
       },
     },
   };
   ```
4. Compile and deploy your smart contract by running the following command:

   ```
   truffle migrate --network kinto
   ```


---

# 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.kinto.xyz/kinto-the-modular-exchange/building-on-kinto/tools/build-tools.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.
