Fabcoin Core  0.16.2
P2P Digital Currency
tokentransactionrecord.h
Go to the documentation of this file.
1 #ifndef FABCOIN_QT_TOKENTRANSACTIONRECORD_H
2 #define FABCOIN_QT_TOKENTRANSACTIONRECORD_H
3 
4 #include <amount.h>
5 #include <uint256.h>
6 
7 #include <QList>
8 #include <QString>
9 
10 class CWallet;
11 class CTokenTx;
12 
16 {
17 public:
19  countsForBalance(false), sortKey(""),
21  { }
22 
23  enum Status {
25  Offline,
29  };
30 
34  std::string sortKey;
35 
39  qint64 depth;
40 
45 };
46 
51 {
52 public:
53  enum Type
54  {
60  SendToSelf
61  };
62 
64  static const int RecommendedNumConfirmations = 10;
65 
67  hash(), txid(), time(0), type(Other), address(""), debit(0), credit(0), label("")
68  {
69  }
70 
73  static QList<TokenTransactionRecord> decomposeTransaction(const CWallet *wallet, const CTokenTx &wtx);
74 
79  qint64 time;
81  std::string address;
84  std::string tokenSymbol;
85  uint8_t decimals;
86  std::string label;
90  QString getTxID() const;
91 
94 
97  void updateStatus(const CWallet *wallet, const CTokenTx &wtx);
98 
101  bool statusUpdateNeeded();
102 };
103 
104 #endif // FABCOIN_QT_TRANSACTIONRECORD_H
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void >> s256
Definition: Common.h:126
UI model for a token transaction.
Confirmed, but waiting for the recommended number of confirmations.
std::string sortKey
Sorting key based on status.
int cur_num_blocks
Current number of blocks (to know whether cached status is still valid)
bool countsForBalance
Token transaction counts towards available balance.
Have 6 or more confirmations (normal tx) or fully mature (mined tx)
256-bit opaque blob.
Definition: uint256.h:132
UI model for token transaction status.
PlatformStyle::TableColorType type
Definition: rpcconsole.cpp:61
Normal (sent/received) token transactions.
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Definition: wallet.h:672
TokenTransactionStatus status
Status: can change with block chain update.
struct evm_uint160be address(struct evm_env *env)
Definition: capi.c:13