I am working on a cryptocurrency project with Ethereum smart contracts. I am using Nethereum web3 for .NET. I need to implement burn tokens functionality, that is to say I need to call solidity burn
function from C#. I have some implementations for other solidity functions, for example:
public virtual async Task<TReturn> CallMethodAsync<TReturn>(string abi, string contractAddress, string methodName, params object[] arguments)
{
try
{
var contract = _web3.Eth.GetContract(abi, contractAddress);
var multiplyFunction = contract.GetFunction(methodName);
var result = await multiplyFunction.CallAsync<TReturn>(arguments);
return result;
}
catch (Exception exp)
{
//TODO: log here
Debug.Write(exp);
throw;
}
}
I use this function for calling nonce
but when I try to use it for calling burn
I get the following error:
"Function not found:burn"