• Stars
    star
    153
  • Rank 243,368 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created about 3 years ago
  • Updated about 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

swift-http-types-htmx

swift-http-types extensions for htmx
Swift
17
star
8

Stencil-CLI

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

solcery

Solidity code generation tool
Python
14
star
10

Reginald

Automate your pull-request review
TypeScript
13
star
11

StaticMulticall

EVM Multicall for view-only functions
Solidity
11
star
12

hevm

Easy to use Hevm cheatcodes contract
Solidity
11
star
13

solidity-genetics-benchmark

Solidity
9
star
14

lalainc-xcassetscop

Enforce configurations on Xcode assets
Ruby
8
star
15

tia-crawler

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

solidity-template

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

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
18

obk-ios

Our Big Kitchen iOS App for Volunteers
Swift
5
star
19

alephao.github.io

My personal website
HTML
5
star
20

swift-htmx

HTMX extensions for swift-http-types and swift-html
Swift
4
star
21

bitrise-step-s3-cache-push

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

homebrew-formulae

Collection of Homebrew Formulae
Ruby
4
star
23

genzin

Swift boilerplate generator for Rx + MVVM
Ruby
4
star
24

indepth

Swift
4
star
25

scholarship

Swift
3
star
26

nft-sale-proxy-examples

Makefile
3
star
27

3d-titan-tiki-contracts

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

minimal-watch-contract

JavaScript
3
star
29

tutorial-appstore-snapshot

Swift
3
star
30

macos-packer-anka

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

swift-sacoge

Swift static assets codegen form swift web servers
Swift
2
star
32

swift-plumbing

Swift
2
star
33

swift-sacoge-hummingbird

Hummingbird middleware for swift-sacoge
Swift
2
star
34

brazilian-utils-elixir

Utilities library for Brazilian Businesses
Elixir
2
star
35

Margherita

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

CoindarAPI

A wrapper around the Coindar API
Swift
2
star
37

Reginald-tests

JavaScript
2
star
38

coindar-ios

Swift
2
star
39

discuss-elixir-phoenix

Example elixir-phoenix project
Elixir
2
star
40

Loteria

Platform to generate lottery contracts in Ethereum
HTML
2
star
41

obk-web

CSS
2
star
42

smsmarketing

smsmarketing site
CSS
2
star
43

evm-poller

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

forgery-lib-test-issue

Solidity
1
star
45

gitstatus

Swift
1
star
46

cacheutil

Go
1
star
47

cryc

TypeScript
1
star
48

itsallaboutgenetics

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

defi-bindings

Go
1
star
50

spaceship-enterprise

CSS
1
star
51

govhack

Swift
1
star
52

bitrise-step-s3-cache-pull

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

gatsby-starter

Gatsby starter focused on developer productivity
JavaScript
1
star
54

flappy

Swift
1
star