Search in sources :

Example 1 with ScheduleDeleteTransaction

use of com.hedera.hashgraph.sdk.ScheduleDeleteTransaction in project hedera-mirror-node by hashgraph.

the class ScheduleDeleteTransactionSupplierTest method createWithMinimumData.

@Test
void createWithMinimumData() {
    ScheduleDeleteTransactionSupplier scheduleDeleteTransactionSupplier = new ScheduleDeleteTransactionSupplier();
    scheduleDeleteTransactionSupplier.setScheduleId(SCHEDULE_ID.toString());
    ScheduleDeleteTransaction actual = scheduleDeleteTransactionSupplier.get();
    assertThat(actual).returns(MAX_TRANSACTION_FEE_HBAR, ScheduleDeleteTransaction::getMaxTransactionFee).returns(SCHEDULE_ID, ScheduleDeleteTransaction::getScheduleId);
}
Also used : ScheduleDeleteTransaction(com.hedera.hashgraph.sdk.ScheduleDeleteTransaction) Test(org.junit.jupiter.api.Test) AbstractTransactionSupplierTest(com.hedera.mirror.monitor.publish.transaction.AbstractTransactionSupplierTest)

Example 2 with ScheduleDeleteTransaction

use of com.hedera.hashgraph.sdk.ScheduleDeleteTransaction in project hedera-mirror-node by hashgraph.

the class ScheduleClient method deleteSchedule.

public NetworkTransactionResponse deleteSchedule(ScheduleId scheduleId) {
    log.debug("Delete schedule {}", scheduleId);
    ScheduleDeleteTransaction scheduleDeleteTransaction = new ScheduleDeleteTransaction().setMaxTransactionFee(sdkClient.getMaxTransactionFee()).setScheduleId(scheduleId).setTransactionMemo(getMemo("Delete schedule"));
    NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(scheduleDeleteTransaction);
    log.debug("Deleted schedule {}", scheduleId);
    return networkTransactionResponse;
}
Also used : ScheduleDeleteTransaction(com.hedera.hashgraph.sdk.ScheduleDeleteTransaction) NetworkTransactionResponse(com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse)

Example 3 with ScheduleDeleteTransaction

use of com.hedera.hashgraph.sdk.ScheduleDeleteTransaction in project hedera-mirror-node by hashgraph.

the class ScheduleDeleteTransactionSupplierTest method createWithCustomData.

@Test
void createWithCustomData() {
    ScheduleDeleteTransactionSupplier scheduleDeleteTransactionSupplier = new ScheduleDeleteTransactionSupplier();
    scheduleDeleteTransactionSupplier.setMaxTransactionFee(1);
    scheduleDeleteTransactionSupplier.setScheduleId(SCHEDULE_ID.toString());
    ScheduleDeleteTransaction actual = scheduleDeleteTransactionSupplier.get();
    assertThat(actual).returns(ONE_TINYBAR, ScheduleDeleteTransaction::getMaxTransactionFee).returns(SCHEDULE_ID, ScheduleDeleteTransaction::getScheduleId);
}
Also used : ScheduleDeleteTransaction(com.hedera.hashgraph.sdk.ScheduleDeleteTransaction) Test(org.junit.jupiter.api.Test) AbstractTransactionSupplierTest(com.hedera.mirror.monitor.publish.transaction.AbstractTransactionSupplierTest)

Aggregations

ScheduleDeleteTransaction (com.hedera.hashgraph.sdk.ScheduleDeleteTransaction)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