-
Notifications
You must be signed in to change notification settings - Fork 88
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
feat: remove ContextUpgradeable from ExchangeCore #1164
feat: remove ContextUpgradeable from ExchangeCore #1164
Conversation
Pass the from == _msgSender() all the way down into ExcangeCore
@@ -295,56 +270,62 @@ abstract contract ExchangeCore is Initializable, ContextUpgradeable, TransferExe | |||
uint256 takeBuyAmount = newFill.rightValue; | |||
uint256 makeBuyAmount = newFill.leftValue; | |||
|
|||
if (((_msgSender() != msg.sender) && !nativeMeta) || ((_msgSender() == msg.sender) && !nativeOrder)) { | |||
// TODO: this force me to pass from, do we want it ? |
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 think we do. @mvanmeerbeck ?
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.
all of that is for native eth, which we're removing so, lets just ignore
{ | ||
bytes32 leftOrderKeyHash = LibOrder.hashKey(orderLeft); | ||
bytes32 rightOrderKeyHash = LibOrder.hashKey(orderRight); | ||
|
||
address msgSender = _msgSender(); | ||
// TODO: this force me to pass from, do we want it ? |
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 think this case has been introduced when rarible added directPurchase & directAcceptBid.
I think we should enforce maker != address(0)
@@ -478,8 +461,9 @@ abstract contract ExchangeCore is Initializable, ContextUpgradeable, TransferExe | |||
} | |||
} | |||
|
|||
// TODO: can we move this out so we don't need to pass from ? |
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, this event should be emitted in the same function as the change of the variable fills
- Replace ownable by access control in Exchange - Add an admin user (instead of using deployer)
b283be4
into
feat/move-ownable-to-parent
Description
Pass the from == _msgSender() all the way down into ExcangeCore