Hi, I’m having trouble transferring an NFT to a user in my website, which is weird because I’m not having trouble with getting their NFT or giving them MATIC. The function is below. I am getting an error saying:
Error: Contract with a Signer cannot override from (operation="overrides.from", code=UNSUPPORTED_OPERATION, version=contracts/5.6.0)
My Function:
async function giveNFTtoUser(address, token) {
let userWallet = await getAddress();
let web3 = await Moralis.enableWeb3({
chainId: 0x13881,
privateKey:
"{private key for my account}"
});
console.log('in get nft')
const options = {
type: "erc721",
receiver: userWallet,
contractAddress: address,
tokenId: token
};
let transaction = await Moralis.transfer(options);
let result = await transaction.wait();
return result;
}