Skip to main content
The Contract ERC-20 plugin calls standard EIP-20 methods on a contract already deployed on Hedera. Deploy or import the contract first with the Contract plugin.

Most Used Commands

Read token metadata and an account balance
hcli contract-erc20 name --contract my-token
hcli contract-erc20 decimals --contract my-token
hcli contract-erc20 balance-of --contract my-token --account alice
Transfer and approve (state-changing, signed by the operator)
hcli contract-erc20 transfer --contract my-token --to bob --value 1000000
hcli contract-erc20 approve --contract my-token --spender bob --value 500000

Full Command Reference

Commands use the contract-erc20 namespace (for example hcli contract-erc20 name). --contract / -c accepts a local alias, Hedera contract ID (0.0.xxx), or EVM address (0x…) where the manifest says so.
Call name() on the ERC-20 contract (read-only).
-c, --contract
string
required
Smart contract ID or local alias.
Example
hcli contract-erc20 name --contract my-token
Call symbol() (read-only).
-c, --contract
string
required
Smart contract ID or local alias.
Example
hcli contract-erc20 symbol --contract my-token
Call decimals() (read-only).
-c, --contract
string
required
Smart contract ID or local alias.
Example
hcli contract-erc20 decimals --contract my-token
Call totalSupply() (read-only).
-c, --contract
string
required
Smart contract ID or local alias.
Example
hcli contract-erc20 total-supply --contract my-token
Call balanceOf(address) (read-only).
-c, --contract
string
required
Smart contract ID, alias, or EVM address.
-a, --account
string
required
Account to query: alias, Hedera account ID, or EVM address.
Example
hcli contract-erc20 balance-of --contract my-token --account 0.0.123456
Call allowance(owner, spender) (read-only).
-c, --contract
string
required
Smart contract ID or local alias.
-o, --owner
string
required
Owner account: alias, account ID, or EVM address.
-s, --spender
string
required
Spender account: alias, account ID, or EVM address.
Example
hcli contract-erc20 allowance --contract my-token --owner alice --spender bob
Call transfer(to, value). Submits a contract call transaction (operator signs).
-c, --contract
string
required
Smart contract ID, alias, or EVM address.
-t, --to
string
required
Recipient: alias, account ID, or EVM address.
-v, --value
number
required
Amount passed to transfer as configured by the token (often smallest units—confirm against decimals for your contract).
-g, --gas
number
default:"100000"
Gas for the contract call.
Example
hcli contract-erc20 transfer --contract my-token --to bob --value 1000000
Call transferFrom(from, to, value). Requires a sufficient allowance from from for the signing account (typically the operator). Submits a contract call transaction.
-c, --contract
string
required
Smart contract ID, alias, or EVM address.
-f, --from
string
required
Source account: alias, account ID, or EVM address.
-t, --to
string
required
Recipient: alias, account ID, or EVM address.
-v, --value
number
required
Amount for transferFrom.
-g, --gas
number
default:"100000"
Gas for the contract call.
Example
hcli contract-erc20 transfer-from --contract my-token --from alice --to bob --value 500000
Call approve(spender, value). Submits a contract call transaction.
-c, --contract
string
required
Smart contract ID, alias, or EVM address.
-s, --spender
string
required
Spender account: alias, account ID, or EVM address.
-v, --value
number
required
Approved amount for approve.
-g, --gas
number
default:"100000"
Gas for the contract call.
Example
hcli contract-erc20 approve --contract my-token --spender bob --value 1000000
NFT contract helpers are documented on the Contract ERC-721 plugin page.