All Projects → fukuball → rarity-analyser

fukuball / rarity-analyser

Licence: other
Cool Rarity is an open source package for easy rarity score calculation with ERC721 NFT metadata collection. It was born in punkscape 01 rarity analyser hackathon.

Programming Languages

javascript
184084 projects - #8 most used programming language
EJS
674 projects
CSS
56736 projects

Projects that are alternatives of or similar to rarity-analyser

Artion-Server
Artion API Server
Stars: ✭ 26 (-68.29%)
Mutual labels:  nft, erc721
Awesome NFTs
A curated collection about NFTs - by bt3gl
Stars: ✭ 42 (-48.78%)
Mutual labels:  nft, erc721
opensea-arb-nft20
🧸 💸 Detects arbitrage opportunities for ERC-721 tokens between OpenSea and NFT20.
Stars: ✭ 42 (-48.78%)
Mutual labels:  nft, erc721
opensea-scraper
Scrapes nft floor prices and additional information from opensea. Used for https://nftfloorprice.info
Stars: ✭ 129 (+57.32%)
Mutual labels:  nft, erc721
ethereum-dex
Decentralized exchange implementation for the 0xcert protocol on the Ethereum blockchain.
Stars: ✭ 18 (-78.05%)
Mutual labels:  nft, erc721
nft-contracts
Open-source NFT contracts used by buildship.dev
Stars: ✭ 60 (-26.83%)
Mutual labels:  nft, erc721
niftygate
Drop-in Access Control via NFT Ownership
Stars: ✭ 61 (-25.61%)
Mutual labels:  nft, erc721
Nix
Nix - NFT Decentralised Exchange Smart Contracts
Stars: ✭ 40 (-51.22%)
Mutual labels:  nft, erc721
Simple-Game-ERC-721-Token-Template
🔮 Very Simple ERC-721 Smart Contract Template to create your own ERC-721 Tokens on the Ethereum Blockchain, with many customizable Options 🔮
Stars: ✭ 83 (+1.22%)
Mutual labels:  nft, erc721
lootloose.com
LootLoose lets you unbundle your Loot Bags into individual item NFTs or rebundle items into their original Loot Bags.
Stars: ✭ 33 (-59.76%)
Mutual labels:  nft, erc721
nft-swap-sdk
Ethereum's missing p2p NFT and token swap library for web3 developers. Written in TypeScript. Powered by 0x.
Stars: ✭ 200 (+143.9%)
Mutual labels:  nft, erc721
solana-nft-monitor
Monitor Solana NFT projects using Github Actions + flatgithub.com
Stars: ✭ 31 (-62.2%)
Mutual labels:  nft
dungeons-and-dragons-nft
#chainlink #nft
Stars: ✭ 583 (+610.98%)
Mutual labels:  nft
enjin-cpp-sdk
Enjin Platform SDK for C++.
Stars: ✭ 15 (-81.71%)
Mutual labels:  nft
NFT-Dapp-Boilerplate
A highly scalable NFT and DEFI boilerplate with pre added web3 and different wallets with a focus on performance and best practices
Stars: ✭ 51 (-37.8%)
Mutual labels:  nft
Artion-Client
Client app for Artion, a global NFT marketplace on Fantom Opera.
Stars: ✭ 71 (-13.41%)
Mutual labels:  nft
fnd-docs
Foundation developer docs
Stars: ✭ 33 (-59.76%)
Mutual labels:  nft
jsartoolkitNFT
jsartolkitNFT is a smaller version of jsartoolkit5 with only NFT support
Stars: ✭ 110 (+34.15%)
Mutual labels:  nft
metaboss
The Metaplex NFT-standard Swiss Army Knife tool.
Stars: ✭ 575 (+601.22%)
Mutual labels:  nft
etherscan-python
A minimal, yet complete, python API for Etherscan.io.
Stars: ✭ 335 (+308.54%)
Mutual labels:  erc721

Cool Rarity

Cool Rarity is an open source package for easy rarity score calculation.

Cool Rarity was born in a Hackathon hosted by PunkScape, made with love by Fukuball. It is easy to configure for developers and easy to use for users, any ERC721 NFT collection with OpenSea metadata stardard can use Cool Rarity as the rarity score calculation tool. If you have the collection metadata in hand, you can depoly Cool Rarity as your collection rarity tool in minues!

Here's the demo:

Prerequisites

Cool Rarity was built using Node.js, so you have to install:

  • Node.js (v14.x)
  • NPM

I personally use Yarn and NVM, so you can consider install them too:

  • Yarn
  • NVM

Run Cool Rarity locally

Step 1: Clone from GitHub

$ git clone https://github.com/fukuball/rarity-analyser.git

Step 2: Configure collection data

You should have the collection metadata on hand, or you can use the default collection.json provided by Cool Rarity, be sure your collection metadata is formated like the default collection.json.

Put your collection metadata json file (all token metadata in one json file!) in config folder, the same location as the default collection.json, then open the config.js in the folder, modify it for your collection.

Here's the content of config.js:

{
    app_name: 'Cool Rarity',
    app_description: 'A cool rarity tool.',
    collection_file_name: 'collection.json',
    collection_contract_address: '0x5537d90a4a2dc9d9b37bab49b490cf67d4c54e91',
    collection_name: '10k One Day Punks',
    collection_description: '10k "One Day I\'ll Be A Punk"-punks – a homage to the one and only CryptoPunks. Holding a OneDayPunk will give you early access to PunkScapes and reserve a profile on the PunkScape website.',
    sqlite_file_name: 'database.sqlite',
    ga: 'G-BW69Z04YTP',
    main_og_image: 'https://onedaypunk-rarity-tool.herokuapp.com/images/og.png'
}
  • app_name: You can name your rarity app here.
  • collection_file_name: Your NFT collection metadata file name, the metadata file you put in config folder.
  • collection_contract_address: Your NFT collection smart contract address, will use to show the "View on OpenSea" link.
  • collection_name: Your NFT collection name.
  • sqlite_file_name: SQLite database file name, no need to change.
  • ga: If you want to use Google Analytic, then change to your code.
  • main_og_image: You can set default open graph image here.

Step 3: Install package

$ yarn install

When package installed, postinstall script will be tiggered, and the ./cmd/rarity_analyze.js will run for the first install. This will take some time for the rarity score calculation. (generally in minues)

Final Step: Run

$ DEBUG=rarity-analyser:* yarn start-dev

Then open: http://localhost:3000/ on your web browser. Yes! Now you see the rarity website of your NFT collection!

Extra

You can generate collection-rarities.json file by using this command:

yarn rarity-output-json

The collection-rarities.json file will store in config folder.

Deploy to Heroku

Step 1: Prerequisites

Step 2: Login and Create App

In your Cool Rarity folder:

$ heroku login
$ heroku create your_app_name

Final Step: Deploy

$ git push heroku main

If you have any update want to deploy to Heroku, just use this final step to deploy to Heroku.

Use One Click Heroku Deploy

Here you can deploy this rarity tool to Heroku in one click, just be sure you have the Heroku account.

Deploy

Tasks

Hackathon Tasks

  • The app lets the deployer configure a collection json file like this one: collection.json
  • Take all metadata items and analyse their attributes.
  • Derive a rarity score for each attribute of each NFT item. Example: Property "Type", Attribute "Ape"; 24 of 10000 have this attribute/property combination; rarity_score = 1/(24/10000) = 416.67
  • Derive a rarity score for each NFT in the collection. The rarity score for each NFT is the sum of all attributes.
  • Account for missing trait_types of an NFT.
  • Account for the trait_count of an NFT.
  • Calculate the Rarity Score for each token (SUM of all rare trait attributes / missing traits / trait counts).
  • Compute and store a collection-rarities.json file which can be exported for use elsewhere for the given collection.

Additional Tasks

  • Search by ID and sort by rarity or ID.
  • Put OpenSea link and offlicial site link.
  • Endpoint of JSON rarity data for every punk.
  • Test with other ERC721 collection metadata.
  • Matrix page.
  • Similarity analysis, create one page to show top 12 similar for every punk.

Other Rarity Tools

Our Friends (One Day Punk) - Also making cool tools!

Other

Support

Thanks to [PunkScape](https://punkscape.xyz) Community for this initiative.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].