Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions Choice_Lions_Bash/Queen_IFe_Bash/ColoredPet.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
pragma solidity ^0.6.6;
import "github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.4/contracts/token/ERC721/ERC721.sol";

//this contract inherits ERC721
contract ColoredPet is ERC721 {
uint256 public tokenCounter;


//constructor for an ERC721 is a name and symbol
constructor () public ERC721 ("ColoredPets", "COLOREDPET"){
tokenCounter = 0;
}

//a token url is a ipfs url
//after we mint the token we are going to return the id of the token
function createNFT(string memory tokenURI) public returns (uint256) {

//get number from token counter
uint256 newNFTTokenId = tokenCounter;

//safely mint token for the person that called the function
_safeMint(msg.sender, newNFTTokenId);

//set the token uri of the token id of the uri passed
_setTokenURI(newNFTTokenId, tokenURI);

//increment the counter
tokenCounter = tokenCounter + 1;

//return the token id
return newNFTTokenId;
}

}
Binary file added Choice_Lions_Bash/Queen_IFe_Bash/ManNft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions Choice_Lions_Bash/Queen_IFe_Bash/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Choice <> Lions NFT Bash

## Creating, Deploying and Minting NFT contract using python

### TECHNOLOGIES USED

1. METAMASK
2. PINATA
3. Python

### REQUIREMENTS

4. METAMASK EXTENSION ON CHROME BROWSER
5. PRIVATE_KEY FROM YOUR METAMASK WALLET
6. Python3.10
7. Pinata CID

### DEPENDENCIES

8. npm install requirements.txt
Loading