Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minting additional NFTs based on the same candy machine #2313

Open
aininot260 opened this issue Apr 27, 2024 · 0 comments
Open

minting additional NFTs based on the same candy machine #2313

aininot260 opened this issue Apr 27, 2024 · 0 comments

Comments

@aininot260
Copy link

I use the following config file for sugar-cli to create the initial candy machine:

{
  "tokenStandard": "nft",
  "number": 1,
  "symbol": "BT",
  "sellerFeeBasisPoints": 500,
  "isMutable": true,
  "isSequential": true,
  "creators": [
    {
      "address": "6RUTVyNyQDD6f8PN3qZuWdnSGBTTpHnfJ5MkxLgBjvdD",
      "share": 100
    }
  ],
  "uploadMethod": "bundlr",
  "ruleSet": null,
  "awsConfig": null,
  "sdriveApiKey": null,
  "nftStorageAuthToken": null,
  "shdwStorageAccount": null,
  "pinataConfig": null,
  "hiddenSettings": {
    "name": "$ID$",
    "uri": "$ID$",
    "hash": "E7WvYNKsCctJSt6dbcQYQmTp3pNCzP1M"
  },
  "guards": null,
  "maxEditionSupply": null
}

the "hash" in "hiddenSettings" is random generated.
The asserts folder contain the following files:

 0.json
 0.png
collection.json
collection.png

The 0.json shows that:

{
    "name": "Number #0001",
    "symbol": "BT",
    "description": "abcdefg This is the number 1/10.",
    "seller_fee_basis_points": 500,
    "image": "0.png",
    "attributes": [
        {"trait_type": "Layer-1", "value": "0"},
        {"trait_type": "Layer-2", "value": "0"}, 
        {"trait_type": "Layer-3", "value": "0"},
        {"trait_type": "Layer-4", "value": "1"}
    ],
    "properties": {

        "files": [{"uri": "0.png", "type": "image/png"}]
    },
    "collection": {"name": "numbers4", "family": "numbers4"}
}

The collection.json shows that:

{
    "name": "Number #0000",
    "symbol": "BT",
    "description": "abcdefg12345 This is the number 1/10.",
    "seller_fee_basis_points": 500,
    "image": "collection.png",
    "attributes": [
        {"trait_type": "Layer-1", "value": "0"},
        {"trait_type": "Layer-2", "value": "0"}, 
        {"trait_type": "Layer-3", "value": "0"},
        {"trait_type": "Layer-4", "value": "1"}
    ],
    "properties": {
        
        "files": [{"uri": "collection.png", "type": "image/png"}]
    },
    "collection": {"name": "numbers4", "family": "numbers4"}
}

The log for 'sugar launch'

[admin@centos-stream-9 extras]$ sugar launch
Starting Sugar launch... 

>>> sugar validate

[1/1] Loading assets
? 
 missing `properties.category` for nft Number #0000, defaulting to image
????? Validating 2 metadata file(s)...

Validation complete, your metadata file(s) look good.

>>> sugar upload

[1/4] Loading assets
Found 2 asset pair(s), uploading files:
+--------------------+
| images    |      2 |
| metadata  |      2 |
+--------------------+

[2/4] Initializing upload
????? Connected

[3/4] Uploading image files 

Sending data: (Ctrl+C to abort)
[00:00:01] Upload successful ??????????????????????????????????????????????? 2/2

[4/4] Uploading metadata files 

Sending data: (Ctrl+C to abort)
[00:00:00] Upload successful ??????????????????????????????????????????????? 2/2

2/2 asset pair(s) uploaded.

>>> sugar deploy


[1/2] Creating collection NFT for candy machine
Collection mint ID: B3sPoCnsB33SpZzqSmxa16jhaM5y4yXgezanv1E1HY8V

[2/2] Creating candy machine
Candy machine ID: 26v2c3uoNp2LyQSaaLH1F2eUz2AfNkMM4pyyxhzbDWTo

Candy machine with hidden settings deployed.

Hidden settings hash: Dm1c2NXJfT46Ph68qk4pg4feJerBYtns

Updating candy machine state with new hash value:

[1/2] Loading candy machine
Candy machine ID: 26v2c3uoNp2LyQSaaLH1F2eUz2AfNkMM4pyyxhzbDWTo
????? Done

[2/2] Updating configuration
????? Update signature: 4wyqRNv5zV3eizP4prWwRTSJaV6n4NujbDcV7gdddGTvqQekC2VphZ7ztp9uJFVxi9zJmiRtqguMdHwVPswVwXiJ

>>> sugar verify

[1/2] Loading candy machine
????? Completed

[2/2] Verification

Hidden settings enabled. No config items to verify.

Verification successful. You're good to go!

