Skip to main content

Freezing & Thawing

"Freezing" refers to the process of temporarily suspending the transferability of a collection or a specific token.

This action provides you 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.

Note, freezing only applies to transfers, which also results in marketplace listings being unpurchasable.
Freezing does not suspend token minting.

Freeze States

A freeze state determines whether a token can be transferred and the conditions under which it remains locked or becomes transferrable. This feature enables token creators to define unique behaviors and restrictions for their assets, supporting scenarios like enhanced security, gameplay mechanics, or compliance needs.

Explanation of Freeze States

  • Permanent:
    The token is permanently frozen and cannot be transferred to another account under any circumstances. Use this state for tokens that are intended to stay bound to their original holder, such as "Soulbound" tokens for identity or loyalty purposes.

  • Temporary:
    The token is temporarily frozen, restricting transfers until it is explicitly thawed by the collection owner. This state is ideal for implementing time-limited restrictions or conditional asset movement.

  • Never:
    The token is always transferrable and cannot be frozen. Choose this state if you want the token to remain unrestricted in its movement across wallets and platforms.

What you'll need:
  • Some Enjin Coin on Enjin Matrixchain to pay for Transaction Fees.
    You can obtain cENJ (Canary ENJ) for testing from the Canary faucet.
  • An Enjin Platform Account.
  • A Collection and a Token to freeze.

There are two ways to Freeze / Thaw:

  1. Using the Enjin Dashboard
  2. Using the GraphQL API & SDKs

Option A. Using the Enjin Dashboard

Note: Applying Freeze/Thaw Actions to Collections and Tokens

This tutorial illustrates the process of freezing a collection.
However, the same steps can be applied to freeze or thaw tokens.
Simply navigate to the corresponding menu for tokens instead of collections, or for thawing instead of freezing.

Freezing an entire collection

In the Platform menu, navigate to "Collections".
Locate the collection you wish to freeze, click the 3 vertical dots () to it's right, then click the "Freeze" button.

Freezing a Collection

Choose the freeze state, and click on the "Freeze" button.

Freeze Collection Form

The Transaction Request will then appear in the "Transactions" menu.

Freeze Collection Transaction Request Banner

Pending Freeze Collection Transaction Request

Since this request requires a Transaction

, it'll need to be signed with your Wallet.

  • If a Wallet Daemon is running and configured, the transaction request will be signed automatically.
  • If a wallet is connected such as the Enjin Wallet or Polkadot.js, the transaction must be signed manually by clicking the "Sign" button and approving the signature request in your wallet.

Option B. Using the Enjin API & SDKs

Freezing a Collection or Token

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.

Freezing an entire collection

Use the Freeze mutation and the freezeType: COLLECTION argument to freeze a collection.

mutation FreezeCollection{
Freeze(
collectionId: 36105 #Specify the collection ID
freezeType: COLLECTION #For collection freezing
){
id
method
state
}
}

Once the transaction is executed, all tokens within the specified collection will be frozen.

Freezing a single token

Use the Freeze mutation and the freezeType: TOKEN argument to freeze a token.

mutation FreezeToken{
Freeze(
collectionId: 36105 #Specify the collection ID
tokenId:{integer: 0} #Specify the token ID
freezeType: TOKEN #For token freezing
freezeState: TEMPORARY #Select the freeze state
){
id
method
state
}
}

Once the transaction is executed, the specified token will be frozen.

Thawing a Collection or Token

Thawing a collection means allowing all tokens within that collection to be active again, so they can be transferred or burned as desired, removing the restrictions that kept them locked in a particular wallet.

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.

Use the Thaw mutation and the freezeType: COLLECTION argument to thaw a collection.

mutation ThawCollection{
Thaw(
collectionId: 36105 #Specify the collection ID
freezeType: COLLECTION #For collection thawing
){
id
method
state
}
}

Once the transaction is executed, all tokens within the specified collection will be thawed.

Thawing a single token

Use the Thaw mutation and the freezeType: TOKEN argument to thaw a token.

mutation ThawToken{
Thaw(
collectionId: 36105 #Specify the collection ID
tokenId:{integer: 0} #Specify the token ID
freezeType: TOKEN #For token thawing
) {
id
method
state
}
}

Once the transaction is executed, the specified token will be thawed.

Explore More Arguments

For a comprehensive view of all available arguments for queries and mutations, please refer to our API Reference. This resource will guide you on how to use the GraphiQL Playground to explore the full structure and functionality of our API.

For instance, you'll find settings such as continueOnFailure to skip data that would cause the whole batch to fail, or the ability to sign using a managed wallet with the signingAccount argument.

Need to send a transaction request to user's wallet?

This can be done using Enjin Platform API & WalletConnect!
To learn more, check out the Using WalletConnect page.