Hardhat

Using Hardhat for StratoVM Development

Hardhat is recognised for being flexible, extensible and fast in the Ethereum smart contract development.

Configuring Hardhat for StratoVM

To prepare Hardhat for deployment on the StratoVM networks, make the necessary adjustments to your hardhat.config.ts:

import { HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-ethers"; 
const config: HardhatUserConfig = {  networks: {       
/* For StratoVM Sepolia Testnet "stratovm-sepolia": 
{ url: "https://rpc.stratovm.io",  
    accounts: [process.env.PRIVATE_KEY as string],
    gasPrice: 1000000000,},    

// For local development environment    "stratovm-local": 
    {  url: "http://localhost:8545",      
    accounts: [process.env.PRIVATE_KEY as string],      
    gasPrice: 1000000000,    },  },  
    defaultNetwork: "stratovm-local",}; 
    
    export default config; */

Your Smart Contracts on Superseed Testnet

Deployment

Use Hardhat's deployment scripts, specifying the network:

npx hardhat run scripts/deploy.ts --network stratovm-sepolia

Verification

After deploying, verify your smart contract using Hardhat's built-in verification tool:

npx hardhat verify --network stratovm-sepolia DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1"

💬

Remember to replace DEPLOYED_CONTRACT_ADDRESS and "Constructor argument 1" with the actual address of your deployed contract and any necessary constructor parameters.

The provided configurations and commands are aimed at offering a simple start-up process for developers working with Hardhat on the StratoVM blockchain. Adjustments may be needed based on specific contract requirements or network preferences.

Last updated