How to use the contract to mint NFTS

Hey Guys! I am using the NFT contract at https://github.com/FuelLabs/sway-applications/blob/master/NFT/NFT-contract/src/main.sw in my dapp which is used to mint NFTs. I am not able to understand how I should call the mint functions and in what order to store the metadata as well as the asset. Can someone please help me with this

Hey @sho-shoaib, please have a look at the NFT example here. this is our most up-to-date example with the latest versions. Lmk if you need anything else

1 Like

Do you mean sending requests from frontend by saying call the mint functions?


Hey Nazeeh I am getting permission denied what is the name of the file I should add in
chmod +x file_name

what you are trying to run? fuel node or the frontend server?

fuel node in order to deploy the contract, also I want to deploy it on the testnet
I just want the abi and address of the deployed contract so I can use it in my application
I had deployed the contract from sway-examples but while using the contract I got no response from contract

const contract = new FuelNFTContract(
    address,
    abi,
    signer
  )

and the error is simply {}

are you using fuels-cli? If thats the case, then you would need to use the fuels:dev command to start the node. Also, to interact with the contract, you don’t need an ABI of the contract. You can simply use the Factory contract (generated using the fuels cli) and call the contract like this