Smart Contract | Extensions
Improving the base functionalities of smart contract standards with Extensions.
Pausable
Pause token transfers, minting and burning.
Get pausable state of the smart contract.
curl -X GET "http://0.0.0.0:7000/nftkit/nft/extensions/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/paused" \Path parameter:
chain: chain to work with.
Main chains: ETHEREUM, POLYGON
Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM
contract: smart contract address
Pause smart contract
curl -X POST "http://0.0.0.0:7000/nftkit/nft/extensions/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/pause" \Path parameter:
chain: chain to work with.
Main chains: ETHEREUM, POLYGON
Testnet chains: SEPOLIA, GOERLI, MUMBAI
contract: smart contract address
Unpause smart contract
curl -X POST "http://0.0.0.0:7000/nftkit/nft/extensions/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/unpause" -H Path parameter:
chain: chain to work with.
Main chains: ETHEREUM, POLYGON
Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM
contract: smart contract address
Burnable
Pause token burning.
Get burnable state of the smart contract.
curl -X GET "http://0.0.0.0:7000/nftkit/nft/extensions/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/burnable"Path parameter:
chain: chain to work with.
Main chains: ETHEREUM, POLYGON
Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM
contract: smart contract address
Activate/Deactivate burnable feature.
curl -X POST "http://0.0.0.0:7000/nftkit/nft/extensions/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/burnable" \
-H "Content-Type: application/json" \
-d '{"burnable":false}'Path parameter:
chain: chain to work with.
Main chains: ETHEREUM, POLYGON
Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM
contract: smart contract address
{
"burnable": true
}burnable: [boolean] set totrueif you want to activate the burn token feature andfalseif not.
Burn an NFT token.
curl -X DELETE "http://0.0.0.0:7000/nftkit/nft/extensions/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/token/1" Path parameter:
chain: chain to work with.
Main chains: ETHEREUM, POLYGON
Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM
contract: smart contract address
token: token ID
Update NFT metadata
curl -X PUT "http://0.0.0.0:7000/nftkit/nft/extensions/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/token/1/tokenURI?signedAccount=0x6E7448a6335d5C947953994d071D4Dc1F6e5BE96" \
-H "Content-Type: application/json" \
-d '{"metadataUri":"string","metadata":{"description":"string","name":"string","image":"string","image_data":"string","external_url":"string","attributes":[{"trait_type":"string","value":"string"}]}}'Path parameter:
chain: chain to work with.
Main chains: ETHEREUM, POLYGON
Testnet chains: SEPOLIA, GOERLI, MUMBAI, SHIMMEREVM
contract: smart contract address
token: token ID
signedAccount: the account used to sign the transaction.
{
"metadataUri": "string",
"metadata": {
"description": "string",
"name": "string",
"image": "string",
"image_data": "string",
"external_url": "string",
"attributes": [
{
"trait_type": "string",
"value": "string"
}
]
}metadataUri: [string] metadata URI of the 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 token. It confirms the structure defined by ERC721 and ERC1155 standards. For more details about NFT metadata standard.description: [string] a description of the tokenname: [string] the name of this specific tokenimage: [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 traitvalue: [string] the value of the trait
Last updated
Was this helpful?
