Mass listing on Unique Market
These scripts are for those who already minted an extensive NFT collection and want to list a lot of tokens on the Unique Market. It can help you put NFTs up for sale quickly without manually signing every transaction.
⚙️ Step-1: Setting up environment
- You will need node.js, git, and Visual Studio Code installed on your computer. If you haven't worked with git, node, and npm before, we recommend reading our brief guide to configure your environment.
- Download this project and open it in Visual Studio Code, click
- Create a file named
.envin the root directory of your project and copy the contents from the
.env.examplefile into it.
- In the .env set
SUBSTRATE_SEEDwith a 12-words mnemonic secret phrase of the NFTs owner. Set
COLLECTION_IDwith the id of your collection. Remember to save the file!
- Install dependencies. Open VS Code built-in terminal by clicking
New Terminal. In the terminal window that appears, enter the command:
❗️ Keep your secrets, such as SUBSTRATE_SEED, safe, and do not commit them to version control! We have added .env to the .gitignore file for this purpose.
In this step, your project should resemble the screenshot below:
📄 Step-2: Get your NFTs list
Create a .csv file with a list of tokens that belong to you. Run in terminal:
npm run sub-build
After executing the script, the
collection_123.csv file will be created in the root of the project with the contents:
All your tokens from the specified collection are registered in the table. All tokens have a default price of 1. Change these prices to your liking and save the file. Prices are expected to be written without decimals, so 1 in the price cell means 1 000 000 000 000 000 000 in a contract.
Set the desired price for the tokens you want to list on Unique Market and remove all the tokens you don't want to sell.
We set tokens 1, 2, 9, and 10 for sale here. Tokens 1 and 2 will be listed for 300 UNQ. Tokens 9 and 10 for 500 UNQ
🎁 Step-3: List your NFTs for sale
To put up for sale all the tokens in the created .csv file for the price specified in the file, run the script:
npm run sub-sell
It will take some time, and in the end, you will see your tokens listed for sale on Unique Market.
To remove all the tokens from the created .csv file from the sale, run the script
npm run sub-delist