Hey everyone, I’m trying to set up several NFT collections for a single wallet address. But I’m running into a problem where the collections are overwriting each other. I’m using the standard nft-collection.fc file and its TypeScript wrapper.
Two main questions:
How does TON generate the collection address?
What changes do I need to make to create a new NFT collection with a distinct address?
I’ve looked at the default file, but I’m not sure what to modify. Any help would be appreciated! I’m new to this and want to make sure I’m doing it right. Thanks in advance for any advice you can offer!
hey elias! cool project youre working on. ive been playing around with nfts on ton too. from what i understand, the collection address is generated based on the initial data and code of the contract. so to get different addresses, you gotta change something in that initial setup for each collection.
have you thought about adding a unique identifier to each collection? like maybe a collection ID or timestamp? that could do the trick. or you could try messing with the content URI for each one.
just curious, what kind of nfts are you making? sounds interesting with multiple collections. are they for different themes or something?
let us know how it goes! im still learning too, so its always fun to hear about other peoples projects and solutions.
I’ve faced a similar issue when setting up multiple NFT collections. The key is in the contract deployment process. TON generates collection addresses based on the initial data and code. To create distinct addresses, you need to modify the initial data for each collection. One approach is to include a unique identifier in the collection’s content URI or royalty parameters. This changes the initial state, resulting in different addresses. Alternatively, you can add a ‘salt’ parameter to your deploy function and pass a unique value for each collection. Remember to update your TypeScript wrapper to accommodate these changes. It’s crucial to test thoroughly on testnet before deploying to mainnet. Hope this helps point you in the right direction!
hey elias87, i’ve dealt with this before. the trick is to tweak the initial data for each collection. try adding a unique identifier to the content URI or royalty params. this’ll give you different addresses for each collection. just remember to update your typescript wrapper too. good luck with your project!