Skip to content

bazmatic/NiftyPass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NiftyPass

Overview

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.

Features

  • 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.

Getting Started

Prerequisites

  • 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.

Installation

  1. Clone the Repository

    git clone https://github.com/yourusername/NiftyPass.git
    cd NiftyPass
  2. Install Dependencies

    NiftyPass relies on Foundry and OpenZeppelin Contracts. Install them using Foundry's package manager.

    forge install OpenZeppelin/openzeppelin-contracts

Usage

Building the Project

Compile the smart contracts using Forge:

forge build

Testing

Run the test suite:

forge test

Deploying NiftyPass

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.

Interacting with NiftyPass

TODO

About

Allow access control based on NFT ownership

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published