NiftyPass is a robust and flexible ERC721-based toolkit designed to secure systems using configurable rules centered around NFT ownership. By leveraging the power of Non-Fungible Tokens (NFTs), NiftyPass allows developers to define and manage access control mechanisms, ensuring that only authorized users with specific NFT holdings can interact with certain parts of your application or smart contracts.
- ERC721 Integration: NiftyPass is built on the ERC721 standard, ensuring compatibility with a wide range of NFT marketplaces and wallets.
- Configurable Rulesets: Define complex access control rules based on NFT ownership, including:
- OwnsCount: Requires a user to own a minimum number of NFTs from a specified collection.
- OwnsId: Requires a user to own a specific NFT by its token ID.
- OwnsCountOf: Requires a user to own a certain number of NFTs from a list of specified token IDs.
- Ruleset Management: Create, modify, and remove rulesets with ease. Each ruleset is represented by an NFT, granting the bearer authority to administer it.
- Access Control Modifiers: Ensure that only authorized owners can modify rulesets and rules.
- Event Emissions: Track changes and actions within the contract through emitted events for transparency and off-chain integrations.
- Foundry: A blazing-fast toolkit for Ethereum development.
- Solidity ^0.8.0: Ensure your environment supports Solidity version 0.8.0 or higher.
- OpenZeppelin Contracts: Utilized for secure and community-vetted implementations of ERC721 and other standards.
-
Clone the Repository
git clone https://github.com/yourusername/NiftyPass.git cd NiftyPass
-
Install Dependencies
NiftyPass relies on Foundry and OpenZeppelin Contracts. Install them using Foundry's package manager.
forge install OpenZeppelin/openzeppelin-contracts
Compile the smart contracts using Forge:
forge build
Run the test suite:
forge test
Deploy the NiftyPass
contract using Foundry scripts:
forge script script/Deploy.s.sol:Deploy --rpc-url <your_rpc_url> --private-key <your_private_key>
Replace <your_rpc_url>
with your Ethereum network URL and <your_private_key>
with your Ethereum private key.
TODO