Hedera
Search…
Unpause a token
A token unpause transaction is a transaction that unpauses the token that was previously disabled from participating in transactions. The token's pause key is required to sign the transaction. Once the unpause transaction is submitted the token pause status is updated to unpause.
Transaction Signing Requirements:
  • The pause key of the token
  • Transaction fee payer account key
Transaction Fees
  • Please see the transaction and query fees table for base transaction fee
  • Please use the Hedera fee estimator to estimate your transaction fee cost
Constructor
Description
new TokenUnpauseTransaction()
Initializes the TokenUnpauseTransaction object
1
new TokenUnpauseTransaction()
Copied!

Methods

V2
Method
Type
Description
Requirement
setTokenId(<tokenId>)
TokenId
The ID of the token to pause
Required
Java
1
//Create the token unpause transaction and specify the token to pause
2
TokenUnpauseTransaction transaction = new TokenUnpauseTransaction()
3
.setTokenId(tokenId);
4
​
5
//Freeze the unsigned transaction, sign with the pause key, submit the transaction to a Hedera network
6
TransactionResponse txResponse = transaction.freezeWith(client).sign(pauseKey).execute(client);
7
​
8
//Request the receipt of the transaction
9
TransactionReceipt receipt = txResponse.getReceipt(client);
10
​
11
//Obtain the transaction consensus status
12
Status transactionStatus = receipt.status;
13
​
14
System.out.println("The transaction consensus status is: " +transactionStatus);
15
//v2.2.0
Copied!
JavaScript
1
//Create the token unpause transaction, specify the token to pause, freeze the unsigned transaction for signing
2
const transaction = new TokenUnpauseTransaction()
3
.setTokenId(tokenId);
4
.freezeWith(client);
5
​
6
//Sign with the pause key
7
const signTx = await transaction.sign(pauseKey);
8
​
9
//Submit the transaction to a Hedera network
10
const txResponse = await signTx.execute(client);
11
​
12
//Request the receipt of the transaction
13
const receipt = await txResponse.getReceipt(client);
14
​
15
//Get the transaction consensus status
16
const transactionStatus = receipt.status;
17
​
18
console.log("The transaction consensus status " +transactionStatus.toString());
19
​
20
//v2.2.0
Copied!
Go
1
//Create the token unpause transaction, specify the token to pause, freeze the unsigned transaction for signing
2
transaction, err := hedera.NewTokenUnpauseTransaction().
3
SetTokenID(tokenId).
4
FreezeWith(client)
5
​
6
if err != nil {
7
panic(err)
8
}
9
​
10
//Sign with the pause key
11
txResponse, err = transaction.Sign(pauseKey).Execute(client)
12
​
13
if err != nil {
14
panic(err)
15
}
16
​
17
//Get the receipt of the transaction
18
receipt, err = txResponse.GetReceipt(client)
19
​
20
if err != nil {
21
panic(err)
22
}
23
​
24
//Get the transaction consensus status
25
status := receipt.Status
26
​
27
fmt.Printf("The transaction consensus status is %v\n", status)
28
​
29
//v2.3.0
Copied!
Copy link
Contents
Methods