This repository provides various utilities to help you build your NFT collection!

Attention! A powerful computer may be required!

About

This repository provides various utilities to help you build your NFT collection:

  • Generate images from source layers / Merge layers in the specified order
  • Generate ERC-721 traits
  • Upload images to IPFS
  • Upload metadata to IPFS

How to generate images

Run the following command: go main.go --generated-image-input=${IMG_DIR} --generated-image-output=${OUTPUT_DIR} --generated-image-length=2048 --generated-image-width=2048 --generated-image-number=100 --generate

Flags

  • generated-image-input - image input directory where the source layers are located (default is input-dir)
  • generated-image-output - image output directory where generated images will be saved here (default is output-dir)
  • generated-image-length - canvas length (default is 2048 px)
  • generated-image-width - canvas width (default is 2048 px)
  • generated-image-number - the number of images to be generated (default is 100 images)

Folders format

To merge layers in the correct order, the input layers directory must be in the following format:

  • input-dir:
    • 01_trait_group
      • trait_name.png
      • trait_name.png
      • trait_name.png
    • 02_trait_group
      • trait_name.png
    • 03_trait_group
      • trait_name.png

How to make some traits more rare than others?

Basically all traits are equal, but you can make one trait more rare than others by adding .silver or .gold postfix to your layer.

  • .silver - makes a trait 2 times less frequent than others
  • .gold - makes a trait 4 times less frequent than others

Example: Let's make some traits more rare than others. Then the directory of input images should have the following structure:

  • input-dir:
    • 01_background
      • ice_cave.gold.png <-- this background will be 4 times less frequent than others
      • pink_city.png
      • heaven.png
    • 02_body
      • aliens.png
      • crab.png
    • 03_head
      • einstein.png
      • aviator.silver.png <-- this background will be 2 times less frequent than others
    • 04_pants
      • green_pants.png
      • safari_pants.png
    • 05_shoes
      • black_sneakers.png
      • yellow_sneakers.png
    • 06_accessories
      • super rare headphones.gold.png <-- this 06_accessorie will be 4 times less frequent than others
      • red headphones.png
      • orange headphones.png
    • 07_etc ...

How to upload images to IPFS/Pinata?

Run the following command: go main.go --ipfs-input=${INPUT_DIRECTORY} --ipfs-output=${IPFS_OUTPUT_DIRECTORY} --ipfs-api-key=${PINATA_KEY} --ipfs-secret-key=${PINATA_SECRET} --ipfs-upload

Flags

  • ipfs-input - input directory / images to upload
  • ipfs-output - output directory / ipfs hash & meatadata will be saved here
  • ipfs-api-key - Pinata API key
  • ipfs-secret-key - Pinata API secret key

Print statistics

Run the following command to print statistics: go main.go --generated-image-output=${IMG_DIR} --ipfs-output=${IPFS_OUTPUT_DIRECTORY} --info

Owner
Igor Savenko
Developer from Ukraine. Python3, C#, Kotlin, Dart, learn Golang. Make tools for Humans :D
Igor Savenko
Similar Resources

Tanzu Framework provides a set of building blocks to build atop of the Tanzu platform and leverages Carvel packaging

Tanzu Framework provides a set of building blocks to build atop of the Tanzu platform and leverages Carvel packaging and plugins to provide users with a much stronger, more integrated experience than the loose coupling and stand-alone commands of the previous generation of tools.

Dec 16, 2022

Build for all Go-supported platforms by default, disable those which you don't want.

bagop Build for all Go-supported platforms by default, disable those which you don't want. Overview bagop is a simple build tool for Go which tries to

Jul 29, 2022

Some utilities for Persian language in Go (Golang)

persian Some utilities for Persian language in Go (Golang). Installation go get github.com/mavihq/persian API .ToPersianDigits Converts all English d

Oct 22, 2022

Assembly syntax that makes you feel like you're writing code in a high-level language.

shasm Assembly syntax that makes you feel like you're writing code in a high-level language. Shasm is not an Assembler. Shasm simply compiles Shasm sy

Jun 5, 2021

The package manager for macOS you didn’t know you missed. Simple, functional, and fast.

The package manager for macOS you didn’t know you missed. Simple, functional, and fast.

Stew The package manager for macOS you didn’t know you missed. Built with simplicity, functionality, and most importantly, speed in mind. Installation

Mar 30, 2022

If you accept that 1 day is 24 hours in some situations, you might want to parse it in Go too.

relaxduration If you accept that 1 day is 24 hours in some situations, you might want to parse it in Go too. This package tries to handle situations w

Dec 7, 2022

Host yo' self from your browser, your phone, your toaster.

Host yo' self from your browser, your phone, your toaster.

A hosting service from the browser, because why not. Try it at hostyoself.com. See it in action Here's an example where I use hostyoself.com to host i

Jan 1, 2023

Easily create & extract archives, and compress & decompress files of various formats

archiver Introducing Archiver 3.1 - a cross-platform, multi-format archive utility and Go library. A powerful and flexible library meets an elegant CL

Jan 7, 2023

Fast conversions across various Go types with a simple API.

Go Package: conv Get: go get -u github.com/cstockton/go-conv Example: // Basic types if got, err := conv.Bool(`TRUE`); err == nil { fmt.Printf("conv.

Nov 29, 2022
🏆 A decentralized layer to support NFT on Mixin Messenger and Kernel.

NFO A decentralized layer to support NFT on Mixin Kernel. This MTG sends back an NFT to the receiver whenever it receives a transaction with valid min

Aug 14, 2022
Gosfdc module - a collection of packages containing the data structures from the various Salesforce APIs and Tools

Gosfdc module - a collection of packages containing the data structures from the various Salesforce APIs and Tools

Jan 21, 2022
James is your butler and helps you to create, build, debug, test and run your Go projects
James is your butler and helps you to create, build, debug, test and run your Go projects

go-james James is your butler and helps you to create, build, debug, test and run your Go projects. When you often create new apps using Go, it quickl

Oct 8, 2022
Gitfofo - A cmdline tool utilized github api which can help you to explore your tech boundaries
Gitfofo - A cmdline tool utilized github api which can help you to explore your tech boundaries

why gitfofo gitfofo is a cmdline tool utilized github api which can help you to explore your tech boundaries, find more interest people in github. The

Nov 21, 2022
Provides a rest API that used to count how many times a certain repository of your github has been cloned.
Provides a rest API that used to count how many times a certain repository of your github has been cloned.

traffic-clones-api An apiserver for https://shields.io/endpoint. Description Provides a rest API that used to count how many times a certain repositor

Dec 19, 2021
Go module that provides primitive functional programming utilities.

Functional Functional provides a small set of pure functions that are common in functional programming languages, such as Reduce, Map, Filter, etc. Wi

Jun 12, 2022
GoThanks automatically stars Go's official repository and your go.mod github dependencies, providing a simple way to say thanks to the maintainers of the modules you use and the contributors of Go itself.
GoThanks automatically stars Go's official repository and your go.mod github dependencies, providing a simple way  to say thanks to the maintainers of the modules you use and the contributors of Go itself.

Give thanks (in the form of a GitHub ★) to your fellow Go modules maintainers. About GoThanks performs the following operations Sends a star to Go's r

Dec 24, 2022
Package buildinfo provides basic building blocks and instructions to easily add build and release information to your app.
Package buildinfo provides basic building blocks and instructions to easily add build and release information to your app.

Package buildinfo provides basic building blocks and instructions to easily add build and release information to your app. This is done by replacing variables in main during build with ldflags.

Nov 14, 2021
Hrple is an easy to use tool to help you create habits
Hrple is an easy to use tool to help you create habits

Hrple is an easy to use tool to help you create habits. This is loosely inspired by the book Atomic Habits by James Clear and techniques or frameworks like Kanban and the Pomodoro Technique.

Jun 2, 2022
Jan 4, 2022