# Using Hardhat

{% hint style="info" %}
INFO

If you'd like to deploy to mainnet, you'll modify the command like so:

```
npx hardhat run scripts/deploy.ts --network race-mainnet
```

{% endhint %}

Regardless of the network you're deploying to, if you're deploying a new or modified contract, you'll need to verify it first.

***

## Verifying the Smart Contract[​](https://raceecosystem.gitbook.io/docs/guides/deploying-a-smart-contract/broken-reference) <a href="#verifying-the-smart-contract" id="verifying-the-smart-contract"></a>

If you want to interact with your contract on the block explorer, you, or someone, need to verify it first. The above contract has already been verified, so you should be able to view your version on a block explorer already. For the remainder of this guide, we'll walk through how to verify your contract on the RACE™ Goerli testnet.

In `hardhat.config.ts`, configure RACE™ Goerli as a custom network. Add the following to your `HardhatUserConfig`:

* RACEscan

<pre class="language-brightscript"><code class="lang-brightscript">etherscan: {
   apiKey: {
    "race-sepolia": "PLACEHOLDER_STRING"
   },
   customChains: [
     {
       network: "race-sepolia",
       chainId: 8900,
       urls: {
        apiURL: "https://testnet.racescan.io/api",
        browserURL: "
<strong>        https://testnet.racescan.io/"
</strong>       }
     }
   ]
 },
</code></pre>

{% hint style="info" %}
INFO

When verifying a contract with RACEscan on testnet (Sepolia), an API key is not required. You can leave the value as `PLACEHOLDER_STRING`.
{% endhint %}

```
npx hardhat verify --network race-sepolia <deployed address>
```

## Interacting with the Smart Contract[​](https://raceecosystem.gitbook.io/docs/guides/deploying-a-smart-contract/broken-reference) <a href="#interacting-with-the-smart-contract" id="interacting-with-the-smart-contract"></a>

If you verified on RACEscan, you can use the `Read Contract` and `Write Contract` tabs to interact with the deployed contract. You'll need to connect your wallet first, by clicking the Connect button.
