# Truffle

Check out Truffle for [installation details](https://archive.trufflesuite.com/docs/truffle/quickstart/#install-truffle) and [an overview](https://archive.trufflesuite.com/docs/truffle/quickstart/).

### Truffle Configuration for Lycan[​](https://docs.gnosischain.com/developers/dev-environment/hardhat#config-hardhat-for-gnosis) <a href="#config-hardhat-for-gnosis" id="config-hardhat-for-gnosis"></a>

Update the configuration file with the changes shown below for Lycan Chain, providing examples for JavaScript.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const HDWalletProvider = require('@truffle/hdwallet-provider');
const fs = require('fs');
const mnemonic = fs.readFileSync(".secret").toString().trim();

module.exports = {
  networks: {
    lycan: {
      provider: () => new HDWalletProvider(mnemonic, "https://rpc.lycanchain.com"),
      network_id: '*',       // Lycan Chain's network id
      gas: 4500000,          // Gas limit
      gasPrice: 10000000000  // 10 Gwei
    },
  },
  compilers: {
    solc: {
      version: "0.8.4",      // Fetch exact version from solc-bin (default: truffle's version)
    }
  },
  // Set default mocha options here, use special reporters etc.
  mocha: {
    // timeout: 100000
  }
};

```

{% endtab %}
{% endtabs %}

Make sure you have the `HDWalletProvider` package installed by running:

```properties
npm install @truffle/hdwallet-provider
```

### Compile your contract[​](https://docs.gnosischain.com/developers/dev-environment/hardhat#compile-your-contract) <a href="#compile-your-contract" id="compile-your-contract"></a>

```properties
truffle compile
```

### Deploy your contract[​](https://docs.gnosischain.com/developers/dev-environment/hardhat#compile-your-contract) <a href="#compile-your-contract" id="compile-your-contract"></a>

```properties
truffle migrate
```

View your deployed contract on any of the [explorers](https://explorer.lycanchain.com/).


---

# 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.lycanchain.com/developers-integration/smart-contracts/develop-and-deploy/truffle.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.
