Closed devjutsu closed 2 years ago
Same way as in Normal Nethereum, check the example of the Erc20
Actually i have just checked an in this example does not retrieve any values.. You have the documentation here: http://playground.nethereum.com/csharp/id/1005
Thank you! It really does return the value. But my concern is about MetaMask popup to confirm transaction and gas. When I try to call a function like this one:
function test(bytes4 _invite) external payable returns (uint256) {
require(msg.value >= 1 ether, "Deposit funds to play");
gameCount++;
return gameCount;
}
It doesn't ask for a MetaMask confirmation, doesn't charge the gas for this call. And doesn't change the contract state (gameCount). But it still returns the value. I might be misunderstanding something, but I wanted the same function to accept payment, modify state and return the value.
Sending transactions is different to getting data, you do not get any response back, just the transaction hash. Please come to discord to ask questions.
Hey! Is there a way I can possibly retrieve a value returned by contract function?