-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathQx.h
More file actions
50 lines (38 loc) · 757 Bytes
/
Qx.h
File metadata and controls
50 lines (38 loc) · 757 Bytes
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using namespace QPI;
struct QX
{
public:
struct Transfer_input
{
};
struct Transfer_output
{
};
public:
uint64 _earnedAmount;
uint64 _distributedAmount;
uint64 _burnedAmount;
uint32 _assetIssuanceFee; // Amount of qus
uint32 _transferFee; // Amount of qus
uint32 _tradeFee; // Number of billionths
PUBLIC(Transfer)
_
REGISTER_FUNCTIONS_FOR_USERS
_
INITIALIZE
// No need to initialize _earnedAmount and other variables with 0, whole contract state is zeroed before initialization is invoked
s->_assetIssuanceFee = 1000000000;
s->_transferFee = 1000000;
s->_tradeFee = 5000000; // 0.5%
_
BEGIN_EPOCH
_
END_EPOCH
_
BEGIN_TICK
s->_assetIssuanceFee += s->_transferFee * 13 + 1;
_
END_TICK
s->_transferFee++;
_
};