Skip to content

interep-project/nfts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interep NFTs

Zero knowledge Interep NFTs.

Github license GitHub Workflow test Coveralls Linter eslint Code style prettier Repository top language

This is a simple demo to show how Interep can be used, and it currently allows those in a Github gold group to mint a reputation NFT without having their Ethereum account or token linked to any Web2 identity.


Install

Clone this repository and install the dependencies:

git clone https://github.com/interep-project/nfts.git
cd nfts
yarn # or `npm i`

Usage

Copy the .env.example file and rename it .env.

Compile

Compile the smart contracts with Hardhat:

yarn compile

Lint

Lint the Solidity or the TypeScript code:

yarn lint:sol
yarn lint:ts
# or yarn lint to lint both.

And check if the code is well formatted:

yarn prettier

Test

Run the Mocha tests:

yarn test

Coverage

Generate the code coverage report:

yarn test:coverage

Report Gas

See the gas usage per unit test and average gas per method call:

yarn test:report-gas

Deploy

Deploy the InterepNFT contract with a valid Interep address:

yarn deploy --interep-address <address>

If you want to deploy contracts in a specific network you can set up the DEFAULT_NETWORK variable in your .env file with the name of one of our supported networks (hardhat, localhost, ropsten, kovan, arbitrum). Or you can specify it as option:

yarn deploy --interep-address <address> --network kovan
yarn deploy --interep-address <address> --network localhost

If you want to deploy the contracts on Ropsten, Kovan or Arbitrum remember to provide a valid private key and an Infura API in your .env file.

Preparing a local network

Run a Hardhat Network in a stand-alone fashion:

yarn start

Deploy an InterepNFT contract:

yarn deploy --interep-address <address> --network localhost

You can omit --network localhost if your DEFAULT_NETWORK env variable is equal to localhost.