Using Hardhat
Deploying a Smart Contract using Hardhat
INFO
If you'd like to deploy to mainnet, you'll modify the command like so:
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
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
INFO
When verifying a contract with RACEscan on testnet (Sepolia), an API key is not required. You can leave the value as PLACEHOLDER_STRING
.
Interacting with the Smart Contract
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.
Last updated