use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class AccountClient method sendCryptoTransfer.
public NetworkTransactionResponse sendCryptoTransfer(AccountId recipient, Hbar hbarAmount) {
log.debug("Send CryptoTransfer of {} tℏ from {} to {}", hbarAmount.toTinybars(), sdkClient.getExpandedOperatorAccountId().getAccountId(), recipient);
TransferTransaction cryptoTransferTransaction = getCryptoTransferTransaction(sdkClient.getExpandedOperatorAccountId().getAccountId(), recipient, hbarAmount);
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(cryptoTransferTransaction);
log.debug("Sent CryptoTransfer");
return networkTransactionResponse;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class ContractClient method deleteContract.
public NetworkTransactionResponse deleteContract(ContractId contractId, AccountId transferAccountId, ContractId transferContractId) {
log.debug("Delete contract {}", contractId);
String memo = getMemo("Delete contract");
ContractDeleteTransaction contractDeleteTransaction = new ContractDeleteTransaction().setContractId(contractId).setTransactionMemo(memo);
// either AccountId or ContractId, not both
if (transferAccountId != null) {
contractDeleteTransaction.setTransferAccountId(transferAccountId);
}
if (transferContractId != null) {
contractDeleteTransaction.setTransferContractId(transferContractId);
}
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(contractDeleteTransaction);
log.debug("Deleted contract {}", contractId);
return networkTransactionResponse;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class FileClient method updateFile.
public NetworkTransactionResponse updateFile(FileId fileId, byte[] byteCode) {
log.debug("Update file");
String memo = getMemo("Update file");
FileUpdateTransaction fileUpdateTransaction = new FileUpdateTransaction().setFileId(fileId).setFileMemo(memo).setTransactionMemo(memo);
if (byteCode != null) {
fileUpdateTransaction.setContents(byteCode);
}
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(fileUpdateTransaction);
log.debug("Updated file {}", fileId);
return networkTransactionResponse;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class FileClient method appendFile.
public NetworkTransactionResponse appendFile(FileId fileId, byte[] byteCode) {
String memo = "Append file";
log.debug(memo);
FileAppendTransaction fileAppendTransaction = new FileAppendTransaction().setFileId(fileId).setContents(byteCode).setTransactionMemo(getMemo(memo));
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(fileAppendTransaction);
log.debug("Appended to file {}", fileId);
return networkTransactionResponse;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class FileClient method deleteFile.
public NetworkTransactionResponse deleteFile(FileId fileId) {
String memo = "Delete file";
log.debug(memo);
FileDeleteTransaction fileUpdateTransaction = new FileDeleteTransaction().setFileId(fileId).setTransactionMemo(getMemo(memo));
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(fileUpdateTransaction);
log.debug("Deleted file {}", fileId);
return networkTransactionResponse;
}
Aggregations