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

istambul fix #91

Merged
merged 3 commits into from
Nov 6, 2019
Merged

istambul fix #91

merged 3 commits into from
Nov 6, 2019

Conversation

rperez89
Copy link
Member

@rperez89 rperez89 commented Nov 5, 2019

This is because of bingen's comment

Because of those problems with EIP-1884, you may consider not using transfer. See: <https://github.com/aragon/aragonOS/pull/551> <https://github.com/aragon/aragon-apps/issues/1017> <https://diligence.consensys.net/blog/2019/09/stop-using-soliditys-transfer-now/>

Copy link
Member

@willjgriff willjgriff left a comment

Choose a reason for hiding this comment

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

I don't think there's any risk from reentrancy here, as we delete a struct which is required at the start of each function. However, I would suggest adding a reentrancy guard, eg the modifier nonReentrant which is in the AragonApp contract, to each function that does a call.value().

@@ -31,6 +31,7 @@ contract TokenRequest is AragonApp {
string private constant ERROR_ADDRESS_NOT_CONTRACT = "TOKEN_REQUEST_ADDRESS_NOT_CONTRACT";
string private constant ERROR_TOKEN_REQUEST_NOT_OWNER = "TOKEN_REQUEST_NOT_OWNER";
string private constant ERROR_ETH_VALUE_MISMATCH = "TOKEN_REQUEST_ETH_VALUE_MISMATCH";
string private constant ERROR_ETH_TRANSFER_FAILED = "TOKEN_REQUEST_ETH_TRANSFER_FAILED";
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a test for this new error message?

@rperez89
Copy link
Member Author

rperez89 commented Nov 6, 2019

@willjgriff i did as you requested a test for when the ETH transfer fails, but for when we are doing the refund i couldn't make it work because i am setting the msg.sender as mockErc20.address in order to make it fail but i am getting this other error Error: Returned error: sender account not recognized i just left the last test commented so you can see what i am talking about, do you have any idea about how to do it?

Copy link
Member

@willjgriff willjgriff left a comment

Choose a reason for hiding this comment

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

Remove the commented test then 👍

@rperez89 rperez89 merged commit 67e879c into master Nov 6, 2019
@willjgriff willjgriff deleted the fix-istambul branch November 8, 2019 14:30
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.

None yet

2 participants