Deploy HRC20
This section describes how to deploy a HRC20 smart contract on Harmony in 1-minute.
Last updated
Was this helpful?
This section describes how to deploy a HRC20 smart contract on Harmony in 1-minute.
Last updated
Was this helpful?
Was this helpful?
npm install -g [email protected]
git clone https://github.com/harmony-one/H20.git
cd H20
cp .envSample .env
npm install
truffle compile
truffle migrate --network testnet --reset
truffle networkstruffle console --network testnet
truffle(testnet)> HarmonyERC20.deployed().then(function(instance){myHRC20=instance})
undefined
truffle(testnet)> myHRC20.symbol()
'H20'
truffle(testnet)> myHRC20.name()
'HarmonyERC20'
truffle(testnet)> myHRC20.decimals()
BN { negative: 0, words: [ 18, <1 empty item> ], length: 1, red: null }
truffle(testnet)> myHRC20.totalSupply()
BN {
negative: 0,
words: [ 16777216, 62077800, 20718012, 3, <1 empty item> ],
length: 4,
red: null
}