[Feature]: Allow an existing collection on sugar deploy
AlexITC opened this issue · comments
Feature
Recently, I had to mint NFTs from a candymachine but these tokens had to be linked to an existing collection, unfortunately, Sugar does not allow this as it creates a collection when creating a candymachine.
sugar deploy --collection <ADDRESS>
could deploy cache items into candy machine config on-chain (taking an existing collection.
Ideal solution or implementation
sugar deploy
could work without a collection.json
, right now, the command supports two cases:
- The candymachine already exists, in which case, it proceeds with deploy.
- The candymachine does not exists, in this case, the cli expects that
collection.json
/collection.png
are present, which are used for creating a new collection.
It would be ideal to support a 3rd case, where the candymachine does not exists but we don't want a new collection to be created.
Alternative solutions or implementations
I had to create a candymachine using the js sdk to later proceed with sugar deploy
, while this works, it isn't ideal.
Other context
No response
sugar collection set
This is a workaround but it isn't ideal, a collection needs to be minted first so that the candy machine gets assigned to another collection later.
The only way I'm aware to create a candy machine with an existing collection is to use the js sdk for that.
Ref: https://github.com/metaplex-foundation/sugar/blob/main/src/deploy/process.rs#L117