Skip to content

Commit 76de057

Browse files
authored
another overhaul (metaplex-foundation#337)
* another overhaul - added backend signing for a single metadata id - some small refactoring - extracted upload from the CLI (maybe will do the same with other methods) * optimized logging in the CLI - logging now has levels - added more readme content * eslint update
1 parent ac56799 commit 76de057

File tree

15 files changed

+641
-506
lines changed

15 files changed

+641
-506
lines changed

.editorconfig

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ indent_style = space
66
indent_size = 2
77
end_of_line = lf
88
insert_final_newline = true
9-
trim_trailing_whitespace = true
9+
trim_trailing_whitespace = true
10+
11+
[*.rs]
12+
indent_size = 4

js/packages/cli/README.md

+67-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,73 @@
1-
2-
Format
3-
4-
* Folder with files named from 0-1.png
5-
* JSON file with attributes, format
6-
- Array with indices matching images
7-
- Contains: title, description and array of traits ({"display_type":"number","trait_type":"generation","value":2})
8-
1+
# Candy Machine!
92

103
Install dependencies
114
```
12-
yarn
5+
yarn
136
```
147

158

9+
## usage
10+
```shell
11+
metaplex upload /path/to/assets -e devnet --keypair /path/to/admin-payer -n 3
12+
metaplex create_candy_machine -e devnet --keypair /path/to/admin-payer --price 1.5
13+
metaplex set_start_date -e devnet --keypair /path/to/admin-payer
14+
metaplex mint_one_token -e devnet --keypair /path/to/user-payer
15+
```
16+
17+
## assets folder
18+
* Folder with file pairs named from with growing integer numbers starting from 0.png and 0.json
19+
* the image HAS TO be a `PNG`
20+
* JSON format can be checked out here: https://docs.metaplex.com/nft-standard. example below:
21+
```json
22+
{
23+
"name": "Solflare X NFT",
24+
"symbol": "",
25+
"description": "Celebratory Solflare NFT for the Solflare X launch",
26+
"seller_fee_basis_points": 0,
27+
"image": "https://www.arweave.net/abcd5678?ext=png",
28+
"animation_url": "https://www.arweave.net/efgh1234?ext=mp4",
29+
"external_url": "https://solflare.com",
30+
"attributes": [
31+
{
32+
"trait_type": "web",
33+
"value": "yes"
34+
},
35+
{
36+
"trait_type": "mobile",
37+
"value": "yes"
38+
},
39+
{
40+
"trait_type": "extension",
41+
"value": "yes"
42+
}
43+
],
44+
"collection": {
45+
"name": "Solflare X NFT",
46+
"family": "Solflare"
47+
},
48+
"properties": {
49+
"files": [
50+
{
51+
"uri": "https://www.arweave.net/abcd5678?ext=png",
52+
"type": "image/png"
53+
},
54+
{
55+
"uri": "https://watch.videodelivery.net/9876jkl",
56+
"type": "unknown",
57+
"cdn": true
58+
},
59+
{
60+
"uri": "https://www.arweave.net/efgh1234?ext=mp4",
61+
"type": "video/mp4"
62+
}
63+
],
64+
"category": "video",
65+
"creators": [
66+
{
67+
"address": "SOLFLR15asd9d21325bsadythp547912501b",
68+
"share": 100
69+
}
70+
]
71+
}
72+
}
73+
```

js/packages/cli/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"bn.js": "^5.2.0",
2626
"commander": "^8.1.0",
2727
"form-data": "^4.0.0",
28+
"loglevel": "^1.7.1",
2829
"node-fetch": "^2.6.1"
2930
},
3031
"devDependencies": {

0 commit comments

Comments
 (0)