Want to use erc20 function transfer to transfer erc20 Made contract referring this video https://youtu.be/-5j6Ho0Bkfk

function transfererc()payable public{
  Token token = Token(address);
} //But not working

Tried with external & payable both False transaction error.


1 Answer 1


payable means, "send me money or you can't run this function". So, I guess you didn't send money while calling the function. And I think you function doesn't need to be a payable function. So, here is a basic implementation:

function transferERC(address _to, uint256 _amount) public {
  Token(token).transfer(_to, _amount);

Not the answer you're looking for? Browse other questions tagged or ask your own question.