use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class FileClient method createFile.
public NetworkTransactionResponse createFile(byte[] content) {
log.debug("Create new file");
String memo = getMemo("Create file");
FileCreateTransaction fileCreateTransaction = new FileCreateTransaction().setKeys(sdkClient.getExpandedOperatorAccountId().getPublicKey()).setContents(content).setFileMemo(memo).setTransactionMemo(memo);
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(fileCreateTransaction, KeyList.of(sdkClient.getExpandedOperatorAccountId().getPrivateKey()));
FileId fileId = networkTransactionResponse.getReceipt().fileId;
log.debug("Created new file {}", fileId);
return networkTransactionResponse;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class TokenClient method unpause.
public NetworkTransactionResponse unpause(TokenId tokenId) {
log.debug("Unpausing token {}", tokenId);
TokenUnpauseTransaction tokenUnpauseTransaction = new TokenUnpauseTransaction().setTokenId(tokenId).setMaxTransactionFee(sdkClient.getMaxTransactionFee()).setTransactionMemo(getMemo("Unpause token"));
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(tokenUnpauseTransaction);
log.debug("Unpaused token {}", tokenId);
return networkTransactionResponse;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class TokenClient method updateTokenTreasury.
public NetworkTransactionResponse updateTokenTreasury(TokenId tokenId, ExpandedAccountId newTreasuryId) {
AccountId treasuryAccountId = newTreasuryId.getAccountId();
String memo = getMemo("Update token");
TokenUpdateTransaction tokenUpdateTransaction = new TokenUpdateTransaction().setTokenId(tokenId).setTokenMemo(memo).setTreasuryAccountId(treasuryAccountId).setTransactionMemo(memo);
KeyList keyList = KeyList.of(newTreasuryId.getPrivateKey());
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(tokenUpdateTransaction, keyList);
log.debug("Updated token {} treasury account {}.", tokenId, treasuryAccountId);
return networkTransactionResponse;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class TokenClient method burnNonFungible.
public NetworkTransactionResponse burnNonFungible(TokenId tokenId, long serialNumber) {
log.debug("Burn serial number {} from token {}", serialNumber, tokenId);
TokenBurnTransaction tokenBurnTransaction = getTokenBurnTransaction(tokenId).addSerial(serialNumber).setTransactionMemo(getMemo("Token burn"));
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(tokenBurnTransaction);
log.debug("Burned serial number {} from token {}", serialNumber, tokenId);
return networkTransactionResponse;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class TokenClient method associate.
public NetworkTransactionResponse associate(ExpandedAccountId accountId, TokenId token) {
log.debug("Associate account {} with token {}", accountId.getAccountId(), token);
TokenAssociateTransaction tokenAssociateTransaction = new TokenAssociateTransaction().setAccountId(accountId.getAccountId()).setMaxTransactionFee(sdkClient.getMaxTransactionFee()).setTokenIds((List.of(token))).setTransactionMemo(getMemo("Associate w token"));
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(tokenAssociateTransaction, KeyList.of(accountId.getPrivateKey()));
log.debug("Associated {} with token {}", accountId, token);
return networkTransactionResponse;
}
Aggregations