简体   繁体   English

Matic/Polygon 交易停止工作,无需使用 Nethereum 更改代码

[英]Matic/Polygon transactions stopped working without code change using Nethereum

Recently(Maybe correlated to EIP-1559 upgrade) matic transactions that would previously work have stopped working for me, even basic ones like transferring native currency.最近(可能与 EIP-1559 升级有关)以前可以工作的 matic 交易对我来说已经停止工作,即使是像转移本国货币这样的基本交易。 These transactions still work on other chains(tested on bsc).这些交易仍然适用于其他链(在 bsc 上测试)。

Here's and example of code that won't go through for me.这是对我来说不会 go 的代码示例。

Account = new Account(PrivateKey, 137);
Web3 = new Web3(Account, "https://polygon-rpc.com");

var transaction = await Web3.Eth.GetEtherTransferService().TransferEtherAsync(sendToPublicKey, .1m);

an example of a transaction returned from above is: 0xc12b1d990d7a8a512e8b39e659777db92d4afde9ceb14562ddab8a9c17a18601从上面返回的事务示例是:0xc12b1d990d7a8a512e8b39e659777db92d4afde9ceb14562ddab8a9c17a18601

the returned transaction has a status that include返回的交易的状态包括

This txn hash was found in our secondary node and should be picked up by our indexer in a short while.这个 txn hash 是在我们的辅助节点中找到的,应该很快就会被我们的索引器拾取。

some eventually disappear and can no longer be tracked.有些最终会消失,无法再追踪。

I've tried both EIP-1559 and legacy transactions.我已经尝试过 EIP-1559 和遗留事务。

today I tested the test network using this library, my transaction is sending amounts in the test network今天我使用这个库测试了测试网络,我的交易是在测试网络中发送金额

i use this code for create transaction我使用此代码创建交易

var transactionInput = EtherTransferTransactionInputBuilder.CreateTransactionInput(fromAddress, toAddress, 0.00011m);

var rawTransaction = await transactionManager.SignTransactionAsync(transactionInput);
var txnHash = await web3.Eth.Transactions.SendRawTransaction.SendRequestAsync(rawTransaction);
Console.WriteLine("txnHash: " + txnHash);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM