createCollection method
Creates a new NFT collection within the specified account and return the hash of the transaction submitted to the API.
Implementation
Future<String> createCollection(
AptosAccount account,
String name,
String description,
String uri,
{BigInt? maxAmount,
BigInt? maxGasAmount,
BigInt? gasUnitPrice,
BigInt? expireTimestamp}
) async {
final payload = transactionBuilder.buildTransactionPayload(
"0x3::token::create_collection_script",
[],
[name, description, uri, maxAmount ?? MAX_U64_BIG_INT, [false, false, false]],
);
return aptosClient.generateSignSubmitTransaction(
account,
payload,
maxGasAmount: maxGasAmount,
gasUnitPrice: gasUnitPrice,
expireTimestamp: expireTimestamp
);
}