createTokenWithMutabilityConfig method
Future<String>
createTokenWithMutabilityConfig(
- AptosAccount account,
- String collectionName,
- String name,
- String description,
- int supply,
- String uri, {
- BigInt? max,
- String? royaltyPayeeAddress,
- int? royaltyPointsDenominator,
- int? royaltyPointsNumerator,
- List<
String> ? propertyKeys, - List<
Uint8List> ? propertyValues, - List<
String> ? propertyTypes, - List<
bool> ? mutabilityConfig, - BigInt? maxGasAmount,
- BigInt? gasUnitPrice,
- BigInt? expireTimestamp,
Creates a new NFT within the specified account and return the hash of the transaction submitted to the API.
Implementation
Future<String> createTokenWithMutabilityConfig(
AptosAccount account,
String collectionName,
String name,
String description,
int supply,
String uri,
{BigInt? max,
String? royaltyPayeeAddress,
int? royaltyPointsDenominator,
int? royaltyPointsNumerator,
List<String>? propertyKeys,
List<Uint8List>? propertyValues,
List<String>? propertyTypes,
List<bool>? mutabilityConfig,
BigInt? maxGasAmount,
BigInt? gasUnitPrice,
BigInt? expireTimestamp}
) {
max ??= MAX_U64_BIG_INT;
royaltyPayeeAddress ??= account.address;
royaltyPointsDenominator ??= 0;
royaltyPointsNumerator ??= 0;
propertyKeys ??= [];
propertyValues ??= [];
propertyTypes ??= [];
mutabilityConfig ??= [false, false, false, false, false];
final payload = transactionBuilder.buildTransactionPayload(
"0x3::token::create_token_script",
[],
[
collectionName,
name,
description,
supply,
max,
uri,
royaltyPayeeAddress,
royaltyPointsDenominator,
royaltyPointsNumerator,
mutabilityConfig,
propertyKeys,
propertyValues,
propertyTypes,
],
);
return aptosClient.generateSignSubmitTransaction(
account,
payload,
maxGasAmount: maxGasAmount,
gasUnitPrice: gasUnitPrice,
expireTimestamp: expireTimestamp
);
}