Zayn Network
  • β˜•Overview
  • ⚑Quick Start
  • πŸͺœRoadmap
  • πŸ§‘β€πŸ’»Developers' Onboarding Checklist
  • The Zayn Network Stack
    • 🀝Settlement on Ethereum
    • 🀝Settlement on Bitcoin
    • πŸ₯ˆDual Data Availability
    • πŸ‘¨β€πŸ”§Generating ZK Proofs
    • 🀜EVM Compatibility
    • AI-Powered SLS
  • Research Areas
    • πŸ“œZK Roll up on Bitcoin
      • ⛏️Merged Mining
      • πŸ”PoS / Economic Security
      • πŸ—žοΈZK Rollups
      • πŸ—žοΈSovereign Rollups
    • πŸŒ‰Trustless Bridging
      • πŸŒ•Over-collateralized zBTC
      • πŸŽ†Federated Bridging
      • πŸ’°Economic Security
  • Tools
    • 🚰Testnet Faucets
    • πŸ–₯️RPC
    • πŸ“ŸMultisig Wallets
    • πŸ•ΈοΈBlock Explorers
    • ⌨️Data Indexers
    • πŸ§™β€β™‚οΈOracles
    • πŸŒ‰Bridges
  • Build On Zayn
    • 🐣Hello World
    • πŸ™ŒDeploying Smart Contracts
      • πŸͺ–Hardhat
      • 🟣ThirdWeb
      • πŸ“–Foundry
    • βœ…Verify Your Smart Contracts
Powered by GitBook
On this page
  1. Build On Zayn
  2. Deploying Smart Contracts

Hardhat

Introduction to Hardhat

Hardhat is a flexible Ethereum development environment. It is designed for developers who need robust tools to write, test, deploy, and debug their Ethereum software. Hardhat works well with Zayn Network by integrating with its Ethereum-compatible features.

Steps to Deploy Using Hardhat

  1. Set Up Your Hardhat Project:

    • Install Hardhat using npm:

      bashCopy codenpm install --save-dev hardhat
    • Initialize a new Hardhat project:

      bashCopy codenpx hardhat
  2. Configure Hardhat for Zayn Network:

    • Modify the hardhat.config.js to include Zayn Network’s RPC details:

      javascriptCopy codemodule.exports = {
        networks: {
          zayn: {
            url: "https://rpc.zayn.network",
            accounts: ['your-private-key']
          }
        },
        solidity: "0.8.4",
      };
  3. Write Your Smart Contract:

    • Create a new contract in the contracts folder, for example, MyContract.sol.

  4. Compile Your Smart Contract:

    • Run the following command:

      bashCopy codenpx hardhat compile
  5. Deploy Your Smart Contract:

    • Create a deploy script under the scripts folder.

    • Run the deployment script:

      bashCopy codenpx hardhat run scripts/deploy.js --network zayn
PreviousDeploying Smart ContractsNextThirdWeb

Last updated 1 year ago

πŸ™Œ
πŸͺ–