use of com.hedera.hashgraph.sdk.TokenPauseTransaction in project hedera-mirror-node by hashgraph.
the class TokenPauseTransactionSupplierTest method createWithCustomData.
@Test
void createWithCustomData() {
TokenPauseTransactionSupplier TokenPauseTransactionSupplier = new TokenPauseTransactionSupplier();
TokenPauseTransactionSupplier.setMaxTransactionFee(1);
TokenPauseTransactionSupplier.setTokenId(TOKEN_ID.toString());
TokenPauseTransaction actual = TokenPauseTransactionSupplier.get();
assertThat(actual).returns(ONE_TINYBAR, TokenPauseTransaction::getMaxTransactionFee).returns(TOKEN_ID, TokenPauseTransaction::getTokenId);
}
use of com.hedera.hashgraph.sdk.TokenPauseTransaction in project hedera-mirror-node by hashgraph.
the class TokenClient method pause.
public NetworkTransactionResponse pause(TokenId tokenId) {
log.debug("Pausing token {}", tokenId);
TokenPauseTransaction tokenPauseTransaction = new TokenPauseTransaction().setTokenId(tokenId).setMaxTransactionFee(sdkClient.getMaxTransactionFee()).setTransactionMemo(getMemo("Pause token"));
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(tokenPauseTransaction);
log.debug("Paused token {}", tokenId);
return networkTransactionResponse;
}
use of com.hedera.hashgraph.sdk.TokenPauseTransaction in project hedera-mirror-node by hashgraph.
the class TokenPauseTransactionSupplierTest method createWithMinimumData.
@Test
void createWithMinimumData() {
TokenPauseTransactionSupplier tokenPauseTransactionSupplier = new TokenPauseTransactionSupplier();
tokenPauseTransactionSupplier.setTokenId(TOKEN_ID.toString());
TokenPauseTransaction actual = tokenPauseTransactionSupplier.get();
assertThat(actual).returns(MAX_TRANSACTION_FEE_HBAR, TokenPauseTransaction::getMaxTransactionFee).returns(TOKEN_ID, TokenPauseTransaction::getTokenId);
}
Aggregations