Closed luisrovirac closed 1 year ago
Do you have the collection.json
and collection.png
files in your assets folder?
Yes, I have the collection.json and collection.png files in assets folder
This is not an bug!.
Solution: I added in my assets directory 2 files: collection.json and collection.png
and ready!
Content example of collection.json based on https://docs.metaplex.com/developer-tools/sugar/guides/preparing-assets:
{
"name": "Faces Collection",
"symbol": "SAX",
"description": "Collection of 3 faces on the blockchain.",
"image": "collection.png",
"attributes": [],
"properties": {
"files": [
{
"uri": "collection.png",
"type": "image/png"
}
]
}
}
While collection.png must be an image alluding to the collection
(for test it can be anything called collection.png)
I'm not sure, but it seems that for this version it is mandatory to add collection in the assets directory, it was optional before. In sugar-2.1.1/src/deploy/process.rs there is this condition: // collection_item could be missing when args.collection_mint is provided let collection_item = if let Some(collection_item) = cache.items.get_mut("-1") { Some(collection_item) } else { match args.collectionmint { Some() => None, // existing collection provided None => return Err(anyhow!("Missing collection item in cache")), } };
Thanks for the excellent product.
@luisrovirac having a collection was optional on Candy Machine V2 (Sugar <= 1.2) but is mandatory on Candy Machine V3 (Sugar 2.0+).
Issue description
When creating a Candy Machine with sugar-cli 2.1.1 it does not perform the step sugar deploy, Error running command (re-run needed): Missing collection item in cache
Relevant log output
Priority this issue should have
High (immediate attention needed)