After deploying and using the transferFrom function, it is giving the following error: "false Transaction mined but execution failed". This is the code:
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract TransferToken {
function transferFrom(IERC20 token, address from, address to, uint amount) public{
token.transferFrom(from, to, amount);
}
}
How can I transfer my ERC20 token from wallet 1 to wallet 2? Without asking for authorization? Because this will be a form of withdrawal from an NFT game. Wallet 1 will be mine, and wallet 2 will be the player's.