Getting Started
A quick guide to getting started with developing on Harmony blockchain.
Overview
Harmony is a powerful blockchain that is EVM compatible with sharding and staking features. Developing on Harmony should feel very familiar for Ethereum developers, as Harmony is fully Ethereum compatible and inherits almost all the tools and libraries from Ethereum, like truffle, remix, web3js, etc.
The simplest way to interact with Harmony blockchain is via JSON RPCs.
Querying Harmony blockchain using JSON RPCs
To really explore the full potential of Harmony blockchain, creating a wallet is the next step.
Creating a wallet (or ONE address)
Using MetaMask or mathwallet browser extensions. Any other wallets can also be used.
Harmony CLI, also provides a quick way to create/manage wallet, interact with blockchain, etc.
Harmony uses bech32 address format with one1
prefix, however Ethereum style hex address can also be used. For example: one1pdv9lrdwl0rg5vglh4xtyrv3wjk3wsqket7zxy
bech32 address is equivalent to 0x0B585F8DaEfBC68a311FbD4cB20d9174aD174016
hex address. Quick way to convert between formats is using explorer: https://explorer.harmony.one/#/address/one1pdv9lrdwl0rg5vglh4xtyrv3wjk3wsqket7zxy, at the top you will find "ONE / ETH address" options.
Development environments
Several development environments exists: mainnet, testnnet, localnet
Testnet faucet
Blockchain Explorers
Mainnet: https://explorer.harmony.one
Testnet: https://explorer.testnet.harmony.one
We provide SDKs in several different languages. However most feature complete is our JavaScript SDK, which is the preferred language for DApp development.
Feel free to ping any POPS member for issues on the testnet network/explorer/faucet on harmony discord @harmony-pops or telegram P-OPS Team Validator Faucet can also be refilled by anyone by sending fund back to the contract address shown on https://faucet.pops.one
Using SDKs to interact with Harmony blockchain
About SDKs
The most popular is our JavaScript SDK, which includes examples, documentation, and DApps developed in previous hackathons
Other SDKs include: Golang CLI, Java SDK, Python SDK
Note that, the Python SDK has only read-only features, meaning no transaction signing or smart contracts
How to deploy a smart contract on Harmony?
How to create a simple DApp on Harmony?
One of the best ways to get started is to use scaffold-eth which now has integrated Harmony support.
You can also use the Harmony DApp template generator to get started.
Many other examples and DApps can be found in the SDK repo and under showcases.
Resources
talk.harmony.one - for reporting issues, asking questions, or interact with other developers
Harmony GitHub
Harmony dev Reddit
Discord channels: #developers, #development
Harmony dev Telegram
Known Limitations
Only cross-shard native token (ONE token) transfers are allowed. No cross-shard for HRC20 or other contracts. Meaning, smart contracts are deployed on shard-0 and all contract interactions happen on shard-0. Contracts can still be deployed on other shards, however they won't be able to interact with contracts in other shards. We have cross-shard smart contract on our roadmap for 2023.
Last updated