metaplex-foundation / sugar

Candy Machine Rust CLI.
Apache License 2.0
203 stars 116 forks source link

[Feature]: Airdrop - enhance mint multiple to read recipients from json file #311

Closed MarkSackerberg closed 1 year ago

MarkSackerberg commented 2 years ago

Feature

There is currently no good public nft airdrop solution out there. It would be great to add one to sugar since most of the required implementation has already been done.

Ideal solution or implementation

Improve the sugar mint multiple -r <wallet> Command to accept a json file containing a list of wallets.

e.g. sugar mint multiple -n 5 --recipient-list wallets.json the wallet.json could just be an array of wallets.

Alternative solutions or implementations

It would be even nicer if sugar would keep track of the transactions and create some kind of cache file with failed transactions or would update the json file with a parameter that the mint tx for that wallet went through. This would allow an easier restart in case of failed transactions:

{
{wallet:<pubkey1>, success: false}, // tx failed /not run yet
{wallet:<pubkey2>, success: true},
}

Other context

Discussed with Sam and Daeshawn already on twitter https://twitter.com/samvwaal/status/1556803472191737856?s=21&t=2Qt0093gpg0yXmAVTEbpQw

maestroh1git commented 2 years ago

Yes, this would be amazing!