Links

Freezing & Thawing

Freezing a Collection / Token

In the world of Enjin and blockchain technology, "freezing" refers to the process of temporarily suspending the transferability of a collection or a specific token. This action provides developers and users greater control over the movement of assets, enhancing security and enabling unique use-cases.
One such use-case is the implementation of "Soulbound" tokens. A Soulbound token is bound to a specific address and cannot be transferred out of the wallet it's minted on. This feature can be used to create unique gameplay mechanics, loyalty rewards, and more.
On this page, we will provide you with examples of how to freeze a whole collection or an individual token.

Freezing an entire collection

By freezing a collection, all tokens within that collection will be frozen, meaning they cannot be burned or transferred out of the wallet they're currently in.
Mutation
Response
mutation FreezeCollection{
Freeze(collectionId: 2403, freezeType: COLLECTION ){
id
method
state
}
}
{
"data": {
"Freeze": {
"id": 3,
"method": "Freeze",
"state": "PENDING"
}
}
}
Once the transaction is executed, all tokens within collection ID 2403 will be frozen.

Freezing a single token

Same can be done on a single token instead of the whole collection
Mutation
Response
mutation FreezeToken{
Freeze(
collectionId: 2403,
tokenId:{
integer: 2
},
freezeType: TOKEN.
freezeState: TEMPORARY
){
id
method
state
}
}
{
"data": {
"Freeze": {
"id": 5,
"method": "Freeze",
"state": "PENDING"
}
}
}

Thawing a Collection / Token

Thawing is the opposite of Freezing

Thawing an entire collection

By thawing a collection, all tokens within that collection will be thawed, meaning they can be burned and transferred out of the wallet they're currently in.
Mutation
Response
mutation ThawCollection{
Thaw(collectionId: 2403, freezeType: COLLECTION) {
id
method
state
}
}
{
"data": {
"Thaw": {
"id": 4,
"method": "Thaw",
"state": "PENDING"
}
}
}

Thawing a single token

Same can be done on a single token instead of the whole collection
Mutation
Response
mutation ThawToken{
Thaw(
collectionId: 2403,
tokenId:{
integer: 2
},
freezeType: TOKEN
) {
id
method
state
}
}
{
"data": {
"Thaw": {
"id": 6,
"method": "Thaw",
"state": "PENDING"
}
}
}
© 2023 Enjin Pte. Ltd.