Freezing Tokens
The Token Freezing/Unfreezing mechanism allows governance actors, such as Private Network Operators, to restrict the movement of tokens across nodes for specific participants.
It works across multiple token standards (ERC20, ERC721, ERC1155) and validates the compliance enforcement layer of Rayls using
- Token Freezing per participant or globally.
- Teleporting arbitrary messages across Rayls Nodes via resource-linked smart contracts.
- Permission enforcement, including revert logic on unauthorised transfers.
How to use
1 Freeze → Revert → Unfreeze (ERC20)
Scenario:
The operator freezes the token erc721ResourceId for RN A and erc1155ResourceId for RN B
await tokenRegistry.freezeToken(erc721ResourceId, [chainIdA]); // for A
await tokenRegistry.freezeToken(erc1155ResourceId, [chainIdB]); // for B
Outcome:
All attempts to send messages for the frozen tokens from the two RNs fail as expected, which validates the universal freeze.
- Freeze for All Participants
Scenario:
The operator freezes a token, for example an ERC20, across all RNs.
const chainIds = await participantStorage.getAllParticipantsChainIds();
await tokenRegistry.freezeToken(resourceId, chainIds);
for (const chainId of chainIds) {
await expect(arbitraryMessagesPlX.batchTeleport(...)).to.be.rejected;
Outcome:
All attempts to send messages fail as expected, which validates the universal freeze.
Updated 11 days ago
