【问题标题】:Nethereum invalid sender: eth_sendRawTransaction on polygon chainNethereum 无效发件人:多边形链上的 eth_sendRawTransaction
【发布时间】:2021-12-11 01:59:38
【问题描述】:
static async Task SendTx(Wallet wallet, string toAddress, double amountOfCoins)
        {
            var accountFrom = new Account(wallet.GetAccount(0).PrivateKey, 137);
            
                        
            var web3 = new Web3(accountFrom, network);
            var wei = Web3.Convert.ToWei(amountOfCoins);
            decimal amt = 2.99m;
           var tx = await web3.Eth.GetEtherTransferService().TransferEtherAsync(toAddress, amt);

invalid sender: eth_sendRawTransaction 引发错误。我在另一个函数中创建了钱包。当我尝试调试它时,信息看起来是正确的。从地址和到地址看起来不错,我知道钱包有余额....等等。当我在 Polygon 网络上进行交易时,除了声明chainID(137) 之外,我还有什么特别需要做的吗?

谁能告诉我我做错了什么?

【问题讨论】:

    标签: blockchain ethereum send nethereum matic


    【解决方案1】:

    好的,知道了。您必须设置web3.TransactionManager.UseLegacyAsDefault = true并手动跳过设置gas费。享受:-)

    https://github.com/Nethereum/Nethereum/issues/750

    【讨论】:

      猜你喜欢
      • 2021-11-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-09
      • 1970-01-01
      相关资源
      最近更新 更多