Create Immortal Spore
In this recipe, we'll show you how to use the Spore SDK to create immortal spores that are indestructible and can live on-chain indefinitely.
What is an Immortal Spore?
The Immortal
extension enhances the properties of spores, making them indestructible and live on the blockchain indefinitely. Here's what you need to know:
To create an immortal spore, we need to add the
immortal
parameter to theprops
of thecreateSpore
when creating the spore.If a spore's
SporeData.contentType
includesimmortal=true
, the Immortal extension is activated.
Create Immortal Spores
Ingredients
createSpore
function from@spore-sdk/core
.SporeData.contentType
property
Methods
There are two ways to activate the immortal
extension when creating a spore.
Specify in the
contentTypeParameters
object as follows
Use the
setContentTypeParameters
function
In both methods, we pass the immortal: true
parameter as part of the contentTypeParameters
when creating the spore. This activates the Immortal extension, ensuring that your spore remains indestructible and lives forever on-chain.
What's Next?
Now that you’ve mastered creating Immortal Spores using the Spore SDK, explore further and experiment with different parameters and functions offered by the Spore SDK to enhance your creations!
Last updated