Skip to content

Getting Error for transfering tokens from wallet address to a smart contract #323

Answered by PatrickAlphaC
Gireeshbd asked this question in Q&A
Discussion options

You must be logged in to vote

The transfer function looks like this:

function transfer(address _to, uint256 _value) public returns (bool success)

This only transfers tokens from itself. You're looking for transferFrom

function transferFrom(address _from, address _to, uint256 _value) public returns (bool success)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@mattjaf
Comment options

Comment options

You must be logged in to vote
1 reply
@PatrickAlphaC
Comment options

Answer selected by PatrickAlphaC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants