Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 2.24 KB

README.md

File metadata and controls

50 lines (31 loc) · 2.24 KB

Preface

NFT Proof of Balance (NFT POB) includes functionality that examines the wallet of a user (via MetaMask) for proof of balance of an NFT and provides the answer to life, the universe, and everything.

Introduction

NFT POB is a nodeJS application that runs on Express, depends on jsonwebtoken, web3, axios. For the templating we use Handlebars, Handlebars.binding and TinyBind, interactivity is handled by JQuery.

To use the code you will need to register accounts in Infura and Etherscan and obtain API Keys.

Usage

Installation:

To run this code as is:

  1. Obtain Infura and Etherscan API Keys.

  2. Clone this repo: git clone https://github.com/VivaRado/NFT-Proof-of-Balance

  3. Install: npm install

  4. Create a process.env file and add:

    • KEY_ETHERSCAN="Your Etherscan Key"
    • KEY_INFURA="Your Infura Key"
  5. Now you can test NFT POB with our Preview NFT:

    • node app
    • open browser at 6006

Configuration:

To run this code with your own NFT and ABI:

  1. Find your ABI Contract Address and NFT Contract Address.

    • Update const property in ./routes/api.js with your ABI Contract Address and NFT Address.
  2. Fetch the ABI(Application Binary Interface) yourself with provided python script:

    • cd to repo ./abi
    • Change the ABI in fetch_abi.sh ABI=0x... with your own ABI Contract Address e.g.: Example Contract Proxy
    • Run fetch_abi.sh sh './fetch_abi.sh'
  3. ...or let axios fetch the ABI on server startup by changing global.__parse_abi to true in ./app.js.

Profile