These are chat archives for Nethereum/Nethereum
Some block heights would work, especially if they're closer to the current block, as geth/parity does keep some block state in memory
This might give a better insight: https://ethereum.stackexchange.com/questions/40648/full-node-sync-only-preserve-the-last-128-history-states.
@MANOJKUMARCH - You could use txpool, something like this which would return the JSON result that you can parse.
Dim obj As New Nethereum.JsonRpc.Client.RpcClient(New Uri("http://localhost:8545")) Dim res = Await obj.SendRequestAsync(Of Object)("txpool_inspect")
Though... Hmm... I think a better way might be to maintain your own nonce counter, if using a web3 object to maintain the nonce is not possible.
You're absolutely right @p0onage :)
@MANOJKUMARCH - You could refer to the below link, since you're creating a web3 object you could transfer ethers using the transaction manager, which will handle the nonce for you... Or are we missing something with your use case?
we also need to send the inputs to the transaction as a part of the logging
Hmm. Could you elaborate a bit more on this please?
txpool is not implemented as a library call but could still be called through RpcClient.
Oh - I think you can still use TransactionInput and define a transactioninput with data for that. To be clear, you're not sending to a smart contract, just a normal transaction + append with data, to a normal account?
Let me quickly test the code.
Thanks for clarifying - Something like this transaction I reckon.
See if the below code helps? There might be cleaner ways to do it though, always happy to hear suggestions.
Dim transactionInput = New Nethereum.RPC.Eth.DTOs.TransactionInput() transactionInput.Data = "0x123" transactionInput.From = account.Address transactionInput.To = "0x3d080421c9DD5fB387d6e3124f7E1C241ADE9568" transactionInput.Value = New HexBigInteger(1000000000000000) transactionInput.Gas = New HexBigInteger(50000) Dim txid = Await iweb3.Eth.TransactionManager.SendTransactionAsync(transactionInput) Dim receipt = Await iweb3.Eth.Transactions.GetTransactionReceipt.SendRequestAsync(txid) 'if receipt is received, transaction should be sent While receipt Is Nothing System.Threading.Thread.Sleep(5000) receipt = Await iweb3.Eth.Transactions.GetTransactionReceipt.SendRequestAsync(txid) End While
And of course, web3 is initialised with the account above.
If you see the code for TransactionInput, you get access to Data, and if you ever need the nonce you could use it as well.