当前位置:网站首页>NFT smart contract release, blind box, public offering technology practice -- jigsaw puzzle
NFT smart contract release, blind box, public offering technology practice -- jigsaw puzzle
2022-07-06 07:57:00 【NFT practitioner】
Let's move on to the contract and explain the jigsaw puzzle .
There are two main functions to be realized in jigsaw puzzle :
- How to quickly make a variety of puzzles and meta Information
- How to upload ipfs Interstellar network system ( Test network )
The bill of materials to be prepared before starting is as follows
- OpenSea Test network https://testnets.opensea.io/
- HashLips Group drawing project GitHub - HashLips/hashlips_art_engine: HashLips Art Engine is a tool used to create multiple different instances of artworks based on provided layers.
- ipfs Upload space Pinata | Your home for NFT media
Practical steps
1. from git Upload and download Hashlips project

2. stay vs Open the project program , find main.js in take startCreating Methods 343 Change line to i =0;

3.cd Go to the local path of the project , And then run yarn install, Install related packages
4. After the related packages are successfully installed , Input yarn run build, Build the project locally . After success , as follows :

At this time, five pictures will be generated , Open the directory of project image generation build, See the corresponding five pictures generated

The first red box is five pictures , The second picture is corresponding to five pictures meta Information , Open to see the attributes and weights of the corresponding image , At the same time layers Folder , It will divide the picture into many layers , Random splicing .



5. Then we will config.js As shown in the figure layerConfigurations Change the quantity to 10 Zhang , And then go ahead and do it yarn run build command , After successful execution , Will generate 10 A picture .



6. open Pinata Website , Will just generate 10 Upload pictures .


The success is as follows

7. Then open the code , Replace the text in the green box with cid



8. After the update is successful , And then enter

After success , open json Any file in , notice image The address in is replaced by the one just CID

9. take Json The folder continues to upload the whole package


10 Start making blind box pictures , We from layers Take out a black background picture as the cover of the blind box

11. And then create a new one unpack Folder , Name the picture unpack.png picture , And create a new one unpack.json file , It reads as follows .


In the red box is the picture you just uploaded CID.

12.remix Find the function in the red box , Then put the... In the figure above unpack.json Of CID assignment , Assign to the red input box , At the same time, prefix with **ipfs://,** Then click the button .

13. stay setBaseUrl Set in meta_jsons Of CID, Also prefixed ipfs:// , At the same time, add /, because meta_jsons Is a collection , So add / , Click the button after completion .

Wait for the above transactions confirm after , Then open the ipfs The test network of , This is the time , A black picture will appear , In fact, it is the form of a blind box .

14. Click the function in the red box , The blind box function will be turned on , Wait for the deal to complete , go back to ipfs On , You will see the shape of the blind box you just drew .


The above is the mainstream Nft How to play the blind box , Introduction .
边栏推荐
- A Closer Look at How Fine-tuning Changes BERT
- Three no resumes in the software testing industry. What does the enterprise use to recruit you? Shichendahai's resume
- Notes on software development
- [nonlinear control theory]9_ A series of lectures on nonlinear control theory
- Le chemin du navigateur Edge obtient
- Yu Xia looks at win system kernel -- message mechanism
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
- Codeforces Global Round 19(A~D)
- Comparison of usage scenarios and implementations of extensions, equal, and like in TS type Gymnastics
- Key value judgment in the cycle of TS type gymnastics, as keyword use
猜你喜欢
Comparison of usage scenarios and implementations of extensions, equal, and like in TS type Gymnastics

【T31ZL智能视频应用处理器资料】

"Designer universe" Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers | national economic and Informa
![datax自检报错 /datax/plugin/reader/._drdsreader/plugin.json]不存在](/img/17/415e66d67afb055e94a966de25c2bc.png)
datax自检报错 /datax/plugin/reader/._drdsreader/plugin.json]不存在

The Vice Minister of the Ministry of industry and information technology of "APEC industry +" of the national economic and information technology center led a team to Sichuan to investigate the operat

The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower

解决方案:智慧工地智能巡檢方案視頻監控系統
![07- [istio] istio destinationrule (purpose rule)](/img/be/fa0ad746a79ec3a0d4dacd2896235f.jpg)
07- [istio] istio destinationrule (purpose rule)

Google可能在春节后回归中国市场。

Asia Pacific Financial Media | art cube of "designer universe": Guangzhou community designers achieve "great improvement" in urban quality | observation of stable strategy industry fund
随机推荐
flask返回文件下载
Helm install Minio
让学指针变得更简单(三)
Key value judgment in the cycle of TS type gymnastics, as keyword use
解决方案:智慧工地智能巡检方案视频监控系统
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Launch APS system to break the problem of decoupling material procurement plan from production practice
Webrtc series-h.264 estimated bit rate calculation
合规、高效,加快药企数字化转型,全新打造药企文档资源中心
[count] [combined number] value series
Significance and measures of encryption protection for intelligent terminal equipment
National economic information center "APEC industry +": economic data released at the night of the Spring Festival | observation of stable strategy industry fund
xpath中的position()函数使用
Codeforces Global Round 19(A~D)
[非线性控制理论]9_非线性控制理论串讲
Pre knowledge reserve of TS type gymnastics to become an excellent TS gymnastics master
洛谷P1836 数页码 题解
[nonlinear control theory]9_ A series of lectures on nonlinear control theory
MES, APS and ERP are essential to realize fine production
C # connect to SQLite database to read content
https://www.pinata.cloud/