Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ERC-777: fix typo #182

Merged
merged 2 commits into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions ERCS/erc-777.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
requires: 1820
---

## Simple Summary

Check failure on line 13 in ERCS/erc-777.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

body has extra section(s)

error[markdown-order-section]: body has extra section(s) --> ERCS/erc-777.md | 13 | ## Simple Summary | ::: ERCS/erc-777.md | 1129 | ## Backward Compatibility | ::: ERCS/erc-777.md | 1237 | ## Implementation | = help: see https://ethereum.github.io/eipw/markdown-order-section/

This EIP defines standard interfaces and behaviors for token contracts.

Expand Down Expand Up @@ -55,7 +55,7 @@

## Specification

### ERC777Token (Token Contract)

Check failure on line 58 in ERCS/erc-777.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`)

error[markdown-re-erc-dash]: proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`) --> ERCS/erc-777.md | 58 | ### ERC777Token (Token Contract) | = info: the pattern in question: `(?i)erc[\s]*[0-9]+` = help: see https://ethereum.github.io/eipw/markdown-re-erc-dash/

``` solidity
interface ERC777Token {
Expand Down Expand Up @@ -130,8 +130,8 @@
> and the `keccak256` hash of `ERC777Token` (`0xac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce2177054`)
> as the interface hash.

If the contract has a switch to enable or disable ERC777 functions, every time the switch is triggered,
If the contract has a switch to enable or disable ERC-777 functions, every time the switch is triggered,

Check failure on line 133 in ERCS/erc-777.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

the first match of the given pattern must be a link

error[markdown-link-first]: the first match of the given pattern must be a link --> ERCS/erc-777.md | 133 | If the contract has a switch to enable or disable ERC-777 functions, every time the switch is triggered, | = info: the pattern in question: `(?i)(?:eip|erc)-[0-9]+` = help: see https://ethereum.github.io/eipw/markdown-link-first/
the token MUST register or unregister the `ERC777Token` interface for its own address accordingly via ERC1820.

Check failure on line 134 in ERCS/erc-777.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`)

error[markdown-re-erc-dash]: proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`) --> ERCS/erc-777.md | 134 | the token MUST register or unregister the `ERC777Token` interface for its own address accordingly via ERC1820. | = info: the pattern in question: `(?i)erc[\s]*[0-9]+`
Unregistering implies calling the `setInterfaceImplementer` with the token contract address as the address,
the `keccak256` hash of `ERC777Token` as the interface hash and `0x0` as the implementer.
(See [Set An Interface For An Address][erc1820-set] in [ERC-1820] for more details.)
Expand Down Expand Up @@ -250,7 +250,7 @@

*[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,
For a *pure* ERC-777 token the [ERC-20] `decimals` function is OPTIONAL,

Check failure on line 253 in ERCS/erc-777.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

the first match of the given pattern must be a link

error[markdown-link-first]: the first match of the given pattern must be a link --> ERCS/erc-777.md | 253 | For a *pure* ERC-777 token the [ERC-20] `decimals` function is OPTIONAL, | = info: the pattern in question: `(?i)(?:eip|erc)-[0-9]+`
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`.
Expand Down Expand Up @@ -719,7 +719,7 @@

``` solidity
event Burned(
ddress indexed operator,
address indexed operator,
address indexed from,
uint256 amount,
bytes data,
Expand Down Expand Up @@ -912,7 +912,7 @@
- MUST `revert` if the `tokensReceived` hook is called from a mint or send call.

- SHOULD continue processing the transaction
if the `tokensReceived` hook is called from an ERC20 `transfer` or `transferFrom` call.
if the `tokensReceived` hook is called from an ERC-20 `transfer` or `transferFrom` call.

*NOTE*: A regular address MAY register a different address—the address of a contract—implementing
the interface on its behalf.
Expand Down Expand Up @@ -1098,7 +1098,7 @@
Unfortunately, issues emanating from upgrades in the Solidity language to versions 0.5 and above
resulted in a bug in a separated part of the registry, which required changes.
This was discovered right after the last call period.
Attempts made to avoid creating a separate EIP, such as [ERC820a], were rejected.
Attempts made to avoid creating a separate EIP, such as [ERC-820a], were rejected.
Hence the standard for the registry used for [ERC-777] became [ERC-1820].
[ERC-1820] and [ERC-820] are functionally equivalent. [ERC-1820] simply contains the fix for newer versions of Solidity.

Expand Down Expand Up @@ -1151,13 +1151,13 @@

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
This is done by calling the `setInterfaceImplementer` function on the ERC-1820 registry
with the token contract address as both the address and the implementer
and the `keccak256` hash of `ERC20Token` (`0xaea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a`)
as the interface hash.

If the contract has a switch to enable or disable ERC20 functions, every time the switch is triggered,
If the contract has a switch to enable or disable ERC-20 functions, every time the switch is triggered,
the token MUST register or unregister the `ERC20Token` interface for its own address accordingly via ERC1820.

Check failure on line 1160 in ERCS/erc-777.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`)

