public TokenTransfer(Release.TokenTransfer t) { Initiator = Base58Encoding.Encode(t.Initiator); Amount = t.Amount; Time = ConvUtils.UnixTimeStampToDateTime(t.Time); Transaction = ConvUtils.GetTxId(t.Transaction); }
public AccountData(Release.WalletInfo info) { Address = Base58Encoding.Encode(info.Address); Balance = ConvUtils.FormatAmount(info.Balance); TxCount = (int)info.TransactionsNumber; FirstTxDateTime = ConvUtils.UnixTimeStampToDateTime(info.FirstTransactionTime); }
public ContractInfo(TestApi.SmartContract sc) { Address = Base58Encoding.Encode(sc.Address); SourceCode = ConvUtils.FormatSrc(sc.SourceCode); HashState = sc.HashState; ByteCodeLen = sc.ByteCode.Length; Deployer = Base58Encoding.Encode(sc.Deployer); }
public TokenTransaction(Release.TokenTransaction t, int index) { Index = index; Id = ConvUtils.GetTxId(t.Transaction); Time = ConvUtils.UnixTimeStampToDateTime(t.Time); Initiator = Base58Encoding.Encode(t.Initiator); Method = t.Method; Params = string.Join(", ", t.Params); }
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 TokenInfo2(Release.TokenInfo t) { Address = Base58Encoding.Encode(t.Address); Code = t.Code; Name = t.Name; HoldersCount = t.HoldersCount; TotalSupply = t.TotalSupply; Owner = Base58Encoding.Encode(t.Owner); TransactionsCount = t.TransactionsCount; TransfersCount = t.TransfersCount; Found = true; }
public TransactionInfo(int idx, string id, TestApi.Transaction tr) { Index = idx; Id = id; Value = ConvUtils.FormatAmount(tr.Amount); FromAccount = Base58Encoding.Encode(tr.Source); ToAccount = Base58Encoding.Encode(tr.Target); Currency = tr.Currency; Fee = "0"; if (tr.SmartContract == null) { return; } SmartContractSource = tr.SmartContract.SourceCode; SmartContractHashState = tr.SmartContract.HashState; }
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 TransactionInfo(int idx, Release.TransactionId id, Release.Transaction tr) { Index = idx; Id = ConvUtils.GetTxId(id); Value = ConvUtils.FormatAmount(tr.Amount); FromAccount = Base58Encoding.Encode(tr.Source); ToAccount = Base58Encoding.Encode(tr.Target); Currency = "CS"; Fee = ConvUtils.FormatAmount(tr.Fee); InnerId = tr.Id; if (tr.SmartContract == null) { return; } if (string.IsNullOrEmpty(tr.SmartContract.Method)) { return; } Method = $"{tr.SmartContract.Method}({string.Join(',', tr.SmartContract.Params)})"; }
public static string ConvertHashPartial(string hash) { return(Base58Encoding.Encode(ConvertHashBack(hash))); }
public bool Loading; // For displaying token transfers, store loading flag here in js public TokenBalance(Release.TokenBalance b) { Address = Base58Encoding.Encode(b.Token); Code = b.Code; Balance = b.Balance; }
public TokenHolder(Release.TokenHolder t) { Address = Base58Encoding.Encode(t.Holder); Balance = t.Balance; TransfersCount = t.TransfersCount; }