Skip to content

Commit 1cb744e

Browse files
feat: update asset freeze example
1 parent 2d92015 commit 1cb744e

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

projects/typescript-examples/algokit-utils-ts/transactions/transacton-types.ts

+13-4
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,20 @@ async function assetTransactionTypes() {
127127
// example: ASSET_CLAWBACK_TRANSACTION
128128

129129
// example: ASSET_FREEZE_TRANSACTION
130+
/**
131+
* Create a unsigned asset freeze transaction freezing an asset with asset id 1234
132+
*
133+
* Parameters for freezing an asset:
134+
* - sender: The address of the account that will send the transaction
135+
* - assetId: The ID of the asset
136+
* - account: The account to freeze or unfreeze
137+
* - frozen: Whether the assets in the account should be frozen
138+
*/
130139
await algorand.createTransaction.assetFreeze({
131-
sender: randomAccountA, // Must be the freeze address
132-
assetId: 123n, // ID of the asset to freeze/unfreeze
133-
account: randomAccountB, // Account to freeze/unfreeze
134-
frozen: true, // Whether the assets should be frozen
140+
sender: randomAccountA,
141+
assetId: 1234n,
142+
account: randomAccountB,
143+
frozen: true,
135144
})
136145
// example: ASSET_FREEZE_TRANSACTION
137146

0 commit comments

Comments
 (0)