Mint assets
Last updated
Last updated
Minting assets on XpansionChain means to bring into existence tokens from a smart contract. For more information on this concept, please see Deep dive into minting.
In order for a user to mint tokens, they need:
A smart contract deployed on L1 (Ethereum) with certain requirements
To be registered as a user on XpansionChain
To have registered an administrative entity, a project, on XpansionChain
To have registered their collection (as represented by their smart contract) on XpansionChain
Ensure your metadata is available to be fetched by our systems before minting.
📝GUIDES
Core SDK
JS SDK
Once you have verified that a user has a smart contract deployed on L1 and that they are the owner, then your application can start the process of enabling them to mint tokens on L2 from this contract.
Before a user can register a project or collection and mint tokens on XpansionChain, they must be registered as a user on XpansionChain. Follow this guide to do this.
A project is an administrative-level entity that is associated with an user. A project can have many collections, which are represented by smart contracts.
Typescript Core SDK
📚SDK REFERENCE
createProject
The createProject
endpoint requires a signer (obtained in the previous step) and a createProjectRequest
object:
Then, create a project:
Kotlin (JVM) Core SDK
📚SDK REFERENCE
createProject
Swift Core SDK
📚SDK REFERENCE
createProject
Golang Core SDK
📚SDK REFERENCE
CreateProject
💻EXAMPLE
CreateProject
A collection refers to a deployed token smart contract that has been registered on XpansionChain. Once this has occured, its tokens can be transacted (ie. minted, traded, bought and sold) on XpansionChain.
Each collection belongs to a project.
Typescript Core SDK
📚SDK REFERENCE
createCollection
Use the project ID returned from registering a project to use in the request body of this section.
The createCollection
endpoint requires a signer (obtained in the first step) and a createCollectionRequest
object:
Then, create a collection:
Kotlin (JVM) Core SDK
📚SDK REFERENCE
createCollection
Swift Core SDK
📚SDK REFERENCE
createCollection
Golang Core SDK
📚SDK REFERENCE
CreateCollection
💻EXAMPLE
CreateCollection
WHEN SETTING ROYALTIES IN THE ORDER PARAMS
You can set up to 50 royalty recipients
You cannot set the same recipient more than once
The royalty percentage for a single user cannot exceed 100% (however, the combined percentage for all recipients may exceed 100% - as this amount is calculated on top of the sale price)
Individual percentage fees can’t be < 0% :::
Typescript Core SDK
📚SDK REFERENCE
mint
Kotlin (JVM) Core SDK
📚SDK REFERENCE
mintTokens
Swift Core SDK
📚SDK REFERENCE
mintTokens
Golang Core SDK
📚SDK REFERENCE
Mint
💻EXAMPLE
Mint