-
Notifications
You must be signed in to change notification settings - Fork 0
/
Transaction.h
36 lines (33 loc) · 932 Bytes
/
Transaction.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef TRANSACTION_H
#define TRANSACTION_H
#include <iostream>
#include <string>
using namespace std;
class Transaction {
public:
Transaction();
Transaction(unsigned int from, unsigned int to, unsigned int amount, unsigned int gasFee);
bool operator ==(const Transaction& rhs) const;
bool operator != (const Transaction& rhs) const;
size_t operator()(const Transaction&) const;
//getters
string getTransactionHash();
unsigned int getFromAddress();
unsigned int getToAddress();
unsigned int getAmount();
unsigned int getGasFee();
//setter
void setTransactionHash(string transactionHash);
void setFromAddress(unsigned int fromAddress);
void setToAddress(unsigned int toAddress);
void setAmount(unsigned int amount);
void setGasFee(unsigned int gasFee);
string toString();
private:
string transactionHash;
unsigned int fromAddress;
unsigned int toAddress;
unsigned int amount;
unsigned int gasFee;
};
#endif