Not able to use ERC721 token in my project

0 votes

I am trying to use ERC721 in my code but I am getting this following error:

TypeError: Data location must be "calldata" for parameter in external function, but none was given.
    function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable;
                                                                            ^--------^
Compilation failed. See above.
Truffle v5.0.2 (core: 5.0.2)
Node v10.14.1
Jan 23, 2019 in Blockchain by Sunil
610 views

1 answer to this question.

0 votes

Like this error indicates, you have to use calldata as location for data

Try this:

function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external payable;

Seems like you are using an external function and hence it is required to use calldata when you use external functions as above. 

answered Jan 23, 2019 by Omkar
• 69,210 points

Related Questions In Blockchain

0 votes
1 answer
0 votes
1 answer

How to use real world/live data in my smart contract?

You cant access/embed real world data using ...READ MORE

answered Jul 12, 2018 in Blockchain by digger
• 26,740 points
907 views
0 votes
1 answer
0 votes
1 answer

Blockchain peer not able to min block in Azure.

After trying out various ideas, making sure ...READ MORE

answered Aug 21, 2018 in Blockchain by Perry
• 17,100 points
367 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,706 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,237 views
0 votes
1 answer

Solidity geth: Error encountered during contract execution [Bad instruction]

recipes is a dynamic storage array. You need ...READ MORE

answered Oct 15, 2018 in Blockchain by Omkar
• 69,210 points
1,254 views
+1 vote
3 answers

Not able to read a file from my assets folder

Hi.. I faced a similar problem in ...READ MORE

answered Oct 25, 2018 in Blockchain by Shrikanth
6,496 views
0 votes
1 answer

Not able to invoke a contract in Ethereum Private chain using geth

Hope this helps: contract mortal { /* ...READ MORE

answered Oct 22, 2018 in Blockchain by Omkar
• 69,210 points
734 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP