Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jbx-protocol/juice-ownable
https://github.com/jbx-protocol/juice-ownable
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jbx-protocol/juice-ownable
- Owner: jbx-protocol
- Created: 2022-11-30T23:05:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T18:31:32.000Z (11 months ago)
- Last Synced: 2024-04-14T01:04:08.654Z (7 months ago)
- Language: Solidity
- Size: 69.3 KB
- Stars: 1
- Watchers: 2
- 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 supportAll 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.__