[英]Matic/Polygon transactions stopped working without code change using Nethereum
最近(可能與 EIP-1559 升級有關)以前可以工作的 matic 交易對我來說已經停止工作,即使是像轉移本國貨幣這樣的基本交易。 這些交易仍然適用於其他鏈(在 bsc 上測試)。
這是對我來說不會 go 的代碼示例。
Account = new Account(PrivateKey, 137);
Web3 = new Web3(Account, "https://polygon-rpc.com");
var transaction = await Web3.Eth.GetEtherTransferService().TransferEtherAsync(sendToPublicKey, .1m);
從上面返回的事務示例是:0xc12b1d990d7a8a512e8b39e659777db92d4afde9ceb14562ddab8a9c17a18601
返回的交易的狀態包括
這個 txn hash 是在我們的輔助節點中找到的,應該很快就會被我們的索引器拾取。
有些最終會消失,無法再追蹤。
我已經嘗試過 EIP-1559 和遺留事務。
今天我使用這個庫測試了測試網絡,我的交易是在測試網絡中發送金額
我使用此代碼創建交易
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.