Ensure that the GasProvider is configured with the appropriate gasPrice and gasLimit based on current market conditions prior to smart contract deployment, to ensure successful transactions.
accessControl: [string] access control approach for the smart contract. Supported values: OWNABLE, ROLE_BASED_ACCESS_CONTROL. For more details about access control approaches.
val deploymentOptions =DeploymentOptions(AccessControl.OWNABLE, TokenStandard.ERC721)val deploymentParameter =DeploymentParameter("Metaverse", "MTV",DeploymentParameter.Options(true, true))val result = NftService.deploySmartContractToken(Chain.POLYGON, deploymentParameter, deploymentOptions)
Soulbound Token Contract Deployment | ERC-721 with extension
Ensure that the GasProvider is configured with the appropriate gasPrice and gasLimit based on current market conditions prior to smart contract deployment, to ensure successful transactions.
In the contract deployment call we set the transferable option to false, which deploys a soulbound token contract. This contract prevents any token transfers after the initial mint.
accessControl: [string] access control approach for the smart contract. Supported values: OWNABLE, ROLE_BASED_ACCESS_CONTROL. For more details about access control approaches.
transferable: [boolean] in order to make sure a soulbound token contract is created we need to set this option to false otherwise it will create a regular NFT contract as shown in the section above.
val deploymentOptions =DeploymentOptions(AccessControl.OWNABLE, TokenStandard.ERC721)val deploymentParameter =DeploymentParameter("Metaverse", "MTV",DeploymentParameter.Options(false, true))val result = NftService.deploySmartContractToken(Chain.POLYGON, deploymentParameter, deploymentOptions)
Mint an NFT
It is a rich API to mint a new NFT token. It manages NFT metadata in multiple ways. You can generate token URI by yourself or let the NFT KIT generate it.
Ensure that the GasProvider is configured with the appropriate gasPrice and gasLimit based on current market conditions prior to minting, to ensure successful transactions.
metadataUri: [string] metadata URI of the new token.If you want to generate metadata URI using NFT KIT, set the "metadataUri "value as an empty string.
metadata: NFT KIT will use values inside metadata to generate metadata URI of the new token. It confirms the structure defined by ERC721 and ERC1155 standards. For more details about NFT metadata standard.
description: [string] a description of the token
name: [string] the name of this specific token
image: [string] this is the URL to the image of the item. Can be just about any type of image and can be IPFS URLs or paths.
image_data: [string] Raw SVG image data, if you want to generate images on the fly (not recommended). Only use this if you're not including the image parameter.
external_url: [string] This is the URL that will appear below the asset's image on OpenSea and will allow users to leave OpenSea and view the item on your site.
attributes: [string] To give your items a little more pizazz, we also allow you to add custom "attributes" to your metadata that will show up underneath each of your assets.
trait_type: [string] the name of the trait
value: [string] the value of the trait
recipientAddress: [string] the account address who will receive the NFT
metadataStorageType: [string] when you let the NFT KIT to generate metadata URI, you need to specify how the metadata will be stored. Supported values: ON_CHAIN, OFF_CHAIN. You can use ON_CHAIN if you want to store NFT metadata on the chain. You can use OFF_CHAIN if you want store NFT metadata off chain using IPFS.
val attribute1 : NftMetadata.Attributes = NftMetadata.Attributes(trait_type = "trait_type1", value = JsonPrimitive("value1"))
val attribute2 : NftMetadata.Attributes = NftMetadata.Attributes(trait_type = "trait_type2", value = JsonPrimitive("value1"))
val attributes =mutableListOf(attribute1, attribute2)val nftMetadata : NftMetadata = NftMetadata(name = "name", description = "description", image = "", attributes = attributes)
val mintingParameter =MintingParameter("", "0xaf87c5Ce7a1fb6BD5aaDB6dd9C0b8EF51EF1BC31",nftMetadata)val mintingOptions =MintingOptions(MetadataStorageType.ON_CHAIN)val result = NftService.mintToken(Chain.POLYGON,"0xFd9426f82Ae1edBC6b5eC2B0Ea5416D34Ca6E9b6", mintingParameter, mintingOptions)
Revoke NFT
Owner of a soul bound NFT smart contract , can revoke a minted Token.
curl -X GET "http://0.0.0.0:7000/nftkit/nft/chain/SHIMMEREVM/contract/0x3A4D948a123824Fc34FDDA0654D3C8D0D29c2FA9/token/1/revokeToken"
key: [string] the name of the metadata attribute that you want to update.
value: [string] the new value of the attribute
Get Account balance
curl -X GET "http://0.0.0.0:7000/nftkit/nft/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/owner/0x2555e3a97c4ac9705d70b9e5b9b6cc6fe2977a74/balance"