See your candy machine at:
  -> https://www.solaneyes.com/address/26v2c3uoNp2LyQSaaLH1F2eUz2AfNkMM4pyyxhzbDWTo?cluster=devnet

Command successful.

The log for 'sugar mint':

[admin@centos-stream-9 extras]$ sugar mint
[1/2] Loading candy machine
Candy machine ID: 26v2c3uoNp2LyQSaaLH1F2eUz2AfNkMM4pyyxhzbDWTo
????? Done

[2/2] Minting from candy machine

Minting to ANSZHujDTya5QsGQBNzgefkUi96DGbsj6rhNrRxRfp9u
????? 1 item(s) remaining
Mint: 5rPEzvXzswgi48XU3AEiypT7K4vhEHSZgS5vAJPio5B4
Signature: 4jd1UfsXqKc1ogNd5gcFe6bUF2v328EpZBiAcFDjqH7EwsSRMiHsdoMkY7C853QDU1uWw????? Mint success

Command successful.

The log for 'sugar reveal':

[admin@centos-stream-9 extras]$ sugar reveal
[1/4] Loading items from the cache
????? Done

[2/4] Getting minted NFTs for candy machine 26v2c3uoNp2LyQSaaLH1F2eUz2AfNkMM4pyyxhzbDWTo
????? Found 1 accounts

[3/4] Matching NFTs to cache values
????? Done

[4/4] Updating NFT URIs from cache values
[00:00:13] Updating NFTs... ???????????????????????????????????????????????? 1/1

Reveal complete!

