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.
sp = algod_client.suggested_params()# Create a config transaction that wipes the# reserve address for the assettxn = transaction.AssetConfigTxn( sender=acct1.address, sp=sp, manager=acct1.address, reserve=None, freeze=acct1.address, clawback=acct1.address, strict_empty_address_check=False,)# Sign with secret key of managerstxn = txn.sign(acct1.private_key)# Send the transaction to the network and retrieve the txid.txid = algod_client.send_transaction(stxn)print(f"Sent asset config transaction with txid: {txid}")# Wait for the transaction to be confirmedresults = transaction.wait_for_confirmation(algod_client, txid, 4)print(f"Result confirmed in round: {results['confirmed-round']}")
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