> For the complete documentation index, see [llms.txt](https://medeber-engineers.gitbook.io/https-www.abogida.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://medeber-engineers.gitbook.io/https-www.abogida.network/tutorials/deploying-a-contract.md).

# Deploying a Contract

Tutorials

In general, you can choose almost any development environment you wish as they all have their own benefits. A few of the most used environments are shown below. Using the [official ethereum documentation](https://ethereum.org/en/developers/tutorials/hello-world-smart-contract/), you can change the network to Abogida and deploy a Hello World contract.

#### Hardhat Deployment <a href="#hardhat-deployment" id="hardhat-deployment"></a>

Following the [Official Hardhat documentation](https://hardhat.org/hardhat-runner/docs/guides/project-setup), also how to configure Hardhat to ABOGIDA.

* For ABOGIDA network Config, you have to export an object from `hardhat.config.js`
* The `networks` config field an optional object where network names map to their configuration.
* There are two kinds of networks in Hardhat: [JSON-RPC](https://eth.wiki/json-rpc/API) based networks, and the built-in Hardhat Network.
* You can customize which network is used by default when running Hardhat by setting the config's `defaultNetwork` field. If you omit this config, its default value is `"hardhat"`.

#### Truffle Deployment <a href="#truffle-deployment" id="truffle-deployment"></a>

[This Tutorial on Kauri](https://kauri.io/#collections/POA%20Tutorial%20series/poa-part-1-develop-and-deploy-a-smart-contract/) shows how to deploy a DApp to the test network. It can be adapted to the Abogida network with a few minor tweaks.

1. For Abogida, edit the truffle.js file to the following:

```
require('dotenv').config();
const HDWalletProvider = require('truffle-hdwallet-provider');

module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// for more about customizing your Truffle configuration!
    networks: {
        abogida: {
            provider: function() {
                    return new HDWalletProvider(
                process.env.MNEMONIC,
                "https://rpc.abogida.network")
            },
            network_id: 100,
            gas: 500000,
            gasPrice: 1000000000
        },
        development: {
            host: "127.0.0.1",
            port: 8545,
            network_id: "*" // Match any network id
        }
    }
};
```

2. &#x20;Run the Truffle deployment to ABOGIDA.

```
truffle migrate --network abogida
```
