You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: public/content/developers/docs/standards/tokens/erc-223/index.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ contract RecipientContract is IERC223Recipient {
129
129
{
130
130
// It is important to understand that within this function
131
131
// msg.sender is the address of a token that is being received,
132
-
// msg.value is always 0 as the token contract does not own or send Ether in most cases,
132
+
// msg.value is always 0 as the token contract does not own or send ether in most cases,
133
133
// _from is the sender of the token transfer,
134
134
// _value is the amount of tokens that was deposited.
135
135
require(msg.sender == tokenA);
@@ -155,7 +155,7 @@ If an ERC-20 token is sent to the `RecipientContract`, the tokens will be transf
155
155
156
156
### What if we want to execute some function after the token deposit is completed? {#function-execution}
157
157
158
-
There are multiple ways of doing so. In this example we will follow the method which makes ERC-223 transfers identical to Ether transfers:
158
+
There are multiple ways of doing so. In this example we will follow the method which makes ERC-223 transfers identical to ether transfers:
159
159
160
160
```solidity
161
161
contract RecipientContract is IERC223Recipient {
@@ -178,7 +178,7 @@ contract RecipientContract is IERC223Recipient {
178
178
}
179
179
```
180
180
181
-
When the `RecipientContract` will receive a ERC-223 token the contract will execute a function encoded as `_data` parameter of the token transaction, identical to how Ether transactions encode function calls as transaction `data`. Read [the data field](https://ethereum.org/en/developers/docs/transactions/#the-data-field) for more information.
181
+
When the `RecipientContract` will receive a ERC-223 token the contract will execute a function encoded as `_data` parameter of the token transaction, identical to how ether transactions encode function calls as transaction `data`. Read [the data field](https://ethereum.org/en/developers/docs/transactions/#the-data-field) for more information.
182
182
183
183
In the above example an ERC-223 token must be transferred to the address of the `RecipientContract` with the `transfer(address,uin256,bytes calldata _data)` function. If the data parameter will be `0xc2985578` (the signature of a `foo()` function) then the function foo() will be invoked after the token deposit is received and the event Foo() will be fired.
0 commit comments