Skip to content

nle244/NiFTy-Smart-Contract

Repository files navigation

NiFTy-Smart-Contract

Initial recipe borrowed from nft-mix.

Dependencies

Prerequisites

Building

This won't run out of the box. The contracts must be compiled first:

$ brownie compile 

Running

The test run requires WEB3_INFURA_PROJECT_ID and PRIVATE_KEY env vars to execute.

Make a copy of the .env-template file as .env:

$ cp .env-template .env

Store your credentials in the .env file:

# .env
export WEB3_INFURA_PROJECT_ID="your project's ID string" 
export PRIVATE_KEY="your wallet's private key (don't let anyone else see this)"

The brownie-config.yaml file includes an entry that looks for the .env file for credentials. If it doesn't happen automatically for some reason, source the .env file manually:

$ source .env 

Once properly set-up, run main.py to test it out:

$ ./main.py
testing...
Transaction sent: 0x304ad3fb15bb42869de79a61721858eb157d5f4674dac0f796743eabac354c83
  Gas price: 1.000000015 gwei   Gas limit: 2017541   Nonce: 16
  ArtistPicture.constructor confirmed   Block: 9610829   Gas used: 1834129 (90.91%)
  ArtistPicture deployed at: 0x3c16fb87AE40997fC46082B12FDB243F9FA0A564

Transaction sent: 0x247711b1550cf588d46b505ca51e0e6168d441cae51f6630d3a56018c12462c3
  Gas price: 1.000000014 gwei   Gas limit: 279320   Nonce: 17
  ArtistPicture.createCollectible confirmed   Block: 9610830   Gas used: 253928 (90.91%)

Minting complete: https://testnets.opensea.io/assets/0x3c16fb87AE40997fC46082B12FDB243F9FA0A564/<Transaction '0x247711b1550cf588d46b505ca51e0e6168d441cae51f6630d3a56018c12462c3'>

I've pinned a couple of different metadata files to be tested out:

IMPORTANT: .env file

Originally, this subsection contained instructions on how to "ignore" changes to the .env file, referenced from here. Unfortunately, this gets in the way of checking out different branches.

The recommended way as per Git's official documentation (link) is to just not use that feature for untracking config files.

Perform the following actions only if you've followed the instruction that was listed here before.

Undo the --skip-worktree flag:

$ git update-index --no-skip-worktree .env

Make a backup of the exiting .env file if you already have credentials stored there:

$ cp .env .env-bak 

Pull from the repo:

$ git pull

That should've removed your local .env file.

Restore your credentials if you had it backed up:

$ mv .env-bak .env

Diagrams for Future Deliverables

See docs/README.md.

Projected Project Structure

Components Overview

Project structure

Miniting Process

Minting process

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •