forked from qubic/qubic-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqswap_struct.h
More file actions
118 lines (98 loc) · 2.25 KB
/
qswap_struct.h
File metadata and controls
118 lines (98 loc) · 2.25 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#pragma once
#include "structs.h"
struct QswapFees_output
{
uint32_t assetIssuanceFee; // Amount of qus
uint32_t poolCreationFee; // Amount of qus
uint32_t transferFee; // Amount of qus
uint32_t swapRate; // Number of 10000ths
uint32_t protocolRate; // Number of 100ths
uint32_t teamRate; // Number of 100ths
static constexpr unsigned char type()
{
return RespondContractFunction::type();
}
};
struct QswapIssueAsset_input
{
uint64_t name;
int64_t numberOfUnits;
uint64_t unitOfMeasurement;
char numberOfDecimalPlaces;
};
struct QswapTransferAssetOwnershipAndPossession_input
{
uint8_t issuer[32];
int64_t assetName;
uint8_t newOwnerAndPossessor[32];
long long numberOfUnits;
};
struct SwapQuForAssetAction_input
{
uint8_t issuer[32];
uint64_t assetName;
uint64_t assetAmountOut;
};
struct SwapAssetForQuAction_input
{
uint8_t issuer[32];
uint64_t assetName;
uint64_t assetAmountIn;
uint64_t quAmountOut;
};
struct CreatePool_input {
uint8_t issuer[32];
uint64_t assetName;
};
struct AddLiquidity_input{
uint8_t issuer[32];
uint64_t assetName;
int64_t assetAmountDesired;
int64_t quAmountMin;
int64_t assetAmountMin;
};
struct RemoveLiquidity_input{
uint8_t issuer[32];
uint64_t assetName;
int64_t burnLiquidity;
int64_t quAmountMin;
int64_t assetAmountMin;
};
struct qswapQuote_input {
uint8_t issuer[32];
uint64_t assetName;
uint64_t amount;
};
struct qswapQuote_output {
uint64_t amount;
static constexpr unsigned char type()
{
return RespondContractFunction::type();
}
};
struct qswapGetLiquidityOf_input{
uint8_t issuer[32];
uint64_t assetName;
uint8_t account[32];
};
struct qswapGetLiquidityOf_output{
uint64_t liquidity;
static constexpr unsigned char type()
{
return RespondContractFunction::type();
}
};
struct qswapGetPoolBasicState_input{
uint8_t issuer[32];
uint64_t assetName;
};
struct qswapGetPoolBasicState_output{
int64_t poolExists;
int64_t reservedQuAmount;
int64_t reservedAssetAmount;
int64_t totalLiquidity;
static constexpr unsigned char type()
{
return RespondContractFunction::type();
}
};