Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 尝试刻录以太坊ERC20令牌时出错_C#_Blockchain_Ethereum_Solidity_Web3 - Fatal编程技术网

C# 尝试刻录以太坊ERC20令牌时出错

C# 尝试刻录以太坊ERC20令牌时出错,c#,blockchain,ethereum,solidity,web3,C#,Blockchain,Ethereum,Solidity,Web3,我正在从事加密货币项目,目前与以太坊智能合约合作。我正在使用Nethereum web3 for.Net。我需要实现burn tokens功能,也就是说我需要从C#调用solidityburn函数。我有一些其他solidity函数的实现,例如: public virtual async Task<TReturn> CallMethodAsync<TReturn>(string abi, string contractAddress, string methodName,

我正在从事加密货币项目,目前与以太坊智能合约合作。我正在使用Nethereum web3 for.Net。我需要实现burn tokens功能,也就是说我需要从C#调用solidity
burn
函数。我有一些其他solidity函数的实现,例如:

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;
        }

    }

如果有人能帮助我,我将不胜感激。

原始合同必须定义“刻录”功能。如果没有,您显然无法与之交互。您可以显示合同的源代码或abi列表吗?从未接触过Nethereum,但所有合同解释器的工作方式都是一样的:他们接受abi,查看所有定义的函数及其参数,这就是他们模拟合同用法的方式。如果出现此错误,您可能需要检查abi以查看是否定义了burn。好的,谢谢,您是对的,我的abi不完整。
"Function not found:burn"