Command successful.
[admin@centos-stream-9 

Now I can see one collection and one nft in my phontom wallet.
Then I want to append new nft to the same collection.
I append 1.json and 1.png to the asserts folder, the 1.json shows that:

{
    "name": "Number #0002",
    "symbol": "BT",
    "description": "abcdefg This is the number 2/10.",
    "seller_fee_basis_points": 500,
    "image": "1.png",
    "attributes": [
        {"trait_type": "Layer-1", "value": "0"},
        {"trait_type": "Layer-2", "value": "0"}, 
        {"trait_type": "Layer-3", "value": "0"},
        {"trait_type": "Layer-4", "value": "2"}
    ],
    "properties": {

        "files": [{"uri": "1.png", "type": "image/png"}]
    },
    "collection": {"name": "numbers4", "family": "numbers4"}
}

I update the config.json to modify "number": 1 to "number": 2
Then I run 'sugar config update'
The log for 'sugar config update'

[admin@centos-stream-9 extras]$ sugar config update
[1/2] Loading candy machine
Candy machine ID: 26v2c3uoNp2LyQSaaLH1F2eUz2AfNkMM4pyyxhzbDWTo
????? Done

[2/2] Updating configuration
????? Update signature: 2QQpkMQg7nLoxsverq41xXJoqF7YkQ8QqTqVaPrVdBNUxUvmTj38eKbH4sZst7iqHWfXBDJFA5uUHgb8zousN85u

Command successful.

and run 'sugar launch':

[admin@centos-stream-9 extras]$ sugar launch
Starting Sugar launch... 

>>> sugar validate

[1/1] Loading assets
? 
 missing `properties.category` for nft Number #0001, defaulting to image
 missing `properties.category` for nft Number #0002, defaulting to image
????? Validating 3 metadata file(s)...

Validation complete, your metadata file(s) look good.

>>> sugar upload

[1/4] Loading assets
Found 3 asset pair(s), uploading files:
+--------------------+
| images    |      1 |
| metadata  |      1 |
+--------------------+

[2/4] Initializing upload
????? Connected

[3/4] Uploading image files 

Sending data: (Ctrl+C to abort)
[00:00:01] Upload successful ??????????????????????????????????????????????? 1/1

[4/4] Uploading metadata files 

Sending data: (Ctrl+C to abort)
[00:00:00] Upload successful ??????????????????????????????????????????????? 1/1

3/3 asset pair(s) uploaded.

>>> sugar deploy

[1/1] Loading candy machine
Candy machine ID: 26v2c3uoNp2LyQSaaLH1F2eUz2AfNkMM4pyyxhzbDWTo

Candy machine with hidden settings deployed.

Hidden settings hash: 53oanTXG1D5vkfYyPn2nfWWqZcKxsFWp

Updating candy machine state with new hash value:

[1/2] Loading candy machine
Candy machine ID: 26v2c3uoNp2LyQSaaLH1F2eUz2AfNkMM4pyyxhzbDWTo
????? Done

[2/2] Updating configuration
????? Update signature: 51hmVf6xy5efyvsHvU2YA7fjipZpJstxZrRZ8mZEJyc2JYsZSM9Zr32ZcT64P5616jumFq8HcRJ9og5dRMe7w3NH

>>> sugar verify

[1/2] Loading candy machine
????? Completed

[2/2] Verification

Hidden settings enabled. No config items to verify.

An item has already been minted. Skipping candy machine collection verification...

Verification successful. You're good to go!

See your candy machine at:
  -> https://www.solaneyes.com/address/26v2c3uoNp2LyQSaaLH1F2eUz2AfNkMM4pyyxhzbDWTo?cluster=devnet

Command successful.

and run 'sugar mint':

[admin@centos-stream-9 extras]$ sugar mint
[1/2] Loading candy machine
Candy machine ID: 26v2c3uoNp2LyQSaaLH1F2eUz2AfNkMM4pyyxhzbDWTo
????? Done

[2/2] Minting from candy machine

Minting to ANSZHujDTya5QsGQBNzgefkUi96DGbsj6rhNrRxRfp9u
????? 1 item(s) remaining
Mint: 4Fxqam1jZCtjJ8euF5u8PcYWgBUZ6JGaRMYZk7ihnVkx
Signature: 2tmfrimdXFuS4UbzqHZwtcndhzdKeo2S3MFE2mRpcB7x8nv9i5ZYf2GTwWFQxBxnGqgPF????? Mint success

Command successful.

and run 'sugar reveal', but it shows error:

[admin@centos-stream-9 extras]$ sugar reveal
[1/4] Loading items from the cache
????? Done

[2/4] Getting minted NFTs for candy machine 26v2c3uoNp2LyQSaaLH1F2eUz2AfNkMM4pyyxhzbDWTo
????? Found 2 accounts

[3/4] Matching NFTs to cache values
????? Done

[4/4] Updating NFT URIs from cache values

Error running command (re-run needed): No URI found for number: 0001

I can see the new nft in my phontom wallet, but it doesn't show the pic. I can't find it by solcan
https://solscan.io/account/4Fxqam1jZCtjJ8euF5u8PcYWgBUZ6JGaRMYZk7ihnVkx?cluster=devnet
but the nft by 0.png can be viewed:
https://solscan.io/account/5rPEzvXzswgi48XU3AEiypT7K4vhEHSZgS5vAJPio5B4?cluster=devnet
The cache.json listed here:

{
  "program": {
    "candyMachine": "26v2c3uoNp2LyQSaaLH1F2eUz2AfNkMM4pyyxhzbDWTo",
    "candyGuard": "",
    "candyMachineCreator": "55LJ4kmpLHwvSjPQyovQmPcBicxWUNuDkBU8jCJ8CBJR",
    "collectionMint": "B3sPoCnsB33SpZzqSmxa16jhaM5y4yXgezanv1E1HY8V"
  },
  "items": {
    "-1": {
      "name": "Number #0000",
      "image_hash": "36ae5333e54b457cedcc6ec93a84970f05ed57452ca9745a0768ed40cd93e5fa",
      "image_link": "https://arweave.net/3W8XZMp5FFMriZR5l6yk68b7aNDirPxWLAMYZgsWWH8?ext=png",
      "metadata_hash": "7a254b5b6f6aca4911df176820fd8f1c8a54c8f83a72bd817de0b172d8741aeb",
      "metadata_link": "https://arweave.net/Clzg3eFyt_1aFqrmTm8THK37mJIfA1SLVWjMvDdSaiA",
      "onChain": true
    },
    "0": {
      "name": "Number #0001",
      "image_hash": "36ae5333e54b457cedcc6ec93a84970f05ed57452ca9745a0768ed40cd93e5fa",
      "image_link": "https://arweave.net/NAywAcJbK6zljtZ0GKZzxBNve6LNjS6F4AaB8ovkpUI?ext=png",
      "metadata_hash": "cf661878417304899e967c8e6b7995671dcdc3f8b518fd5ca9c9ff2e40f10dd4",
      "metadata_link": "https://arweave.net/mZu9bnnGK0FktLJawWssGc8YwlWteEFhSsSzRN-LnSA",
      "onChain": false
    },
    "1": {
      "name": "Number #0002",
      "image_hash": "c30ce4e4cb022932754f6a3da2de91e9da3194bf7dc5426333d596fa4b948e8f",
      "image_link": "https://arweave.net/TMUKGp2nUKsoPhhHWX19NgQoJRzk_ffJu5V6HNqiek4?ext=png",
      "metadata_hash": "8bf89f22337e41ea29f1739b5149fff53e8450d50e1a5cbf9d348287ddffb1bb",
      "metadata_link": "https://arweave.net/ltSSP8We1LgDOtTSRRy-L4JeFZRYBFI89ghLcG_xU3I",
      "onChain": false
    }
  }
}

I wonder why the new nft appended can not work well.
Is there any problem with the above process?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant