using Nethereum.Hex.HexTypes;
using Newtonsoft.Json;
using System.Collections;
using System.Runtime.Serialization;
namespace Nethereum.RPC.Eth.DTOs
{
[DataContract]
public class Block
{
///
/// QUANTITY - the block number. null when its pending block.
///
[DataMember(Name = "number")]
public HexBigInteger Number { get; set; }
///
/// DATA, 32 Bytes - hash of the block.
///
[DataMember(Name = "hash")]
public string BlockHash { get; set; }
///
/// block author.
///
[DataMember(Name = "author")]
public string Author { get; set; }
///
/// Seal fields.
///
[DataMember(Name = "sealFields")]
public string[] SealFields { get; set; }
///
/// DATA, 32 Bytes - hash of the parent block.
///
[DataMember(Name = "parentHash")]
public string ParentHash { get; set; }
///
/// DATA, 8 Bytes - hash of the generated proof-of-work. null when its pending block.
///
[DataMember(Name = "nonce")]
public string Nonce { get; set; }
///
/// DATA, 32 Bytes - SHA3 of the uncles data in the block.
///
[DataMember(Name = "sha3Uncles")]
public string Sha3Uncles { get; set; }
///
/// DATA, 256 Bytes - the bloom filter for the logs of the block. null when its pending block.
///
[DataMember(Name = "logsBloom")]
public string LogsBloom { get; set; }
///
/// DATA, 32 Bytes - the root of the transaction trie of the block.
///
[DataMember(Name = "transactionsRoot")]
public string TransactionsRoot { get; set; }
///
/// DATA, 32 Bytes - the root of the final state trie of the block.
///
[DataMember(Name = "stateRoot")]
public string StateRoot { get; set; }
///
/// DATA, 32 Bytes - the root of the receipts trie of the block.
///
[DataMember(Name = "receiptsRoot")]
public string ReceiptsRoot { get; set; }
///
/// DATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
///
[DataMember(Name = "miner")]
public string Miner { get; set; }
///
/// QUANTITY - integer of the difficulty for this block.
///
[DataMember(Name = "difficulty")]
public HexBigInteger Difficulty { get; set; }
///
/// QUANTITY - integer of the total difficulty of the chain until this block.
///
[DataMember(Name = "totalDifficulty")]
public HexBigInteger TotalDifficulty { get; set; }
///
/// DATA - the "mix hash" field of this block.
///
[DataMember(Name = "mixHash")]
public string MixHash { get; set; }
///
/// DATA - the "extra data" field of this block.
///
[DataMember(Name = "extraData")]
public string ExtraData { get; set; }
///
/// QUANTITY - integer the size of this block in bytes.
///
[DataMember(Name = "size")]
public HexBigInteger Size { get; set; }
///
/// QUANTITY - the maximum gas allowed in this block.
///
[DataMember(Name = "gasLimit")]
public HexBigInteger GasLimit { get; set; }
///
/// QUANTITY - the total used gas by all transactions in this block.
///
[DataMember(Name = "gasUsed")]
public HexBigInteger GasUsed { get; set; }
///
/// QUANTITY - the unix timestamp for when the block was collated.
///
[DataMember(Name = "timestamp")]
public HexBigInteger Timestamp { get; set; }
///
/// Array - Array of uncle hashes.
///
[DataMember(Name = "uncles")]
public string[] Uncles { get; set; }
///
/// QUANTITY - the base fee per gas.
///
[JsonProperty("baseFeePerGas")]
public HexBigInteger BaseFeePerGas { get; set; }
}
}