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

feat: move ownable to parent Exchange contract #1163

Merged
merged 6 commits into from
Sep 28, 2023

Conversation

adjisb
Copy link
Contributor

@adjisb adjisb commented Sep 27, 2023

Description

To be able to switch from Ownable to AccessControl we move OwnableUpgradeable
to Exchange.sol (in any case role checking must be done in the parent contract)

  • move OwnableUpgradeable from ExchangeCore and TransferExecutor to non abstract Exchange parent contract
  • convert all the onlyOwner functions in ExchangeCore and TransferExecutor to internal / added calls from initializer instead of setting values.
  • added the setters onlyOwner in Exchange
  • remove getHashKey
  • removed failing and unused mock contracts ExchangeSimple.sol and ExchangeSimple1.sol

To be able to switch from Ownable to AccessControl we move OwnableUpgradeable
    to Exchange.sol (in any case role checking must be done in the parent contract)

- move OwnableUpgradeable from ExchangeCore and TransferExecutor to non abstract Exchange parent contract
- convert all the onlyOwner functions in ExchangeCore and TransferExecutor to internal / added calls from initializer instead of setting values.
- added the setters onlyOwner in Exchange
- remove getHashKey
- removed failing and unused mock contracts ExchangeSimple.sol and ExchangeSimple1.sol
@adjisb adjisb requested a review from a team as a code owner September 27, 2023 17:27
@adjisb adjisb requested review from mvanmeerbeck and atkinsonholly and removed request for a team September 27, 2023 17:27
Copy link
Contributor

@atkinsonholly atkinsonholly left a comment

Choose a reason for hiding this comment

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

See query on init

/// @param order to generate the hashkey
/// @dev this function is a helper for the backend
/// @return hash of order
function getHashKey(LibOrder.Order memory order) external pure returns (bytes32) {
Copy link
Contributor

Choose a reason for hiding this comment

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

getHashKey is used by the backend

@mvanmeerbeck mvanmeerbeck merged commit dc64729 into feat/marketplace-package Sep 28, 2023
3 of 5 checks passed
@mvanmeerbeck mvanmeerbeck deleted the feat/move-ownable-to-parent branch September 28, 2023 09:13
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.

3 participants