https://github.com/jbx-protocol/juice-ownable
https://github.com/jbx-protocol/juice-ownable
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jbx-protocol/juice-ownable
- Owner: jbx-protocol
- Created: 2022-11-30T23:05:38.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T18:31:32.000Z (over 2 years ago)
- Last Synced: 2025-10-23T06:58:09.989Z (9 months ago)
- Language: Solidity
- Size: 69.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Juice Ownable
A Juicebox variation upon [OpenZeppelin Ownable](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol) to allow for more seamless Ownable support for projects, changes from the regular Ownable are:
- Ability to transfer ownership to a JB Project instead of a harcoded address
- Ability to grant users/contracts permission to call OnlyOwner methods using `JBOperatorStore`
- Includes the `JBOperatable` modifiers with support for [OpenZeppelin `Context`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Context.sol) to allow for (optional) meta-transaction support
All features are backwards compatible with OpenZeppelin Ownable, this should be a drop-in replacement.
## Contracts
This repo contains 2 contracts, which one should you use:
### JBOwnable
Does your contract not have any Ownable/access controls yet, use JBOwnable.
### JBOwnableOverride
Does your contract extend a contract that you can't easily modify (ex. it comes from a package manager) and that contract inherits from OpenZeppelin Ownable? Use JBOwnableOverride.
__NOTICE: Only use JBOwnableOverride if you are overriding OpenZeppelin Ownable v4.7.0 or higher, otherwise JBOperatorStore functionality for `onlyOwner` will not work.__