Skip to content

Latest commit

 

History

History
119 lines (77 loc) · 3.26 KB

File metadata and controls

119 lines (77 loc) · 3.26 KB

Fractional NFTs Smart Contract

Overview

This directory contains the source code and documentation for the Fractional NFTs smart contract. The Fractional NFTs contract enables the fractionalization of Non-Fungible Tokens, allowing users to own and trade fractions of high-value NFTs.

Fractional NFTs Contract Features

  • Supported Networks: Mumbai Testnet (Polygon)
  • Fractionalization: Enable users to own fractions of NFTs
  • Governance: Governance token for decision-making
  • Liquidity Pool: Facilitate trading of fractionalized NFTs

Smart Contract Details

  • Contract Name: fNFT.sol
  • Network: Mumbai Testnet (Polygon)
  • Version: 1.0.0

Table of Contents

  1. Getting Started
  2. Usage
  3. Testing
  4. Examples

Getting Started

To deploy and interact with the fractionalNFTs smart contract, follow the steps below:

Prerequisites

Ensure you have the following tools installed:

Helpful, but optional:

Why Ganache, Infura, and MetaMask?

Ganache is a personal blockchain for Ethereum development, providing a local blockchain environment. Infura offers a scalable and reliable Ethereum and IPFS infrastructure. MetaMask is a popular Ethereum wallet and browser extension.

Installation

Clone with HTTPS:

# Clone the repository with HTTPS.
git clone https://github.com/kevalsayar/SmartContracts.git

Clone with SSH:

# Clone the repository with SSH.
git clone git@github.com:kevalsayar/SmartContracts.git

Navigate to the project directory

cd SmartContracts/fractionalNFTs

Install dependencies

$ npm install

Configuration

Environment Variables:

Create a new file named .env in the root of the project. Copy the variable names from the example.env file and populate their values in the .env file.

Usage

Deploying Contracts

  • Compile Contracts

    $ truffle compile --all
    
  • Migrate Contracts

    Deploy the fractionalNFTs smart contract to the Binance Smart Chain:

    $ truffle migrate --network <Network Name>
  • Verify & Publish Contracts

    $ truffle run verify <Contract Name> --network <Network Name>
    

Testing

Run tests to ensure the fractionalNFTs contract behaves as expected:

$ truffle test

The test suite includes comprehensive tests to validate the functionality and behavior of the fractionalNFTs smart contract. Ensure all tests pass before deploying the contract in a production environment.

Examples

Please see the Official Truffle Documentation for guides, tips, and examples