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

Add ERC827 with proxy proposal #4

Merged
merged 3 commits into from
Aug 9, 2018

Conversation

AugustoL
Copy link
Contributor

Summary

The proposal adds an ERC827Proxy to the token to be used for every method that will execute arbitrary calls, doing this the msg.sender in the receiver contracts will be the ERC827Proxy address and not the ERC827 token,

Implementation

The implementation is done in the contracts/proposals folder on the ERC827TokenWithProxy.sol file.
The same tests that are being used for ERC827Token are used for this implementation with the same results, the only change done was on the beforeEach method to configure the ERC827Proxy over the token correctly.

This PR is based on the one submitted by @k06a #3

@AugustoL AugustoL self-assigned this Jul 17, 2018
@rstormsf
Copy link

Just curious if you had any problems with previous implementation and reasons why you want to call it via proxy contract

@k06a
Copy link

k06a commented Jul 31, 2018

@rstormsf there are some problems with token contracts, which owns something. Arbitrary call allows anyone easily steal any resources from token smart contract itself - thats why we need to wrap this call. I also suggest to add a few changes to perform transferFrom from msg.sender:
ethereum/EIPs#1003 (comment)

@AugustoL
Copy link
Contributor Author

AugustoL commented Aug 3, 2018

@rstormsf The main issue is that there is an assumption that token contract cannot make arbitrary calls, previus standards have followed this assumption and by using fallback methods they where able to continue the transfer/approvals methods on receiver contracts.
The goal of ERC827 is to do not require anything on teh receiver contract, they just will execute any function after balance has been transfered/approve. On the other standards you have to implement the fallback function and work from there, this aims to get rid of that.

@AugustoL AugustoL merged commit bdff485 into windingtree:master Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants