Remove List NFT

This mutation is used to remove listing details from the Solana marketplace contract. First, initiate the removal process by calling the initiateRemoveListing API to retrieve the listing information. After completing the transaction on the frontend (using a wallet like Phantom or Backpack), call the removeListing API to confirm and finalize the removal of the listing on the blockchain.

Sample mutations

mutation initiateRemoveListingMutation($nftTokenId: UUID1!, $orgId: UUID1!) {
  initiateRemoveListing(nftTokenId: $nftTokenId, orgId: $orgId) {
    seller
    sellerTokenAccount
    mintAccount
    metadataId
    systemProgram
    tokenProgram
    rent
    bubblegumProgram
    compressionProgram
    treeAuthority
    leafOwner
    previousLeafDelegate
    newLeafDelegate
    logWrapper
    merkleTree
    listDiscriminator
    bubblegumListArg {
      price
      isCnft
      isVin
      dataHash
      creatorHash
      nonce
      index
      root
      proof
      __typename
    }
    listingReceipt
    __typename
  }
}
mutation removeListing($orgID: UUID1!, $nftTokenId: UUID1!, $currency: CurrencyCodeFiat, $signature: String) {
  removeListing(
    nftTokenId: $nftTokenId
    orgID: $orgID
    currency: $currency
    signature: $signature
  )
}

Sample variables

{
  "orgId": "0db10bbf-85fe-4c87-911b-d18f8568fc07",
  "nftTokenId": "021272bc-e41b-412f-8631-f63304a6d3a6"
}
{
  "orgID": "0db10bbf-85fe-4c87-911b-d18f8568fc07",
  "nftTokenId": "021272bc-e41b-412f-8631-f63304a6d3a6",
  "currency": "USD",
  "signature": "23JoTK2jBKadJHArQQSdcyVN7hr6NDqjHXEp7qJjakYFMRSQQBuVWd6LTytiX3zqZNyguTSU9dXhF13uCp7CcJoD"
}

Sample response

{
  "data": {
    "initiateRemoveListing": {
      "seller": "7GckBHDKCMEdFdnxJV3qY12YCEVop6MKtgjVAnd7vHGD",
      "sellerTokenAccount": "D5RsufniFeb1zEygWM1SZ4kg2oxnFS8A67dvhjtWvToD",
      "mintAccount": "FytWTAobotGfihugTU8TEQzEgjfrttUVNWcRHv1GG2G3",
      "metadataId": "Zv2vv8roKtLuqQTFT14NpbhhjWVmu3qhqgiwaG8RrpF",
      "systemProgram": "11111111111111111111111111111111",
      "tokenProgram": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
      "rent": "SysvarRent111111111111111111111111111111111",
      "bubblegumProgram": "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY",
      "compressionProgram": "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK",
      "treeAuthority": "DnuWkN8zJAk2H5PwaYkEPRyQkVZb3LN7BtoLzXykRQf5",
      "leafOwner": "7GckBHDKCMEdFdnxJV3qY12YCEVop6MKtgjVAnd7vHGD",
      "previousLeafDelegate": "9VmqpuzWwfEh4qBmV1bhKBMnMJZp6HgR26GsZFiLX3uc",
      "newLeafDelegate": "4aRpxWDMLu9ZfYYFYPng2PnyUancWcZipkFhVHRxLREY",
      "logWrapper": "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV",
      "merkleTree": "4iCY74wJcHPfskyoJaYh788Y8nPKY78DagE7Z2X1er2y",
      "listDiscriminator": [
        41,
        183,
        50,
        232,
        230,
        233,
        157,
        70
      ],
      "bubblegumListArg": {
        "price": 0,
        "isCnft": true,
        "isVin": false,
        "dataHash": "923Pyist1hp5sAQLwTHrJnsDs4eHf2cR3UhuhyagYzUh",
        "creatorHash": "E85ZyyjjrrsKAgeGeqBE2RSkfzs94FTdfEtefJpnJHrp",
        "nonce": 6,
        "index": 6,
        "root": "9mmsqqMU6UCMqh5eXggwSWxtfL8qEMc5bjwuizcgsN8E",
        "proof": [
          "EVpnpyr76cRj9hsbanRPPHe3Xy68Gs6X2Z2BwAtwWFTn",
          "BWJVP3XGfLCUHxWsYV3fJB5VpxgTbDikWX1w5WuFHXqz",
          "DUPLo4PDHx9zDwMAkzr5go9PRvAN8kA9B9HejTK62HSm",
          "8WkbxHTtzURPaXrj2U57TKmcQLzYk9ubre7co3vkPeBT",
          "GSz87YKd3YoZWcEKhnjSsYJwv8o5aWGdBdGGYUphRfTh",
          "zLUDhASAn7WA1Aqc724azRpZjKCjMQNATApe74JMg8C",
          "ABnEXHmveD6iuMwfw2po7t6TPjn5kYMVwYJMi3fa9K91",
          "JDh7eiWiUWtiWn623iybHqjQ6AQ6c2Czz8m6ZxwSCkta",
          "BFvmeiEuzAYcMR8YxcuCMGYPDpjcmP5hsNbcswgQ8pMc",
          "EvxphsdRErrDMs9nhFfF4nzq8i1C2KSogA7uB96TPpPR",
          "HpMJWAzQv9HFgHBqY1o8V1B27sCYPFHJdGivDA658jEL",
          "HjnrJn5vBUUzpCxzjjM9ZnCPuXei2cXKJjX468B9yWD7",
          "4YCF1CSyTXm1Yi9W9JeYevawupkomdgy2dLxEBHL9euq",
          "E3oMtCuPEauftdZLX8EZ8YX7BbFzpBCVRYEiLxwPJLY2",
          "7DiCkBhs5HQLPEsKY6EjfNd3oBswnfRk9UAZcHqczL7m",
          "FhsNgK6GGU1cRPFbmPhrEZ95Zj8vorjK6GmhFuwmZsUm",
          "3e2oBSLfSDVdUdS7jRGFKa8nreJUA9sFPEELrHaQyd4J",
          "GCXyEHiFMtRFTNFT5LNHwxiXZfooBpUMGSkjyz7pfcS5",
          "752CmMF5k7acEFEmJA7oE3aobbWj7CAZVm3KpDR6HiRV",
          "D9GGr1ycBmgRbHJyJzmxMk5aoKZmjdezB4NpxopAcgpP"
        ],
        "__typename": "bubblegumListArg"
      },
      "listingReceipt": "9JJFzSxGDGaWNBuL5szb26YNTSLuPZNmUFnnpTfnuZeY",
      "__typename": "RemoveListingResponse"
    }
  }
}
{
  "data": {
    "removeListing": "remove listing already removed"
  }
}

Fields

The table below provides an explanation of each variable in the respective column.

initiateRemoveListing:-

NameTypeDescription
orgIdUUID1The organization ID.
nftTokenIdUUID1The NFT token ID.

removeListing:-

NameTypeDescription
orgIDUUID1The organization ID.
nftTokenIdUUID1The NFT Token ID.
currencyEnumThe NFT listed currency i.e. USD or EUR.
signatureStringThe list removedthe transaction hash to confirm the transaction.