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

Airdrop #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,47 @@ To remove all the tokens from the created .csv file from the sale, run the scrip
```sh:no-line-numbers
npm run delist
```

## 🔥 Burn NFTs

To burn tokens from your collection, follow these steps:

1. Ensure your `COLLECTION_ID` is set correctly in the `.env` file.
2. Update the `collection_717.csv` file with the token IDs you want to burn. The price column is not used for burning, so you can leave it as is.
3. Run the burn script:

```sh:no-line-numbers
npm run burn
```

This will burn all the tokens listed in the CSV file from your collection.

## 🔄 Transfer NFTs

To transfer tokens to multiple addresses, follow these steps:

1. Ensure your `COLLECTION_ID` is set correctly in the `.env` file.
2. Update the `collection_717.csv` file with the token IDs you want to transfer.
3. Create or update the `addresses.csv` file with the recipient addresses, one per line.
4. Run the transfer script:

```sh:no-line-numbers
npm run transfer
```

This will transfer the tokens listed in `collection_717.csv` to the addresses in `addresses.csv`. If there are more tokens than addresses, the script will cycle through the addresses, distributing tokens evenly.

### Transfer Script Features:
- Progress bar to show transfer status
- Detailed logging of each transfer
- Error handling and reporting
- Saves failed transfers to `error_log.csv` for review

Note: Ensure you have sufficient balance to cover the transaction fees for all transfers.

## ⚠️ Important Notes

- Always double-check your CSV files before running burn or transfer scripts to avoid unintended actions.
- Keep your `SUBSTRATE_SEED` secure and never share it.
- Make sure the amount of tokens you want to transfer is divisible by the amount of addresses you want to transfer to so they can be divided evenly.
- For large collections, consider running the scripts in smaller batches to manage gas fees and reduce the risk of timeouts.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@
"scripts": {
"build": "node substrate/build-csv.js",
"sell": "node substrate/selling.js",
"delist": "node substrate/delist.js"
"delist": "node substrate/delist.js",
"burn": "node substrate/burn.js",
"transfer": "node substrate/Transfer.js"
},
"dependencies": {
"@polkadot/keyring": "^13.1.1",
"@polkadot/util": "^13.1.1",
"@unique-nft/accounts": "^0.3.6",
"@unique-nft/sdk": "0.7.7",
"@unique-nft/utils": "0.3.20",
"axios": "^1.7.2",
"dotenv": "^16.1.4"
}
}
Loading