error[markdown-re-erc-dash]: proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`) --> ERCS/erc-777.md | 1160 | the token MUST register or unregister the `ERC20Token` interface for its own address accordingly via ERC1820. | = info: the pattern in question: `(?i)erc[\s]*[0-9]+`
Unregistering implies calling the `setInterfaceImplementer` with the token contract address as the address,
the `keccak256` hash of `ERC20Token` as the interface hash and `0x0` as the implementer.
(See [Set An Interface For An Address][erc1820-set] in [ERC-1820] for more details.)
Expand Down Expand Up @@ -1207,7 +1207,7 @@
</table>

> <a href="#continue-footnote-backlink"><small id="continue-footnote">1.</small></a>
> <small>The transaction SHOULD continue for clarity as ERC20 is not aware of hooks.</small>

Check failure on line 1210 in ERCS/erc-777.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`)

error[markdown-re-erc-dash]: proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`) --> ERCS/erc-777.md | 1210 | > <small>The transaction SHOULD continue for clarity as ERC20 is not aware of hooks.</small> | = info: the pattern in question: `(?i)erc[\s]*[0-9]+`
> <small>However, this can result in accidentally locked tokens.</small>
> <small>If avoiding accidentally locked tokens is paramount, the transaction MAY <code>revert</code>.</small>

Expand All @@ -1225,9 +1225,9 @@
Hence for any movement of tokens, two events MAY be emitted:
an [ERC-20] `Transfer` and an [ERC-777] `Sent`, `Minted` or `Burned` (depending on the type of movement).
Third-party developers MUST be careful not to consider both events as separate movements.
As a general rule, if an application considers the token as an ERC20 token,

Check failure on line 1228 in ERCS/erc-777.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`)

error[markdown-re-erc-dash]: proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`) --> ERCS/erc-777.md | 1228 | As a general rule, if an application considers the token as an ERC20 token, | = info: the pattern in question: `(?i)erc[\s]*[0-9]+`
then only the `Transfer` event MUST be taken into account.
If the application considers the token as an ERC777 token,

Check failure on line 1230 in ERCS/erc-777.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`)

error[markdown-re-erc-dash]: proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`) --> ERCS/erc-777.md | 1230 | If the application considers the token as an ERC777 token, | = info: the pattern in question: `(?i)erc[\s]*[0-9]+`
then only the `Sent`, `Minted` and `Burned` events MUST be considered.

## Test Cases
Expand All @@ -1236,7 +1236,7 @@

## Implementation

The GitHub repository [0xjac/ERC777] contains the [reference implementation].

Check failure on line 1239 in ERCS/erc-777.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`)

error[markdown-re-erc-dash]: proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`) --> ERCS/erc-777.md | 1239 | The GitHub repository [0xjac/ERC777] contains the [reference implementation]. | = info: the pattern in question: `(?i)erc[\s]*[0-9]+`
The reference implementation is also available via [npm][npm/erc777] and can be installed with `npm install erc777`.

## Copyright
Expand All @@ -1250,7 +1250,7 @@
[ERC-672]: https://github.com/ethereum/EIPs/issues/672
[ERC-777]: ./eip-777.md
[ERC-820]: ./eip-820.md
[ERC820a]: https://github.com/ethereum/EIPs/pull/1758
[ERC-820a]: https://github.com/ethereum/EIPs/pull/1758
[ERC-1820]: ./eip-1820.md
[erc1820-set]: ./eip-1820.md#set-an-interface-for-an-address
[0xjac]: https://github.com/0xjac
Expand Down
Loading