Humanode Docs
  • Quick Start
  • Overview
  • Concepts
    • Bioauth
    • Smart Contracts
    • Node
    • Validator
  • Chains
  • Help & Support
    • Troubleshooting
    • FAQ
    • Discord
  • Node
    • About
    • System Requirements
    • Setup
    • CLI
      • Dev Mode
    • JSON-RPC
    • Tools & Services
  • Humanode Launcher
    • About
    • Launcher Installation
    • Workspace Creation
      • Remote
      • Local
        • Linux / macOS
        • Windows
    • Node Installation
    • Node Configuration
    • Running the node
    • Stopping the node
  • Humanode Distribution
    • About
    • Preparation
    • Node Installation
      • Manual Installation
    • Running the node
  • Validators
    • About
    • Becoming a validator
    • Checking validator status
  • Tools & Services
    • Polkadot.js apps
    • Polkadot.js extension
      • Wallet Setup
    • EVM Playground
    • Subscan
    • Exchanges
    • Oracles
    • Testnet Faucets
    • Substrate API Sidecar
    • Humanode Truffle Box
    • Humanode Token Claim
  • Bioauth
    • About Bioauth
    • Enrolling
    • Authenticating
    • Robonode
  • EVM & Solidity Smart Contracts
    • EVM Compatibility
    • Precompiles
    • Architecture
    • HMND/eHMND swap
    • EVM Dev Mode & Keys
    • Sample contract: ERC20 token
    • EVM Playground
    • Humanode Truffle Box
Powered by GitBook
On this page
  1. EVM & Solidity Smart Contracts

Sample contract: ERC20 token

Here we showcase our test ERC20 token repo to demonstrate how one would develop a contract for Humanode Network.

PreviousEVM Dev Mode & Keys

Last updated 1 year ago

Take a look at the Test ERC20 repo on our Github.

It is a Hardhat-based codebase that uses OpenZepplin libraries to implement an ERC20 token contract.

This repo provides an example of how to:

  • set up your Hardhat environment to test/deploy a smart contract to the local dev Humanode Network node (the humanode-peer --dev command) and use the pre-funded dev EVM accounts (see humanode-peer evm inspect-account --dev);

  • set up your Hardhat environment to test/deploy a smart contract to the Humanode Testnet or Mainnet using a private key available read from the environment variable.

We will soon be adding an example of how to deploy a Humanode Network dev node in Github Actions to test smart contracts in CI (#soon).

Note that in most cases you don't need to test your smart contract against a real Humanode Network node and just use a Hardhat Network node (or Ganache, etc) because Humanode Network is EVM compatible, and any code that works with other EVM networks should also work with Humanode Network.

One sensible reason to test against the real Humanode Network is when you rely on the precompiles that are exclusively available at the Humanode Network.

LogoGitHub - humanode-network/test-erc20: A test ERC20 contractGitHub