Below you'll find all endpoints with a short description. You can always see the complete code here.
Please check all attributes for each endpoint in the linked code line in the repository. It is all open-source.
You'll find all the endpoints here.
These are the required operations you would need to perform once always when configuring a new collection and Smart Contract. Check the CLI tool to simplify the work required.
init
- standard init endpoint, it will be triggered on deployment and upgradeissueToken
- required endpoint for creating a new collection, this is done once. It is a handler for the whole single collection.setLocalRoles
- Set three roles for now, create, mint and burn. Required for management of SFTs.createToken
- create SFT tokens with the defined amount, assets, and attributes.claimScFunds
- You can claim the funds which are there on the payable Smart Contract. For example, royalties paid by marketplaces. These are only funds that come from outside. The funds from selling are directly sent to the contract owner after each sell.buy
- buy SFT tokensgetCollectionTokenName
- returns collection token namegetCollectionTokenId
- returns collection token idgetTokenDisplayName
- returns the SFT token display name. Here you need to provide the nonce of the SFT token because there can be more than one. Each can have different supply and attributesgetPrice
- returns current price per one token, you also need to provide the nonce of the SFT tokengetMaxAmountPerAddress
- returns the max amount of tokens to buy by one address. You also need to provide the nonce of the SFT tokenThe simplest way is to use the Elven Tools CLI, check how in the Jump start article or the CLI introduction.
If you don't want to use the CLI, you need to do the queries and transaction calls using the sdk-core, sdk-dapp or mxpy.
Check the examples for sdk-core
:
You can also check the elven-tools-cli source code, where I also used the MultiversX JS SDK.
Check the examples for mxpy
: