Giter Club home page Giter Club logo

nft-vault-fractionalization-contracts's Introduction

NFT-vault fractionalization package

This package comprises the following tools.

Smart contracts

This branch consists of (simplified versions of) 4 main smart contracts:

  1. SimpleVault.sol -> Collector locks their NFTs. Vault ownership is transferred to successful bidder from the Buyout process.
  2. SimpleMarket.sol -> Collector sells ERC20 Token0s representing the Vault, by accepting ERC20 Token1 as payment. No individual cap.
  3. SimpleMarket2.sol -> Collector sells ERC20 Token0s representing the Vault, by accepting ERC20 Token1 as payment. Has individual cap.
  4. SimpleBuyout.sol -> Anyone can bid for the Vault using ERC20 Token2. Anyone can stake Token0 to prevent the buyout.

All the contracts in this repository have been written in Solidity v0.7.5

UI template

A base template of the user interface.

How to use this repo

Installation and setup

  • Clone this repository

    git clone <repo>

  • cd into the cloned repo

    cd b20-contracts

  • Install dependencies via npm

    npm install

Test and development

  • Open new terminal, run ganache

    ganache-cli

Setup Truffle virtual environment

  • Open new terminal

  • Create a virtual environment

    virtualenv -p python3.7 --no-site-packages ~/truffle-venv

  • Activate the virtual environment

    source ~/truffle-venv/bin/activate

  • Install vyper using pip

    <truffle-venv>pip install vyper

  • Compile the contracts

    <truffle-venv>npm run build

  • Run the tests

    <truffle-venv>npm run test

  • Run the coverage

    <truffle-venv>npm run test-coverage

Note : After test / development, deactivate the virtual environment <truffle-venv>deactivate

nft-vault-fractionalization-contracts's People

Contributors

vii-msundaram avatar value1st-eth avatar

Stargazers

Ben Kimble avatar

Watchers

Vignesh Sundaresan avatar James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.