public object ToJson() { return(new { number = Number?.ToJson(), hash = Hash?.ToJson(), parentHash = ParentHash?.ToJson(), nonce = Nonce?.ToJson(), MixHash = MixHash?.ToJson(), sha3Uncles = Sha3Uncles?.ToJson(), logsBloom = LogsBloom?.ToJson(), transactionsRoot = TransactionsRoot?.ToJson(), stateRoot = StateRoot?.ToJson(), receiptsRoot = ReceiptsRoot?.ToJson(), miner = Miner?.ToJson(), difficulty = Difficulty?.ToJson(), totalDifficulty = TotalDifficulty?.ToJson(), extraData = ExtraData?.ToJson(), size = Size?.ToJson(), gasLimit = GasLimit?.ToJson(), gasUsed = GasUsed?.ToJson(), timestamp = Timestamp?.ToJson(), transactions = Transactions?.Select(x => x.ToJson()).ToArray() ?? TransactionHashes?.Select(x => x.ToJson()).ToArray(), uncles = Uncles?.Select(x => x.ToJson()).ToArray() }); }
public object ToJson() { return(new { transactionHash = TransactionHash?.ToJson(), transactionIndex = TransactionIndex?.ToJson(), blockHash = BlockHash?.ToJson(), blockNumber = BlockNumber?.ToJson(), cumulativeGasUsed = CumulativeGasUsed?.ToJson(), gasUsed = GasUsed?.ToJson(), contractAddress = ContractAddress?.ToJson(), logs = Logs?.Select(x => x.ToJson()).ToArray(), logsBloom = LogsBloom?.ToJson(), root = Root?.ToJson(), status = Status?.ToJson() }); }
public override int GetHashCode() { unchecked { var hashCode = (Chain != null ? Chain.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TokenTransfers != null ? TokenTransfers.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Index; hashCode = (hashCode * 397) ^ (TransactionHash != null ? TransactionHash.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Value.GetHashCode(); hashCode = (hashCode * 397) ^ (FromAddress != null ? FromAddress.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ToAddress != null ? ToAddress.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Date != null ? Date.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BlockHash != null ? BlockHash.GetHashCode() : 0); hashCode = (hashCode * 397) ^ BlockNumber.GetHashCode(); hashCode = (hashCode * 397) ^ Gas.GetHashCode(); hashCode = (hashCode * 397) ^ GasPrice.GetHashCode(); hashCode = (hashCode * 397) ^ GasUsed.GetHashCode(); hashCode = (hashCode * 397) ^ Nonce.GetHashCode(); hashCode = (hashCode * 397) ^ Confirmations.GetHashCode(); hashCode = (hashCode * 397) ^ (Input != null ? Input.GetHashCode() : 0); return(hashCode); } }