Humanode Docs
Search
K
Comment on page

Sample contract: ERC20 token

Here we showcase our test ERC20 token repo to demonstrate how one would develop a contract for Humanode Network.
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.