using System;
using System.Text;
using Nethereum.Hex.HexConvertors.Extensions;
using System.Threading.Tasks;
using Nethereum.Web3;
using Nethereum.RPC.Eth.DTOs;
public class Program
{
static async Task Main(string[] args)
{
var web3 = new Web3("https://mainnet.infura.io/v3/7238211010344719ad14a89db874158c");
var block = await web3.Eth.Blocks.GetBlockWithTransactionsByNumber.SendRequestAsync(BlockParameter.CreatePending());
foreach(var txn in block.Transactions) {
Console.WriteLine(
$@"Hash:{txn.TransactionHash}, From: {txn.From}, To: {txn.To}, Value: {txn.Value}, Nonce: {txn.Nonce}, Data: {txn.Input}");
}
}
using System; using System.Text; using Nethereum.Hex.HexConvertors.Extensions; using System.Threading.Tasks; using Nethereum.Web3; using Nethereum.RPC.Eth.DTOs;
public class Program {
}