免费自动批量生成NFT图片和批量部署NFT
一、环境准备
1.注意:需合理上网
2.准备素材:准备一套多个属性元素的不一样的图层素材,比如10张背景图、10张face图、10张眼睛图层、10张头发图层等,每张图特性不一样,像素大小一样 ,比如500*500,背景透明,这样就可以随机组合1万+张nft图片;
素材样例下载地址:https://pan.baidu.com/s/1l9hjeZbn0Lmwbzc5qUQqgw
提取码: f6ks
3.本教程提供2两种方式,一种是平台网站无代码方式,一种是开源项目代码方式
二、平台网站无代码方式
推荐使用mintables
1. mintables
地址:https://www.mintables.club/projects
特点:免费、用户体验较好、性能好
2. nft-generator.art
地址:https://nft-generator.art/
特点:专业、用户体验好、100张内免费但有水印
3. autominter
地址:https://www.autominter.com/projects
特点:免费、用户体验较差、性能较差
三、开源项目代码方式
推荐使用hashlips_art_engine
1. nft-art-generator
代码地址:https://github.com/NotLuksus/nft-art-generator
npm install -g nft-art-generator
Usage nft-generate [–save-config] [–load-config filename]
Options
- save-config: saves all entered values to a config.json file, which
gets used in future runs - load-config: loads values from a specific json config file
文件结构需调整如下
YOUR_PROJECT/
├─ images/
│ ├─ trait1_name/
│ │ ├─ file1.png
│ │ ├─ file2.png
│ │ ├─ file3.png
│ │ ├─ ...
│ ├─ trait2_name/
│ │ ├─ file4.png
│ │ ├─ file5.png
│ │ ├─ ...
│ ├─ trait3_name/
│ │ ├─ file6.png
│ │ ├─ ...
│ ├─ ...
2. hashlips_art_engine
配置代码
代码地址:https://github.com/HashLips/hashlips_art_engine
git clone https://github.com/HashLips/hashlips_art_engine.git
cd hashlips_art_engine
yarn install
# 或者
# npm install
调整代码配置
const layerConfigurations = [
{
growEditionSizeTo: 100,
layersOrder: [
{ name: "Head" },
{ name: "Mouth" },
{ name: "Eyes" },
{ name: "Eyeswear" },
{ name: "Headwear" },
],
},
];
const layerConfigurations = [
{
// Creates up to 50 artworks
growEditionSizeTo: 50,
layersOrder: [
{ name: "Background" },
{ name: "Head" },
{ name: "Mouth" },
{ name: "Eyes" },
{ name: "Eyeswear" },
{ name: "Headwear" },
],
},
{
// Creates an additional 100 artworks
growEditionSizeTo: 150,
layersOrder: [
{ name: "Background" },
{ name: "Head" },
{ name: "Eyes" },
{ name: "Mouth" },
{ name: "Eyeswear" },
{ name: "Headwear" },
{ name: "AlienHeadwear" },
],
},
];
执行命令自动生成nft图片
npm run build
或者
node index.js
批量上传到ipfs网络
使用ipfs官方提供的上传工具ipfs-desktop
https://github.com/ipfs/ipfs-desktop/releases
执行智能合约自动部署NFT
智能合约代码地址:
https://github.com/HashLips/solidity_smart_contracts/blob/main/contracts/NFT/NFT.sol
批量导入到OpenSea
用部署返回的智能合约地址,在OpenSea选导入功能
在OpenSea售卖NFT
先操作售卖一个 ,同时用工具录入操作脚本,然后用脚本自动执行重复的操作;
一键批量Sell NFT工具:Macro Recorder实现在Opensea自动销售NFT作品;
视频资料
详细操作参考视频