Kindly bare with me as I am new to Solidity and the Web.30 space.
The intention of my DApp is to be able to delay/schedule the transfers of your NFT's from your own account to someone else's.
The idea is that a user should be able to find most of his NFT details via the opensea platform and their MetaMask wallet...
Find below my simple solidity code in the Remix IDE:
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.2;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/token/ERC721/ERC721.sol";
contract CryptoGift is ERC721 {
address public owner;
uint256 private birtday = block.timestamp +30;
constructor() ERC721("Crypto Gift", "CGT") public {
owner = msg.sender;
}
function GiftAFriend (address from, address to, uint256 tokenId) public virtual {
require( block.timestamp >= birtday, "Its NOT your birthday yet!" );
safeTransferFrom(from, to, tokenId, "");
}
}
The settings I used in my Remix IDE are:
ENVIRONMENT: Web3 Provider
I was able to successfully Deploy to the Rinkeby Test Network this means I am also able to see all the interfaces in Remix as illustrated below
When running my GiftAFriend function, I used the details found in my NFT contract/address from my https://testnets.opensea.io/assets/0x1a2795bbdbc6b6fc1d777b47b9c1516a642ca7f7/1 and for the to, I used one of my fictitious MetaMask addresses.
For the tokenId, I used the tokenId at the end of my opensea address https://testnets.opensea.io/assets/0x1a2795bbdbc6b6fc1d777b47b9c1516a642ca7f7/1
When I click the transact for my GiftAFriend function I am met with the following error message in Remix:
Kindly tell me where & What I am doing wrong?