SFT SC Endpoints

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.

Setup endpoints (only owner)

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 upgrade
  • issueToken - 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.

Other endpoints (only owner)

  • 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.

Endpoints for all

  • buy - buy SFT tokens

Smart Contract queries (also for all, by design)

  • getCollectionTokenName - returns collection token name
  • getCollectionTokenId - returns collection token id
  • getTokenDisplayName - 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 attributes
  • getPrice - returns current price per one token, you also need to provide the nonce of the SFT token
  • getMaxAmountPerAddress - returns the max amount of tokens to buy by one address. You also need to provide the nonce of the SFT token

How to interact with endpoints

The 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:

Contents