HRC-777

HRC-777 is an easy-to-trade token standard that improves on the existing HRC-20 standard.

What improvements does HRC-777 propose over HRC-20?

Compared to HRC-20, HRC-777 offers the following improvements.

Hooks

A hook is a function described in the smart contract code. The hook will be called when tokens are sent or received through the contract. This will allow smart contracts to interact with incoming and outgoing tokens.

Why are hooks great?

  1. Hooks allow sending tokens to a contract and notifying the contract in a single transaction, unlike HRC-20 which requires a double call (agree/transfer from) to make this happen.

  2. Contracts without registered hooks are incompatible with HRC-777. When the receiving contract does not register the hook, the sending contract will abort the transaction. This prevents accidental transfers to non-HRC-777 smart contracts.

  3. Hooks can reject transactions.

Decimal places

The standard also resolves the confusion caused by decimals in HRC-20. This clarity improves the developer experience.

Backward compatible with HRC-20

HRC-777 contracts can interact with contracts similar to HRC-20 contracts.

\

Last updated