public PoolInfo(TestApi.Pool pool) { Time = ConvUtils.UnixTimeStampToDateTime(pool.Time); Hash = ConvUtils.ConvertHash(pool.Hash); TxCount = pool.TransactionsCount; Number = pool.PoolNumber; }
public BlockInfo(Release.Pool pool) { Time = ConvUtils.UnixTimeStampToDateTime(pool.Time); Hash = ConvUtils.ConvertHash(pool.Hash); TxCount = pool.TransactionsCount; Number = pool.PoolNumber; Fee = ConvUtils.FormatAmount(pool.TotalFee); Writer = Base58Encoding.Encode(pool.Writer); }
public TransactionInfo(int idx, Release.TransactionId id, Release.Transaction tr) { Index = idx; if (id != null) { Id = $"{ConvUtils.ConvertHash(id.PoolHash)}.{id.Index + 1}"; } Value = ConvUtils.FormatAmount(tr.Amount); FromAccount = Base58Encoding.Encode(tr.Source); ToAccount = Base58Encoding.Encode(tr.Target); Currency = "CS"; Fee = "0"; if (tr.SmartContract == null) { return; } SmartContractSource = tr.SmartContract.SourceCode; SmartContractHashState = tr.SmartContract.HashState; }
public static string GetTxId(Release.TransactionId id) { return(id == null ? null : $"{ConvUtils.ConvertHash(id.PoolHash)}.{id.Index + 1}"); }