Giter VIP home page Giter VIP logo

nftlabs-protocols's Introduction

NFTLabs Protocol

NFTLabs lets anyone create and sell packs filled with rewards. A pack can be opened only once. On opening a pack, a reward from the pack is distributed to the pack opener.

Deployments: Access Packs contracts

The contracts in the /contracts directory are deployed on the following networks.

Mumbai

Test helper contracts

Mumbai

Run Locally

Clone the project

  git clone https://github.com/nftlabs/pack-protocol.git

Install dependencies

  yarn install

Run tests and scripts

Add a .env file to the project's root directory. Update the .env file with the values mentioned in the provided .env.example file.

Run tests

  npx hardhat test

To use scripts, update the transaction parameters in the particular script (e.g. packId in scripts/txs/openPack.ts) and run e.g -

  yarn run openPack --network {network name}

Deploying contracts

To deploy this project on a given network (e.g. mumbai) update the hardhat.config.ts file with the following

// ...
if (testPrivateKey) {
  config.networks = {
    mumbai: createTestnetConfig("mumbai"),
  };
}

To deploy the entire protocol, run

  yarn run deploy-protocol --network {network name}

To deploy Pack.sol and Market.sol as individual modules, run e.g.

  yarn run deploy-pack --network {network name}

Finally, update the README.md files with the new addresses, which can be found in utils/addresses.json.

Verify contracts on Etherscan / Polygonscan

To verify the entire protocol, run

  yarn run verify-protocol --network {network name}

To verify individual modules like Pack.sol, run

  yarn run verify-pack --network {network name}

Feedback

If you have any feedback, please reach out to us at [email protected].

Authors

License

GPL v3.0

nftlabs-protocols's People

Contributors

adam-maj avatar atbe avatar furqanrydhan avatar jakeloo avatar nkrishang 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.