-
Notifications
You must be signed in to change notification settings - Fork 215
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
Enhance approveAndCall logic #84
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
173d21d
Add flash approveAndCall logic
elenadimitrova be80a3f
Add test for new flash approveAndCall logic
elenadimitrova 9114463
Refactor approveAndCall logic into the BaseTransfer module
elenadimitrova 895d2f7
Make SafeMath available to all modules
elenadimitrova cff6634
Update TransferManager to do BaseTransfer approveAndCall
elenadimitrova 0ea986d
Enable different spender to caller in TransferManager approveAndCall
elenadimitrova 8daf509
Fix rebase issue
elenadimitrova dc89490
Add TransferManager to list of modules to upgrade
elenadimitrova b39b60c
Replace LegacyTokenTransfer usage with instance of the 1.5 TransferMa…
elenadimitrova 970c6bd
Update ApprovedAndCalledContract event definition to index spender
elenadimitrova d9a7706
Incude originally approved amount in the approveAndCall approval to s…
elenadimitrova 4e2296b
Improve TransferManager code comments
elenadimitrova bb14864
Adjust test coverage thresholds for reshuffled LegacyTransferMaanger …
elenadimitrova 8523af9
Check the approveAndCall hasn't spent more than the given amount
elenadimitrova 57f4fc1
Conditionally update allowance based on whether it's changed
elenadimitrova 9f2d735
Remove config.modules.TokenTransfer and use current TransferManager a…
elenadimitrova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should index
wallet
token
andamountSpent
to mirror what we index inTransfer
? I suspect that it is the main information the clients are interested in. Maybe check with @th3m477 ?There was a problem hiding this 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 uint256 values need to be indexed generally, makes no client difference here as it's a new event.
Addresses make more sense as we are more likely to do exploratory network analysis in the future, or quick filters (i.e. "show me all the transfers I made to X address"), so more of a case for
spender
, but up to you @juniset @elenadimitrovaThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually we can only have up to 3 indexed arguments per event so leaving as is.