use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class TokenClient method freeze.
public NetworkTransactionResponse freeze(TokenId tokenId, AccountId accountId) {
TokenFreezeTransaction tokenFreezeAccountTransaction = new TokenFreezeTransaction().setAccountId(accountId).setMaxTransactionFee(sdkClient.getMaxTransactionFee()).setTokenId(tokenId).setTransactionMemo(getMemo("Freeze token account"));
NetworkTransactionResponse response = executeTransactionAndRetrieveReceipt(tokenFreezeAccountTransaction);
log.debug("Freeze account {} with token {}", accountId, tokenId);
return response;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class TokenClient method createNonFungibleToken.
public NetworkTransactionResponse createNonFungibleToken(ExpandedAccountId expandedAccountId, String symbol, int freezeStatus, int kycStatus, ExpandedAccountId treasuryAccount, TokenSupplyType tokenSupplyType, long maxSupply, List<CustomFee> customFees) {
log.debug("Create new non-fungible token {}", symbol);
TokenCreateTransaction tokenCreateTransaction = getTokenCreateTransaction(expandedAccountId, symbol, freezeStatus, kycStatus, treasuryAccount, TokenType.NON_FUNGIBLE_UNIQUE, tokenSupplyType, maxSupply, customFees);
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(tokenCreateTransaction, KeyList.of(treasuryAccount.getPrivateKey()));
TokenId tokenId = networkTransactionResponse.getReceipt().tokenId;
log.debug("Created new non-fungible 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 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;
}
use of com.hedera.mirror.test.e2e.acceptance.response.NetworkTransactionResponse in project hedera-mirror-node by hashgraph.
the class TokenClient method createFungibleToken.
public NetworkTransactionResponse createFungibleToken(ExpandedAccountId expandedAccountId, String symbol, int freezeStatus, int kycStatus, ExpandedAccountId treasuryAccount, int initialSupply, TokenSupplyType tokenSupplyType, long maxSupply, List<CustomFee> customFees) {
log.debug("Create new fungible token {}", symbol);
TokenCreateTransaction tokenCreateTransaction = getTokenCreateTransaction(expandedAccountId, symbol, freezeStatus, kycStatus, treasuryAccount, TokenType.FUNGIBLE_COMMON, tokenSupplyType, maxSupply, customFees).setDecimals(10).setInitialSupply(initialSupply);
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(tokenCreateTransaction, KeyList.of(treasuryAccount.getPrivateKey()));
TokenId tokenId = networkTransactionResponse.getReceipt().tokenId;
log.debug("Created new fungible 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 delete.
public NetworkTransactionResponse delete(ExpandedAccountId accountId, TokenId token) {
log.debug("Delete token {}", token);
TokenDeleteTransaction tokenDissociateTransaction = new TokenDeleteTransaction().setTokenId(token).setMaxTransactionFee(sdkClient.getMaxTransactionFee()).setTransactionMemo(getMemo("Delete token"));
NetworkTransactionResponse networkTransactionResponse = executeTransactionAndRetrieveReceipt(tokenDissociateTransaction, KeyList.of(accountId.getPrivateKey()));
log.debug("Deleted token {}", token);
return networkTransactionResponse;
}
Aggregations