-
Notifications
You must be signed in to change notification settings - Fork 1
createCollectionPayload(______________________________)
Constructs a TransactionPayload
for creating a new token collection.
public func createCollectionPayload(
_ description: String,
_ maxSupply: Int,
_ name: String,
_ uri: String,
_ mutableDescription: Bool,
_ mutableRoyalty: Bool,
_ mutableUri: Bool,
_ mutableTokenDescription: Bool,
_ mutableTokenName: Bool,
_ mutableTokenProperties: Bool,
_ mutableTokenUri: Bool,
_ tokensBurnableByCreator: Bool,
_ tokensFreezableByCreator: Bool,
_ royaltyNumerator: Int,
_ royaltyDenominator: Int
) throws -> TransactionPayload
The function accepts several parameters defining the properties of the new token collection, such as its name,
description, maximum supply, and various mutability flags. These parameters are then encoded into TransactionArguments
using appropriate Serializers based on their types.
An EntryFunction
object is then created with the given token module address, the function name to be invoked ("create_collection"),
and the constructed transaction arguments. Finally, a TransactionPayload
is created with this entry function and returned.
- description: The description of the new token collection.
- maxSupply: The maximum supply of tokens in the collection.
- name: The name of the new token collection.
- uri: The URI for the token collection.
- mutableDescription: A boolean flag indicating whether the description of the token collection can be changed after creation.
- mutableRoyalty: A boolean flag indicating whether the royalty of the token collection can be changed after creation.
- mutableUri: A boolean flag indicating whether the URI of the token collection can be changed after creation.
- mutableTokenDescription: A boolean flag indicating whether the description of a token in the collection can be changed after creation.
- mutableTokenName: A boolean flag indicating whether the name of a token in the collection can be changed after creation.
- mutableTokenProperties: A boolean flag indicating whether the properties of a token in the collection can be changed after creation.
- mutableTokenUri: A boolean flag indicating whether the URI of a token in the collection can be changed after creation.
- tokensBurnableByCreator: A boolean flag indicating whether tokens in the collection can be burned by the creator.
- tokensFreezableByCreator: A boolean flag indicating whether tokens in the collection can be frozen by the creator.
- royaltyNumerator: The numerator of the royalty fraction.
- royaltyDenominator: The denominator of the royalty fraction.
This function throws an error if creating the EntryFunction
or TransactionPayload
fails.
A TransactionPayload
object that represents the payload for the transaction to create a new token collection.
Generated at 2023-07-20T02:24:43+0000 using swift-doc 1.0.0-rc.1.
Types
- Account
- AccountAddress
- AccountAddressTag
- AccountResponse
- AnyTransactionArgument
- AptosError
- AptosRestClientError
- BoolTag
- ClientConfig
- Collection
- Ed25519Authenticator
- Ed25519BIP32
- EntryFunction
- HTTPMethod
- InfoResponse
- InvalidPropertyType
- Mnemonic
- Mnemonic.Error
- ModuleBundle
- ModuleId
- MultiAgentAuthenticator
- MultiAgentRawTransaction
- MultiEd25519Authenticator
- MultiPublicKey
- MultiSignature
- Object
- PrivateKey
- Property
- PropertyMap
- PublicKey
- RawTransaction
- RotatingProofChallenge
- Royalty
- Script
- ScriptArgument
- SeedMode
- Serializer
- Signature
- SignedTransaction
- StructTag
- StructTagValue
- Token
- TransactionArgument
- U128Tag
- U16Tag
- U256Tag
- U32Tag
- U64Tag
- U8Tag
- UInt128
- UInt128Errors
- Wallet
- Wordlists
Protocols
Global Variables
Global Functions
- _struct(_:)
- account(_:ledgerVersion:)
- accountBalance(_:_:)
- accountResource(_:_:_:)
- accountResources(_:_:)
- accountSequenceNumber(_:_:)
- addTokenProperty(_:_:_:)
- aggregatorValue(_:_:_:)
- asyncData(with:method:headers:body:)
- bcsTransfer(_:_:_:)
- bool()
- burnToken(_:_:)
- claimToken(_:_:_:_:_:_:)
- createBcsSignedTransaction(_:_:)
- createBcsSignedTransaction(_:_:_:)
- createBcsTransaction(_:_:)
- createBcsTransaction(_:_:_:)
- createCollection(_:_:_:_:)
- createCollection(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)
- createCollectionPayload(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)
- createMultiAgentBcsTransaction(_:_:_:)
- createToken(_:_:_:_:_:_:_:)
- decodeData(_:with:keyDecodingStrategy:dataDecodingStrategy:dateDecodingStrategy:)
- decodeUrl(_:with:)
- decodeUrl(with:_:)
- decodeUrl(with:_:_:)
- deserialize(from:)
- directTransferToken(_:_:_:_:_:_:_:)
- fixedBytes(length:)
- freezeToken(_:_:)
- fundAccount(_:_:)
- getCollection(_:_:)
- getTableItem(_:_:_:_:_:_:)
- getToken(_:_:_:_:_:)
- getTokenBalance(_:_:_:_:_:)
- getTokenData(_:_:_:_:)
- info()
- map(keyDecoder:valueDecoder:)
- mintSoulBoundToken(_:_:_:_:_:_:_:)
- mintToken(_:_:_:_:_:_:)
- mintTokenPayload(_:_:_:_:_:)
- offerToken(_:_:_:_:_:_:_:)
- publishPackage(_:_:_:)
- readObject(address:)
- remaining()
- removeTokenProperty(_:_:_:)
- sequence(valueDecoder:)
- serialize(_:)
- simulateTransaction(_:_:)
- string(_:)
- submitBcsTransaction(_:)
- submitTransaction(_:_:)
- toBytes(_:)
- transactionPending(_:)
- transfer(_:_:_:)
- u128(_:)
- u16(_:)
- u256(_:)
- u32(_:)
- u64(_:)
- u8(_:)
- uleb128()
- unfreezeToken(_:_:)
- updateTokenProperty(_:_:_:)
- verify(_:)
- waitForTransaction(_:)