Skip to content

Commit

Permalink
ERC777: Clarify ERC20 transfer for contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
0xjac committed Apr 29, 2019
1 parent b2f1607 commit d245956
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions EIPS/eip-777.md
Original file line number Diff line number Diff line change
Expand Up @@ -1086,15 +1086,21 @@ when sending, minting and transferring token via [ERC777] and [ERC20]:
<code>ERC777TokensRecipient</code><br/>not registered
</td>
<td>regular address</td>
<td align="center">continue</td>
<td rowspan="2" align="center">continue</td>
<td colspan="2" align="center">continue</td>
</tr>
<tr>
<td>contract</td>
<td align="center">MUST <code>revert</code></td>
<td align="center">SHOULD continue<sup><a id="continue-footnote-backlink" href="#continue-footnote">1</a></sup></td>
</tr>
</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>
> <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>

There is no particular action to take if `tokensToSend` is not implemented.
The transfer MUST proceed and only be canceled if another condition is not respected
such as lack of funds or a `revert` in `tokensReceived` (if present).
Expand Down

0 comments on commit d245956

Please sign in to comment.