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

Added ERC223 feature #266

Closed
wants to merge 1 commit into from
Closed

Added ERC223 feature #266

wants to merge 1 commit into from

Conversation

ProphetDaniel
Copy link

No description provided.

2. Allows users to send their tokens anywhere with one function `transfer`. No difference between is the receiver a contract or not. No need to learn how token contract is working for regular user to send tokens.
3. Allows contract developers to handle incoming token transactions.
4. ERC223 `transfer` to contract consumes 2 times less gas than ERC20 `approve` and `transferFrom` at receiver contract.
5. Allows to deposit tokens intor contract with a single transaction. Prevents extra blockchain bloating.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intor to into

ProphetDaniel added a commit to ProphetDaniel/ERC23-tokens that referenced this pull request Jun 20, 2017
Fixed typo according to review from DavidKnott. More info: OpenZeppelin/openzeppelin-contracts#266 (comment)
@DavidKnott
Copy link
Contributor

@ProphetDaniel This looks like it'll be a great addition! Could you explain how having 2 transfer functions in the same contract works? (I'm curious) I'm assuming it's smart enough to choose which function to use based on if bytes data is provided?

@Dexaran
Copy link

Dexaran commented Jun 21, 2017

@DavidKnott this transfer functions would have different signatures.
The signature of transfer(address,uint256) function is 0xa9059cbb.
The signature of transfer(address,uint256,bytes) function is 0xbe45fd62.
You are right, if bytes data is provided, then the signature of the called function will match the transfer (address, uint256, bytes), and if the data is not provided, the signature will match the transfer (address, uint256).

Function calls in the Ethereum Virtual Machine are specified by the first four bytes of data sent with a transaction. These 4-byte signatures are defined as the first four bytes of the Keccak hash (SHA3) of the canonical representation of the function signature.

@ProphetDaniel
Copy link
Author

Thank you for answering him @Dexaran!

@izqui
Copy link
Contributor

izqui commented Jun 22, 2017

We have a more complex implementation we did at https://github.com/aragon/erc23 that has the tokenPayablemodifier that i think it is very interesting for using tokens as ether for calling functions

@DavidKnott
Copy link
Contributor

@Dexaran @izqui Thanks a lot for explaining this!

@ProphetDaniel
Copy link
Author

@izqui , Indeed tokenPayable modifier is very interesting. Can you make a PR to this feature branch?

@ProphetDaniel
Copy link
Author

Another point to be considered is the cost for the added complexity the tokenPayable modifyer adds. Anyway I think it a good practice to implement first the basic ERC223 token standard. And later on the more complex implementation that adds features like the tokenPayable modifyer.

@se3000
Copy link
Contributor

se3000 commented Jul 5, 2017

@izqui I like your tokenPayable modifier and tkn storage technique. It adds a little complexity, but would be a good example for other contracts in the future.

It looks like your tokenFallback function accepts an extra parameter, address _origin, which is not specified in the original spec. Can you clarify for me why it is a worth while parameter to add?

@maraoz
Copy link
Contributor

maraoz commented Jul 6, 2017

@ProphetDaniel this still needs rebasing to be mergeable.

@maraoz
Copy link
Contributor

maraoz commented Jul 7, 2017

@ProphetDaniel still needs to be rebased correctly. Remember not to do a git pull before pusing, and do a git push -f instead

@frangio
Copy link
Contributor

frangio commented Aug 9, 2017

Closing as stale. Furthermore, our implementation shouldn't be a clone of the reference implementation, but written from scratch.

@frangio frangio closed this Aug 9, 2017
@kylerchin
Copy link

Please reopen this @frangio . ERC223 tokens are necessary for storing tokens in my contract. I am building my token around the ERC223 for payment solutions and anti fraud using smart contracts between 2 people. I think people would like a safe way to use tokens such as these ones.

@frangio
Copy link
Contributor

frangio commented Aug 17, 2017

Hi @kylerschin. We appreciate your input. This PR was closed for different reasons. Please refer to #346, we'd love to have your opinion over there.

@ProphetDaniel
Copy link
Author

It is quite amusing this specific actitude @frangio.

Closing as stale.

@kylerschin, I tested this implementation with truffle tests and LETH wallet. More tests can be added though. One of the important questions is if it will work flawlessly with ERC20 wallets that could be awaiting ERC20 events for example. I took special care with that for the event triggering strategy. A great real life token wallet with which I have also tested is Inzhoop LETH.

jewel528 pushed a commit to jewel528/ERC223 that referenced this pull request Feb 16, 2024
Fixed typo according to review from DavidKnott. More info: OpenZeppelin/openzeppelin-contracts#266 (comment)
venuswhispers added a commit to venuswhispers/My_EIP223 that referenced this pull request Feb 19, 2024
Fixed typo according to review from DavidKnott. More info: OpenZeppelin/openzeppelin-contracts#266 (comment)
devstar1014 added a commit to devstar1014/My_EIP223 that referenced this pull request Aug 8, 2024
Fixed typo according to review from DavidKnott. More info: OpenZeppelin/openzeppelin-contracts#266 (comment)
masterdev2637 added a commit to masterdev2637/ERC223-token-standard that referenced this pull request Jan 6, 2025
Fixed typo according to review from DavidKnott. More info: OpenZeppelin/openzeppelin-contracts#266 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants