• Stars
    star
    153
  • Rank 241,935 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created about 3 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A suite of tools for NFT generative art.

nftool

Tests

A suite of tools for NFT generative art.

Features

  • Metadata
    • Generate ERC-721 and ERC-1155 compatible metadata
  • Traits/Attributes/Properties Generation
    • Configure custom rarity
    • Generate collection attributes configuration file
    • Merge collections
    • Shuffle collection
    • Find collisions between collections
  • Image Generation
    • Generate images from collection description
    • Generate images in parallel
    • Generate only missing images (if you delete a few images from the output folder)
  • Rarity
    • Generate traits rarity
    • Generate collection rarity
  • Provenance
    • Generate provenance
  • OpenSea
    • Update metadata of collection

Install

Homebrew on Macos

brew install alephao/formulae/nftool

Using Go

go install github.com/alephao/nftool@latest

Or clone the repository, change to the root folder and run go install.

Manually

Download the binary from the releases page and move it to your bin path like /usr/local/bin.

Getting Started

To get started, install nftool following the instructions above and cd to the examples folder in this repo.

You can always use nftool help [command] to see all the documentatio and all the options of a command.

First generate the configuration file from the layers folders.

mkdir -p out
nftool traits dump --layers ./layers --out ./out/config.yaml

You can open config.yaml and play around with the rarity weights, and optional configuration.

Then generate a collection from the config.yaml

nftool traits make --amount 10 --config ./out/config.yaml --out ./out/collection.json

Now we can use the collection.json to generate the images. Run the following commands:

mkdir -p ./out/images
nftool img gen --width 300 --height 300 --collection ./out/collection.json --config ./out/config.yaml --out ./out/images

We can also generate rarity reports for traits (which trait is more rare and how many times it shows up) and the collection rarity rank.

# Generate traits rarity report
nftool rarity traits --collection ./out/collection.json --out ./out/traits_rarity.json

# Generate collection rarity rank report
nftool rarity collection --collection ./out/collection.json --out ./out/collection_rarity.json

To generate the provenance for this collection it's easy:

nftool provenance --images ./out/images --out ./out/provenance.json --startingIndex 2

Note: the startingIndex should be a number smaller than the total amount of items in the collection and it's usually generated on-chain.

Now we need to generate the actual metadata that we'll upload to IPFS (or another storage service).

	mkdir -p ./out/metadata
	# Generate ERC-721 metadata
	nftool metadata --collection ./out/collection.json --config ./out/config.yaml --out ./out/metadata

Note: if you want to generate the metadata following the erc-1155 convention for the id/file-name, add the flag --erc1155

Check out the output in ./out/metadata/1. If you want to change anything, you can do so by editing the values in ./out/config.yaml.

Documentation

Link to the generated docs

Contributing

  • For requests and questions, please open an issue.
  • PRs accepted.

Releasing

To release a new version

git tag vx.x.x
git push origin vx.x.x
goreleaser release --rm-dist  

License

MIT Β© Aleph Retamal

More Repositories

1

solidity-benchmarks

Benchmarks of popular contract implementations in solidity
Solidity
103
star
2

erc721-batch-transfer

Transfer multiple ERC721 tokens in a single transaction
Solidity
39
star
3

CoreMLExample

An example of CoreML using a pre-trained VGG16 model
Swift
37
star
4

LLSpinner

The easiest way to handle a simple full screen activity indicator in iOS. Written in Swift.
Swift
37
star
5

nft-sale-proxy

A proxy to hide NFT metadata during the sale and prevent people from sniping specific NFTs.
Go
26
star
6

swift-rlp

Recursive Length Prefix encoding written in Swift
Swift
24
star
7

Stencil-CLI

Render a Stencil template by using a JSON or Yaml data source
Swift
17
star
8

solcery

Solidity code generation tool
Python
14
star
9

Reginald

Automate your pull-request review
TypeScript
13
star
10

StaticMulticall

EVM Multicall for view-only functions
Solidity
11
star
11

hevm

Easy to use Hevm cheatcodes contract
Solidity
11
star
12

solidity-genetics-benchmark

Solidity
9
star
13

lalainc-xcassetscop

Enforce configurations on Xcode assets
Ruby
8
star
14

tia-crawler

Gem para acessar os dados do TIA Mackenzista
Ruby
8
star
15

solidity-template

Opinionated solidity starter template with too many tools
TypeScript
7
star
16

xcode-ios-template

iOS project template: no storyboard, no scene delegate, no xcodeproj, no boilerplate, yes xcodegen, yes swiftformat, yes useful scripts.
Python
6
star
17

obk-ios

Our Big Kitchen iOS App for Volunteers
Swift
5
star
18

alephao.github.io

My personal website
HTML
5
star
19

swift-http-types-htmx

swift-http-types extensions for htmx
Swift
4
star
20

bitrise-step-s3-cache-push

A bitrise step to store your cache in a s3 bucket.
Go
4
star
21

homebrew-formulae

Collection of Homebrew Formulae
Ruby
4
star
22

genzin

Swift boilerplate generator for Rx + MVVM
Ruby
4
star
23

indepth

Swift
4
star
24

scholarship

Swift
3
star
25

nft-sale-proxy-examples

Makefile
3
star
26

3d-titan-tiki-contracts

Ethereum smart contracts of the Titan Tiki 3D collection
Solidity
3
star
27

minimal-watch-contract

JavaScript
3
star
28

tutorial-appstore-snapshot

Swift
3
star
29

macos-packer-anka

Packer templates for building macOS images with Anka
Makefile
3
star
30

brazilian-utils-elixir

Utilities library for Brazilian Businesses
Elixir
2
star
31

Margherita

An example of Bazel used in an iOS/Swift project
Swift
2
star
32

CoindarAPI

A wrapper around the Coindar API
Swift
2
star
33

Reginald-tests

JavaScript
2
star
34

coindar-ios

Swift
2
star
35

discuss-elixir-phoenix

Example elixir-phoenix project
Elixir
2
star
36

Loteria

Platform to generate lottery contracts in Ethereum
HTML
2
star
37

obk-web

CSS
2
star
38

smsmarketing

smsmarketing site
CSS
2
star
39

evm-poller

Poll a range of block numbers from an evm node every x seconds
Go
2
star
40

forgery-lib-test-issue

Solidity
1
star
41

gitstatus

Swift
1
star
42

cacheutil

Go
1
star
43

cryc

TypeScript
1
star
44

itsallaboutgenetics

Solving the traveling salesman problem with a genetic algorithm, written in TypeScript
TypeScript
1
star
45

defi-bindings

Go
1
star
46

spaceship-enterprise

CSS
1
star
47

govhack

Swift
1
star
48

bitrise-step-s3-cache-pull

a bitrise step to download your cache from a s3 bucket.
Go
1
star
49

gatsby-starter

Gatsby starter focused on developer productivity
JavaScript
1
star
50

flappy

Swift
1
star