holder
Token holder. The holder can “authorize” and “revoke” operators which can send tokens on their behalf. These operators are intended to be verified contracts such as an exchange, a cheque processor or an automatic charging system.
operator
An operator is an address which is allowed to send and burn tokens on behalf of some holder.
from docs:
The tokensReceived hook allows to send tokens to a contract and notify it in a single transaction, unlike ERC-20 which requires a double call (approve/transferFrom) to achieve this.
The holder can “authorize” and “revoke” operators which can send tokens on their behalf. These operators are intended to be verified contracts such as an exchange, a cheque processor or an automatic charging system.
ERC-20 compatibility requirement
The decimals of the token MUST always be 18. For a pure ERC777 token the ERC-20 decimals function is OPTIONAL, and its existence SHALL NOT be relied upon when interacting with the token contract. (The decimal value of 18 is implied.) For an ERC-20 compatible token, the decimals function is REQUIRED and MUST return 18. (In ERC-20, the decimals function is OPTIONAL. If the function is not present, the decimals value is not clearly defined and may be assumed to be 0. Hence for compatibility reasons, decimals MUST be implemented for ERC-20 compatible tokens.)
If the token implements ERC-20, it MUST register the ERC20Token interface with its own address via ERC-1820. This is done by calling the setInterfaceImplementer function on the ERC1820 registry with the token contract address as both the address and the implementer and the keccak256 hash of ERC20Token (0xaea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a) as the interface hash.
conclusion
Yes, if an operator is approved to spend on behalf of the holder, on tokensReceived
, it can be transferred immediately. operatorSend
defined in the interface sends the amount of tokens on behalf of the address from
to the address to
.