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.
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.
To run this code as is:
-
Obtain Infura and Etherscan API Keys.
-
Clone this repo:
git clone https://github.com/VivaRado/NFT-Proof-of-Balance
-
Install:
npm install
-
Create a process.env file and add:
KEY_ETHERSCAN="Your Etherscan Key"
KEY_INFURA="Your Infura Key"
-
Now you can test NFT POB with our Preview NFT:
node app
- open browser at
6006
To run this code with your own NFT and ABI:
-
Find your ABI Contract Address and NFT Contract Address.
- Update
const property
in./routes/api.js
with your ABI Contract Address and NFT Address.
- Update
-
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'
-
...or let axios fetch the ABI on server startup by changing
global.__parse_abi
totrue
in./app.js
.