Exemple #1
0
 public PoolInfo(TestApi.Pool pool)
 {
     Time    = ConvUtils.UnixTimeStampToDateTime(pool.Time);
     Hash    = ConvUtils.ConvertHash(pool.Hash);
     TxCount = pool.TransactionsCount;
     Number  = pool.PoolNumber;
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 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;
 }
Exemple #4
0
 public static string GetTxId(Release.TransactionId id)
 {
     return(id == null ? null : $"{ConvUtils.ConvertHash(id.PoolHash)}.{id.Index + 1}");
 }