I'm playing around with ERC721 tokens.
I have this mint
function in my contract that is supposed to return a value, but in my client app (using Web3), the result I get from this function call only contains the transaction id.
Here is the function :
function mint() public returns (uint) {
uint newId = currentTokenId + 1;
_mint(msg.sender, newId);
currentTokenId = newId;
return currentTokenId;
}
The point of this is just making an interface to issue/mint new tokens out of this smart contract. Here is how I call it in my client app :
this.contract.methods.mint().send({from: this.account}, function(error, result) {
console.log(result) // 0x08e...00d0
})
Am I missing something? Am I misusing the Web3 framework? Or maybe I just misunderstood the return statement in Solidity?