---
# System prepended metadata

title: ERC777 Events

---

# ERC777 Events
###### tags: erc777, events, rengo-labs, casper-network, rust, proposal

## Events ERC777
### Sent
```
event Sent(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256 amount,
        bytes data,
        bytes operatorData
    );
```
Emmited on token movements, when `amount` tokens are sent via `_move()` function call.

### Minted
```
event Minted(
    address indexed operator, 
    address indexed to, 
    uint256 amount, 
    bytes data, 
    bytes operatorData
);
```
Emitted when `amount` tokens are created by `operator` and assigned to `to`.
Note that some additional user `data` and `operatorData` can be logged in the event.

### Burned
```
event Burned(
    address indexed operator,
    address indexed from, 
    uint256 amount, 
    bytes data, 
    bytes operatorData
);
```
Emitted when `operator` destroys `amount` tokens from `account`.
Note that some additional user `data` and `operatorData` can be logged in the event.

### AuthorizedOperator
```
event AuthorizedOperator(
    address indexed operator, 
    address indexed tokenHolder
);
```
Emitted when `operator` is made operator for `tokenHolder`.

### RevokedOperator
```
event RevokedOperator(
    address indexed operator, 
    address indexed tokenHolder
);
```
Emitted when `operator` is revoked its operator status for `tokenHolder`.

## Events ERC20
### Transfer
```
event Transfer(address from, address to, uint256 value)
```

Emitted when `value` tokens are moved `from` account `to` another.
Note that `value` may be zero.

### Approval
```
event Approval(address owner, address spender, uint256 value)
```

Emitted when the allowance of a `spender` for an `owner` is set by a call to approve.
`Value` is the new allowance.

## ERC777 Functions that emit events

###  Directly emit events.

#### `_mint()`
emit Minted(operator, account, amount, userData, operatorData);
emit Transfer(address(0), account, amount);

#### `_burn()`
emit Burned(operator, from, amount, data, operatorData);
emit Transfer(from, address(0), amount);

#### `_move`
emit Sent(operator, from, to, amount, userData, operatorData);
emit Transfer(from, to, amount);

#### `authorizeOperator()`
emit AuthorizedOperator(operator, _msgSender());

#### `revokeOperator()`
emit RevokedOperator(operator, _msgSender());

#### `_approve()`
emit Approval(holder, spender, value);

### Indirectly emit events.

#### `_send()`
Emits a {Sent} and {IERC20-Transfer} events.
Because calls `_move()`.

#### `_spendAllowance()`
Emits a {IERC20-Approval} event.
Because calls `_approve()` function.

#### `send()`
Emits a {Sent} and {IERC20-Transfer} events.
Because calls `_send()`.

#### `transfer()`
Emits a {Sent} and {IERC20-Transfer} events.
Because calls `_send()`.

#### `burn()`
Emits a {Burned} and {IERC20-Transfer} events for ERC20 compatibility.
Because calls `_burn()`.

#### `approve()`
Emits a {IERC20-Approval} event.
Because calls `_approve()`.

#### `transferFrom()`
Emits a {Sent}, {IERC20-Transfer} and {IERC20-Approval} events.
Because calls `_send()` and `_spendAllowance()`.

#### `operatorSend()`
Emits a {Sent} and {IERC20-Transfer} events.
Because calls `_send()`.

#### `operatorBurn()`
Emits a {Burned} and {IERC20-Transfer} events.
Because calls `_burn()`.

## Examples for ERC777Token, ERC777Recipient and ERC777Sender contract's implementations (Solidity).

https://forum.openzeppelin.com/t/simple-erc777-token-example/746

## Tests examples for ERC777

[ERC777.behavior.js](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/test/token/ERC777/ERC777.behavior.js)

[ERC777.test.js](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/test/token/ERC777/ERC777.test.js)