# 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/).
