> ## Documentation Index
> Fetch the complete documentation index at: https://hedera-0c6e0218-mintlify-bc559771.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Contract ERC-20 Plugin

> Use the Hiero CLI Contract ERC-20 plugin to invoke standard EIP-20 methods on Hedera-deployed token contracts, including transfers, approvals, and balances.

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](/solutions/tools/hiero-cli/plugins/contract-plugin).

## Most Used Commands

**Read token metadata and an account balance**

```sh theme={null}
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)**

```sh theme={null}
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.

<Accordion title="Contract ERC-20 Name">
  Call **`name()`** on the ERC-20 contract (read-only).

  <ResponseField name="-c, --contract" type="string" required>
    Smart contract ID or local alias.
  </ResponseField>

  **Example**

  ```sh theme={null}
  hcli contract-erc20 name --contract my-token
  ```
</Accordion>

<Accordion title="Contract ERC-20 Symbol">
  Call **`symbol()`** (read-only).

  <ResponseField name="-c, --contract" type="string" required>
    Smart contract ID or local alias.
  </ResponseField>

  **Example**

  ```sh theme={null}
  hcli contract-erc20 symbol --contract my-token
  ```
</Accordion>

<Accordion title="Contract ERC-20 Decimals">
  Call **`decimals()`** (read-only).

  <ResponseField name="-c, --contract" type="string" required>
    Smart contract ID or local alias.
  </ResponseField>

  **Example**

  ```sh theme={null}
  hcli contract-erc20 decimals --contract my-token
  ```
</Accordion>

<Accordion title="Contract ERC-20 Total-Supply">
  Call **`totalSupply()`** (read-only).

  <ResponseField name="-c, --contract" type="string" required>
    Smart contract ID or local alias.
  </ResponseField>

  **Example**

  ```sh theme={null}
  hcli contract-erc20 total-supply --contract my-token
  ```
</Accordion>

<Accordion title="Contract ERC-20 Balance-Of">
  Call **`balanceOf(address)`** (read-only).

  <ResponseField name="-c, --contract" type="string" required>
    Smart contract ID, alias, or EVM address.
  </ResponseField>

  <ResponseField name="-a, --account" type="string" required>
    Account to query: alias, Hedera account ID, or EVM address.
  </ResponseField>

  **Example**

  ```sh theme={null}
  hcli contract-erc20 balance-of --contract my-token --account 0.0.123456
  ```
</Accordion>

<Accordion title="Contract ERC-20 Allowance">
  Call **`allowance(owner, spender)`** (read-only).

  <ResponseField name="-c, --contract" type="string" required>
    Smart contract ID or local alias.
  </ResponseField>

  <ResponseField name="-o, --owner" type="string" required>
    Owner account: alias, account ID, or EVM address.
  </ResponseField>

  <ResponseField name="-s, --spender" type="string" required>
    Spender account: alias, account ID, or EVM address.
  </ResponseField>

  **Example**

  ```sh theme={null}
  hcli contract-erc20 allowance --contract my-token --owner alice --spender bob
  ```
</Accordion>

<Accordion title="Contract ERC-20 Transfer">
  Call **`transfer(to, value)`**. Submits a contract call transaction (operator signs).

  <ResponseField name="-c, --contract" type="string" required>
    Smart contract ID, alias, or EVM address.
  </ResponseField>

  <ResponseField name="-t, --to" type="string" required>
    Recipient: alias, account ID, or EVM address.
  </ResponseField>

  <ResponseField name="-v, --value" type="number" required>
    Amount passed to **`transfer`** as configured by the token (often smallest units—confirm against **`decimals`** for your contract).
  </ResponseField>

  <ResponseField name="-g, --gas" type="number" default="100000">
    Gas for the contract call.
  </ResponseField>

  **Example**

  ```sh theme={null}
  hcli contract-erc20 transfer --contract my-token --to bob --value 1000000
  ```
</Accordion>

<Accordion title="Contract ERC-20 Transfer-From">
  Call **`transferFrom(from, to, value)`**. Requires a sufficient allowance from **`from`** for the signing account (typically the operator). Submits a contract call transaction.

  <ResponseField name="-c, --contract" type="string" required>
    Smart contract ID, alias, or EVM address.
  </ResponseField>

  <ResponseField name="-f, --from" type="string" required>
    Source account: alias, account ID, or EVM address.
  </ResponseField>

  <ResponseField name="-t, --to" type="string" required>
    Recipient: alias, account ID, or EVM address.
  </ResponseField>

  <ResponseField name="-v, --value" type="number" required>
    Amount for **`transferFrom`**.
  </ResponseField>

  <ResponseField name="-g, --gas" type="number" default="100000">
    Gas for the contract call.
  </ResponseField>

  **Example**

  ```sh theme={null}
  hcli contract-erc20 transfer-from --contract my-token --from alice --to bob --value 500000
  ```
</Accordion>

<Accordion title="Contract ERC-20 Approve">
  Call **`approve(spender, value)`**. Submits a contract call transaction.

  <ResponseField name="-c, --contract" type="string" required>
    Smart contract ID, alias, or EVM address.
  </ResponseField>

  <ResponseField name="-s, --spender" type="string" required>
    Spender account: alias, account ID, or EVM address.
  </ResponseField>

  <ResponseField name="-v, --value" type="number" required>
    Approved amount for **`approve`**.
  </ResponseField>

  <ResponseField name="-g, --gas" type="number" default="100000">
    Gas for the contract call.
  </ResponseField>

  **Example**

  ```sh theme={null}
  hcli contract-erc20 approve --contract my-token --spender bob --value 1000000
  ```
</Accordion>

## Related

NFT contract helpers are documented on the [Contract ERC-721 plugin](/solutions/tools/hiero-cli/plugins/contract-erc721-plugin) page.
