Updating assets
Authorized by: Asset Manager Account
After an asset has been created only the manager, reserve, freeze and clawback accounts can be changed. All other parameters are locked for the life of the asset. If any of these addresses are set to ""
that address will be cleared and can never be reset for the life of the asset. Only the manager account can make configuration changes and must authorize the transaction.
1 """2 Send an asset config transaction updating four mutable fields of an asset:3 manager, reserve, freeze, clawback. This operation is only possible if the sender is4 the asset manager and the asset has all four mutable fields set.5
6 Parameters for configuring an existing asset.7 - sender: The address of the account that will send the transaction8 - asset_id: ID of the asset9 - manager: The address that can change the manager, reserve, clawback, and freeze addresses, defaults to None10 - reserve: The address that holds the uncirculated supply, defaults to None11 - freeze: The address that can freeze the asset in any account, defaults to None12 - clawback: The address that can clawback the asset from any account, defaults to None13 """14 txn_result = algorand_client.send.asset_config(15 AssetConfigParams(16 sender=account_a.address,17 asset_id=1234,18 manager=account_b.address,19 reserve=account_b.address,20 freeze=account_b.address,21 clawback=account_b.address,22 )23 )
const manager = accounts[1];
const configTxn = algosdk.makeAssetConfigTxnWithSuggestedParamsFromObject({ from: creator.addr, manager: manager.addr, freeze: manager.addr, clawback: manager.addr, reserve: undefined, suggestedParams, assetIndex, // don't throw error if freeze, clawback, or manager are empty strictEmptyAddressChecking: false,});
const signedConfigTxn = configTxn.signTxn(creator.privateKey);await algodClient.sendRawTransaction(signedConfigTxn).do();const configResult = await algosdk.waitForConfirmation( algodClient, txn.txID().toString(), 3);console.log(`Result confirmed in round: ${configResult['confirmed-round']}`);
goal asset config --manager <address> --new-reserve <address> --assetid <asset-id> -d data
See also