Unpause a token
Method
Type
Description
Requirement
Methods
//Create the token unpause transaction and specify the token to pause
TokenUnpauseTransaction transaction = new TokenUnpauseTransaction()
.setTokenId(tokenId);
//Freeze the unsigned transaction, sign with the pause key, submit the transaction to a Hedera network
TransactionResponse txResponse = transaction.freezeWith(client).sign(pauseKey).execute(client);
//Request the receipt of the transaction
TransactionReceipt receipt = txResponse.getReceipt(client);
//Obtain the transaction consensus status
Status transactionStatus = receipt.status;
System.out.println("The transaction consensus status is: " +transactionStatus);
//v2.2.0//Create the token unpause transaction, specify the token to pause, freeze the unsigned transaction for signing
const transaction = new TokenUnpauseTransaction()
.setTokenId(tokenId);
.freezeWith(client);
//Sign with the pause key
const signTx = await transaction.sign(pauseKey);
//Submit the transaction to a Hedera network
const txResponse = await signTx.execute(client);
//Request the receipt of the transaction
const receipt = await txResponse.getReceipt(client);
//Get the transaction consensus status
const transactionStatus = receipt.status;
console.log("The transaction consensus status " +transactionStatus.toString());
//v2.2.0Last updated