Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wbhob/roles-framework
Programmatic ERC20- and/or ERC721-gated roles in Solidity with mutable and immutable options.
https://github.com/wbhob/roles-framework
Last synced: 8 days ago
JSON representation
Programmatic ERC20- and/or ERC721-gated roles in Solidity with mutable and immutable options.
- Host: GitHub
- URL: https://github.com/wbhob/roles-framework
- Owner: wbhob
- License: mit
- Created: 2021-09-20T21:15:05.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-20T21:24:02.000Z (over 3 years ago)
- Last Synced: 2024-12-01T13:48:57.458Z (2 months ago)
- Language: CSS
- Size: 6.32 MB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ฆนโโ๏ธ๐งโ๐๐จโ๐ Roles Framework ๐งโโ๏ธ๐ง๐ธ
Programmatically define user roles based on live blockchain data. You can set thresholds based on ERC-20 or ERC-721 balances, and mix and match to custom-gate certain functions in Soldity or your favorite web app.
## Getting Started
See `packages/hardhat/RolesFramework.sol` for the deployable implementations of the IRolesFramework interface. In `packages/hardhat/RolesFrameworkBase.sol`, the core logic and interfaces are defined, so you can use those to design your own smart contracts or web apps to consume Roles Framework.
## Testing
In `packages/hardhat/deploy/00_deploy_your_contract.js`, set the address to your own wallet address to try the mutable version.
Run `yarn` to install dependencies. Then, in three separate terminal windows, run the following commands:
```
yarn chain
``````
yarn compile
yarn deploy
``````
yarn start
```This will start a local blockchain, compile and deploy the contracts, and start the React app to start testing the contract.
For more info on how to use this repository, check out [scaffold-eth](https://github.com/scaffold-eth/scaffold-eth)
## Contributing
PR's and issues welcome! All contributions are subject to MIT license. If you want to help and don't know how to get started, open an issue!
## License
The license for this repository can be found in [LICENSE](./LICENSE).