Search in sources :

Example 1 with TokenPauseTransaction

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);
}
Also used : TokenPauseTransaction(com.hedera.hashgraph.sdk.TokenPauseTransaction) Test(org.junit.jupiter.api.Test) AbstractTransactionSupplierTest(com.hedera.mirror.monitor.publish.transaction.AbstractTransactionSupplierTest)

Example 2 with TokenPauseTransaction

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;
}
Also used : TokenPauseTransaction(com.hedera.hashgraph.sdk.TokenPauseTransaction) NetworkTransactionResponse(com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse)

Example 3 with TokenPauseTransaction

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);
}
Also used : TokenPauseTransaction(com.hedera.hashgraph.sdk.TokenPauseTransaction) Test(org.junit.jupiter.api.Test) AbstractTransactionSupplierTest(com.hedera.mirror.monitor.publish.transaction.AbstractTransactionSupplierTest)

Aggregations

TokenPauseTransaction (com.hedera.hashgraph.sdk.TokenPauseTransaction)3 AbstractTransactionSupplierTest (com.hedera.mirror.monitor.publish.transaction.AbstractTransactionSupplierTest)2 Test (org.junit.jupiter.api.Test)2 NetworkTransactionResponse (com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse)1