Skip to content

Planet Giant Backend: Batch Mint & Smart-contracts | Cronos+Moralis Hackathon 09/2022

Notifications You must be signed in to change notification settings

meed-limited/Planet-Giant_Contracts

Repository files navigation

Planet Giant - Backend (Batch Mint & Smart Contracts)

Cronos & Moralis Hackathon - 09/2022



Stargazers Issues MIT License



Preview

Note

This backend has been built with the game Planet-Giant for the Cronos & Moralis Hackathon - August-September 2022.

The entire project is divided in 3 parts. Here are the links to all the different github repos:

Description

This backend cover 2 parts:

  • Batch mint: node.js code to allow the NFT's images and attributes to be generated and stored on IPFS.
  • Smart-contracts: NFTs and Marketplace smart-contract to mint NFTs and sell/buy them on the dedicated marketplace.

Built With

  • solidity
  • hardhat
  • ethers.js
  • typescript
  • node.js
  • prettier
  • ESLint

Installation

Make sure you have the following ready:

  • node.js installed (developped on LTS v16.16.0)
  • typescript installed (developped on v4.7.4)
  • yarn installed
  • MetaMask (or any web3 compatible wallet) installed in your browser

Once your config is ready, create a new repo, open your favorite code editor, and clone the repo with the following cmd:

git clone https://github.com/shamrockstudios/Planet-Giant_Contracts.git .

Install all package dependancies by running:

yarn install

Generate the NFT attributes & save them on IPFS:

  1. Navigate in:
cd src
  1. Then edit the file image.js to match your content, then run:
node image.js
  1. Finally edit the file metadata.js (don't forget to edit the IPFS image path with the newly generated one), and run:
node matadata.js

Deploy your smart-contract

Go back to the root folder by typing:

cd ..

Now you'll have to edit a few file:

  • The deployment script in scripts\deploy.ts with your data (or even better create a .env file);
  • The NFT_minter contract in contract\NFT_minter.sol with your own IPFS path;
  • The hardhat.config.ts file depending on which network you want to deploy your NFT collection. Once you're ready, simply run:
yarn deploy

And let the magic do its thing!



A BIG THANKS TO MORALIS, CRONOS AND THEIR RESPECTIVE TEAMS !!!

⭐️ ...and don't forget to leave a star if you like it! ⭐️

(back to top)

About

Planet Giant Backend: Batch Mint & Smart-contracts | Cronos+Moralis Hackathon 09/2022

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published