-
Notifications
You must be signed in to change notification settings - Fork 104
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
[SC-1198] Upgrade FeeTaker #342
base: master
Are you sure you want to change the base?
Conversation
) internal view virtual override returns (uint256) { | ||
unchecked { | ||
(, uint256 integratorFee, uint256 resolverFee, bytes calldata tail) = _parseFeeData(extraData, taker, _isWhitelistedGetterImpl); | ||
return Math.mulDiv( |
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.
Is it correct to calculate makingAmount and then get fee from this amount? Should we at first get fee from takingAmount
and then calculate makingAmount?
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.
Looks like incorrect in any case when order price is not 1:1, because we can get fee only in takerAsset
* (bytes10)[N] — taker whitelist | ||
*/ | ||
function getMakingAmount( | ||
function postInteraction( |
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.
No docs for this function. It may be worth referring to them in the interface.
* (bytes10)[N] — taker whitelist | ||
*/ | ||
function getMakingAmount( | ||
function postInteraction( |
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.
function postInteraction( | |
/** | |
* @notice See {IPostInteraction-postInteraction}. | |
*/ | |
function postInteraction( |
FeeTaker
checks that taker is either in whitelist or hasAccessToken
_parseFeeData
is universal for getters and postInteraction_isWhitelisted
is virtual to allow for different whitelist structure in getters and postInteractionpostInteraction
now allows custom chained calls to other post-interactions