metaplex-foundation / sugar

Candy Machine Rust CLI.
Apache License 2.0
198 stars 112 forks source link

Adds SDrive as upload backend #462

Closed robbestad closed 11 months ago

robbestad commented 11 months ago

Add SDrive as a new backend for upload. Sdrive is a service on top of Shadow Drive that makes effortless to upload images and metadata by providing an API endpoint rather than making the user go to hoops to create a storage account and have SHDW in their wallet.

It requires the user to have an API key from https://sdrive.app and API credits, and this PR makes sure the user is asked for their private key when they set up their mint.

The files are stored on immutable Shadow Drive storage accounts.

I did a test launch https://www.solaneyes.com/address/ACeieWp9RkUoBZR4dAGTDWPkDJNT5RmMy3TH7VhfDNnE?cluster=devnet and a test mint https://solana.fm/address/ChHQTxBEFAhasJR5DgS7jpNaUpcwzi8McMHC2wDW7KG2?cluster=devnet-solana

using the test collection at Metaplex docs.

You need an API key to test with. I've loaded this key with some credits fe312b8f7f25af5e22af64d1599c7261 (good for 100 uploads). Alternatively, register an account at sdrive.app and let me know and I'll provide API credits to the account.

The benefit of this solution over centralized solutions such as AWS is that you only pay once (and not much) and don't have to keep a bucket alive forever, plus the metadata and images are stored permanently on Solana native, decentralized storage.