'How to set price for all NFTs in a collection on opensea?

If I mint a collection of n items on my own address (via smart contract) , it'll be publicly visible on my account under the collected / created section like this .

The problem is that , in order to complete the listing I must manually set the price of each NFT individually. Obviously this is not practical , since I cannot set the price of every NFT one by one manually , not to mention that every time a listing is completed (by setting the price) , gas fee has to be paid.

Therefore I want to be able to achieve setting the price programatically such that after minting , the collection looks like this.

I tried to approach this problem via OpenSea-Creatures SDK (which uses Truffle) , but Im not sure if their sales-contract can achieve this. (I couldn't get it to run either).

I know this question is very generic but I've been looking for a solution for a while and I haven't found anything helpful.

Any guidance in the right direction would be of tremendous help!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source