use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class TokenClient method dissociate.
public NetworkTransactionResponse dissociate(ExpandedAccountId accountId, TokenId token) {
log.debug("Dissociate account {} with token {}", accountId.getAccountId(), token);
TokenDissociateTransaction tokenDissociateTransaction = new TokenDissociateTransaction().setAccountId(accountId.getAccountId()).setTokenIds(List.of(token)).setTransactionMemo(getMemo("Dissociate token"));
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(tokenDissociateTransaction, KeyList.of(accountId.getPrivateKey()));
log.debug("Dissociated {} with token {}", accountId, token);
return networkTransactionResponse;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class TokenClient method wipeNonFungible.
public NetworkTransactionResponse wipeNonFungible(TokenId tokenId, long serialNumber, ExpandedAccountId expandedAccountId) {
log.debug("Wipe serial number {} from token {}, account id {}", serialNumber, tokenId, expandedAccountId.getAccountId());
TokenWipeTransaction transaction = getTokenWipeTransaction(tokenId, expandedAccountId).addSerial(serialNumber);
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(transaction);
log.debug("Wiped serial number {} from token {}, account id {}", serialNumber, tokenId, expandedAccountId.getAccountId());
return networkTransactionResponse;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class TopicClient method createTopic.
public NetworkTransactionResponse createTopic(ExpandedAccountId adminAccount, PublicKey submitKey) {
String memo = getMemo("Create Topic");
TopicCreateTransaction consensusTopicCreateTransaction = new TopicCreateTransaction().setAdminKey(adminAccount.getPublicKey()).setAutoRenewAccountId(sdkClient.getExpandedOperatorAccountId().getAccountId()).setMaxTransactionFee(sdkClient.getMaxTransactionFee()).setTopicMemo(memo).setTransactionMemo(memo).setAutoRenewPeriod(// INSUFFICIENT_TX_FEE, also unsupported
autoRenewPeriod);
if (submitKey != null) {
consensusTopicCreateTransaction.setSubmitKey(submitKey);
}
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(consensusTopicCreateTransaction, KeyList.of(adminAccount.getPrivateKey()));
TopicId topicId = networkTransactionResponse.getReceipt().topicId;
log.debug("Created new topic {}", topicId);
return networkTransactionResponse;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class TopicClient method updateTopic.
public NetworkTransactionResponse updateTopic(TopicId topicId) {
String memo = getMemo("Update Topic");
TopicUpdateTransaction consensusTopicUpdateTransaction = new TopicUpdateTransaction().setTopicId(topicId).setTopicMemo(memo).setAutoRenewPeriod(autoRenewPeriod).clearAdminKey().clearSubmitKey().clearAutoRenewAccountId().setMaxTransactionFee(sdkClient.getMaxTransactionFee()).setTransactionMemo(memo);
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(consensusTopicUpdateTransaction);
log.debug("Updated topic '{}'.", topicId);
return networkTransactionResponse;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class TopicClient method getDefaultTopicId.
public TopicId getDefaultTopicId() {
if (defaultTopicId == null) {
NetworkTransactionResponse networkTransactionResponse = createTopic(sdkClient.getExpandedOperatorAccountId(), null);
defaultTopicId = networkTransactionResponse.getReceipt().topicId;
log.debug("Created TopicId: '{}' for use in current test session", defaultTopicId);
}
return defaultTopicId;
}
Aggregations