use of com.hedera.hashgraph.sdk.TokenId in project hedera-mirror-node by hashgraph.
the class TokenFeature method verifyMirrorNftFundFlow.
@Then("^the mirror node REST API should return status (.*) for token (:?(.*) )?serial number (:?(.*) )?full flow$")
@Retryable(value = { AssertionError.class }, backoff = @Backoff(delayExpression = "#{@restPollingProperties.minBackoff.toMillis()}"), maxAttemptsExpression = "#{@restPollingProperties.maxAttempts}")
public void verifyMirrorNftFundFlow(int status, Integer tokenIndex, Integer serialNumberIndex) {
TokenId tokenId = tokenIds.get(getIndexOrDefault(tokenIndex));
Long serialNumber = tokenSerialNumbers.get(tokenId).get(getIndexOrDefault(serialNumberIndex));
verifyTransactions(status);
verifyToken(tokenId);
verifyNft(tokenId, serialNumber);
verifyNftTransfers(tokenId, serialNumber);
verifyNftTransactions(tokenId, serialNumber);
publishBackgroundMessages();
}
use of com.hedera.hashgraph.sdk.TokenId in project hedera-mirror-node by hashgraph.
the class TokenFeature method wipeNft.
@Given("I wipe serial number {int} from token {int}")
public void wipeNft(int serialNumberIndex, int tokenIndex) {
TokenId tokenId = tokenIds.get(tokenIndex);
networkTransactionResponse = tokenClient.wipeNonFungible(tokenId, tokenSerialNumbers.get(tokenId).get(serialNumberIndex), recipients.get(0));
assertNotNull(networkTransactionResponse.getTransactionId());
assertNotNull(networkTransactionResponse.getReceipt());
}
use of com.hedera.hashgraph.sdk.TokenId in project hedera-mirror-node by hashgraph.
the class TokenFeature method createNewNft.
private void createNewNft(String symbol, int freezeStatus, int kycStatus, TokenSupplyType tokenSupplyType) {
TokenId tokenId = createNewToken(symbol, freezeStatus, kycStatus, TokenType.NON_FUNGIBLE_UNIQUE, tokenSupplyType, Collections.emptyList());
tokenSerialNumbers.put(tokenId, new ArrayList<>());
}
use of com.hedera.hashgraph.sdk.TokenId in project hedera-mirror-node by hashgraph.
the class TokenFeature method verifyMirrorTokenFundFlow.
@Then("^the mirror node REST API should return status (.*) for token (:?(.*) )?fund flow with assessed custom " + "fees$")
@Retryable(value = { AssertionError.class }, backoff = @Backoff(delayExpression = "#{@restPollingProperties.minBackoff.toMillis()}"), maxAttemptsExpression = "#{@restPollingProperties.maxAttempts}")
public void verifyMirrorTokenFundFlow(int status, Integer tokenIndex, List<MirrorAssessedCustomFee> assessedCustomFees) {
TokenId tokenId = tokenIds.get(getIndexOrDefault(tokenIndex));
verifyTransactions(status, assessedCustomFees);
verifyToken(tokenId);
verifyTokenTransfers(tokenId);
publishBackgroundMessages();
}
use of com.hedera.hashgraph.sdk.TokenId in project hedera-mirror-node by hashgraph.
the class TokenFeature method createNewToken.
private TokenId createNewToken(String symbol, int freezeStatus, int kycStatus, TokenType tokenType, TokenSupplyType tokenSupplyType, List<CustomFee> customFees) {
ExpandedAccountId admin = tokenClient.getSdkClient().getExpandedOperatorAccountId();
networkTransactionResponse = tokenClient.createToken(admin, symbol, freezeStatus, kycStatus, admin, INITIAL_SUPPLY, tokenSupplyType, MAX_SUPPLY, tokenType, customFees);
assertNotNull(networkTransactionResponse.getTransactionId());
assertNotNull(networkTransactionResponse.getReceipt());
TokenId tokenId = networkTransactionResponse.getReceipt().tokenId;
assertNotNull(tokenId);
tokenIds.add(tokenId);
tokenCustomFees.put(tokenId, customFees);
return tokenId;
}
Aggregations