Using the CLI

This guide walks you through installing and using the zERC20 command-line interface.

Installation

git clone https://github.com/InternetMaximalism/zerc20.git
cd zerc20/cli
cargo install --path .

This installs the CLI binary as zerc20-cli (older versions may install as cli). Alternatively, run directly from the repository:

cd zerc20/cli
cargo run -r -- <command> ...

Prerequisites

Circuit Artifacts

Circuit artifacts are required for generating withdrawal proofs. Download them before using the CLI:

cargo install --path ../circuit-setup
zerc20-circuit-setup download --version 1.1.0

See Circuit Setup for more details.

Configuration

Environment Variables

Load environment variables from .env (see .env.example in the cli directory):

See ICP Canister IDs for mainnet/testnet values.

Basic Commands

Issue an Invoice

Generate a burn address to receive payments:

List Invoices

View your invoices:

Transfer

Send zERC20 to a burn address:

Check Invoice Status

Receive Funds

Generate proofs and receive:

Quick Start Example

Important Notes

  • Crosschain Capability: You can send on one chain and receive on another

  • Processing Time: Private transfers typically take 30 minutes to 1 hour on mainnet

  • Testnet Limitations: On testnets, transfers may take longer due to LayerZero instability

Next Steps

Last updated