Hi,
I am pretty new in smart contract and solidity. I've wrote a small smart contract and have compiled and deployed in Remix (Java Script VM (London)). I have imported following libraries as well:
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
By running this transaction, I receive the following error message:
error: Note: The called function should be payable if you send value and the value you send should be less than your current balance.
I could not find the reason. Is it maybe because of the selected Token Address and Token ID (Which I've selected from etherscan)? or has another reason?
Thank u very much in advance for ur idea
Best reagrds
here again my function:
function depositNFT(address _NFTAddress, uint256 _TokenID)
public
inDealState(DealState.newEscrow)
onlyNFTOwner
{
nftAddress = _NFTAddress;
tokenID = _TokenID;
ERC721(nftAddress).safeTransferFrom(msg.sender, address(this), tokenID);
dealState = DealState.nftDeposited;
}