StratoVM
  • StratoVM: defi-focused modular L2 on bitcoin
    • Introduction
  • Stratovm
    • Summary
    • Native Yield
    • Architecture
    • DeFi Applications and Use Cases
    • StratoVM Ecosystem Fund
    • $SVM Token
    • Roadmap
  • StratoVM SDK
    • Getting Started
      • Addresses
      • Testnet Setup
      • Deploying Your First Contract on StratoVM Sepolia
    • Data Indexers
    • Clients
      • ethers.js
      • Viem
      • Web3.js
    • Toolkits
      • Foundry
      • Hardhat
    • Bridges
      • Testnet StratoVM Bridge
  • Node Operations
    • Architecture
    • Running a Node from a Docker
    • Node License
      • Pricing & Purchasing
      • Whitelist
      • Node Rewards
      • Node Sale FAQ
  • Protocol
    • Brand Asssets
    • Terms and Conditions
    • Service Agreement
    • Privacy Policy
    • Disclaimer
Powered by GitBook
On this page
  • Using Hardhat for StratoVM Development
  • Configuring Hardhat for StratoVM
  • Your Smart Contracts on Superseed Testnet
  1. StratoVM SDK
  2. Toolkits

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.

PreviousFoundryNextBridges

Last updated 9 months ago