@dhedge/backend-flatcoin-core 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contracts/abi/delayed-order.js +16 -10
- package/dist/contracts/abi/leverage-module.d.ts +13 -2
- package/dist/contracts/abi/leverage-module.js +41 -0
- package/dist/contracts/abi/limit-order.d.ts +2 -13
- package/dist/contracts/abi/limit-order.js +12 -27
- package/dist/contracts/abi/liquidation-module.d.ts +13 -2
- package/dist/contracts/abi/liquidation-module.js +29 -0
- package/dist/contracts/abi/stable-module.d.ts +0 -15
- package/dist/contracts/abi/stable-module.js +0 -45
- package/package.json +1 -1
|
@@ -75,9 +75,9 @@ exports.DelayedOrder = [
|
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
indexed: false,
|
|
78
|
-
internalType: '
|
|
79
|
-
name: '
|
|
80
|
-
type: '
|
|
78
|
+
internalType: 'uint256',
|
|
79
|
+
name: 'tokenId',
|
|
80
|
+
type: 'uint256',
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
indexed: false,
|
|
@@ -85,8 +85,20 @@ exports.DelayedOrder = [
|
|
|
85
85
|
name: 'keeperFee',
|
|
86
86
|
type: 'uint256',
|
|
87
87
|
},
|
|
88
|
+
{
|
|
89
|
+
indexed: false,
|
|
90
|
+
internalType: 'uint256',
|
|
91
|
+
name: 'price',
|
|
92
|
+
type: 'uint256',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
indexed: false,
|
|
96
|
+
internalType: 'enum FlatcoinStructs.LimitOrderExecutionType',
|
|
97
|
+
name: 'limitOrderType',
|
|
98
|
+
type: 'uint8',
|
|
99
|
+
},
|
|
88
100
|
],
|
|
89
|
-
name: '
|
|
101
|
+
name: 'LimitOrderExecuted',
|
|
90
102
|
type: 'event',
|
|
91
103
|
},
|
|
92
104
|
{
|
|
@@ -104,12 +116,6 @@ exports.DelayedOrder = [
|
|
|
104
116
|
name: 'orderType',
|
|
105
117
|
type: 'uint8',
|
|
106
118
|
},
|
|
107
|
-
{
|
|
108
|
-
indexed: false,
|
|
109
|
-
internalType: 'uint256',
|
|
110
|
-
name: 'keeperFee',
|
|
111
|
-
type: 'uint256',
|
|
112
|
-
},
|
|
113
119
|
],
|
|
114
120
|
name: 'OrderCancelled',
|
|
115
121
|
type: 'event',
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
export declare const LeverageModule: ({
|
|
2
2
|
anonymous: boolean;
|
|
3
|
-
inputs: {
|
|
3
|
+
inputs: ({
|
|
4
4
|
indexed: boolean;
|
|
5
5
|
internalType: string;
|
|
6
6
|
name: string;
|
|
7
7
|
type: string;
|
|
8
|
-
|
|
8
|
+
components?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
components: {
|
|
11
|
+
internalType: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: string;
|
|
14
|
+
}[];
|
|
15
|
+
indexed: boolean;
|
|
16
|
+
internalType: string;
|
|
17
|
+
name: string;
|
|
18
|
+
type: string;
|
|
19
|
+
})[];
|
|
9
20
|
name: string;
|
|
10
21
|
type: string;
|
|
11
22
|
outputs?: undefined;
|
|
@@ -11,6 +11,35 @@ exports.LeverageModule = [
|
|
|
11
11
|
name: 'tokenId',
|
|
12
12
|
type: 'uint256',
|
|
13
13
|
},
|
|
14
|
+
{
|
|
15
|
+
indexed: false,
|
|
16
|
+
internalType: 'uint256',
|
|
17
|
+
name: 'closePrice',
|
|
18
|
+
type: 'uint256',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
components: [
|
|
22
|
+
{
|
|
23
|
+
internalType: 'int256',
|
|
24
|
+
name: 'profitLoss',
|
|
25
|
+
type: 'int256',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
internalType: 'int256',
|
|
29
|
+
name: 'accruedFunding',
|
|
30
|
+
type: 'int256',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
internalType: 'int256',
|
|
34
|
+
name: 'marginAfterSettlement',
|
|
35
|
+
type: 'int256',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
indexed: false,
|
|
39
|
+
internalType: 'struct FlatcoinStructs.PositionSummary',
|
|
40
|
+
name: 'positionSummary',
|
|
41
|
+
type: 'tuple',
|
|
42
|
+
},
|
|
14
43
|
],
|
|
15
44
|
name: 'LeverageClose',
|
|
16
45
|
type: 'event',
|
|
@@ -30,6 +59,12 @@ exports.LeverageModule = [
|
|
|
30
59
|
name: 'tokenId',
|
|
31
60
|
type: 'uint256',
|
|
32
61
|
},
|
|
62
|
+
{
|
|
63
|
+
indexed: false,
|
|
64
|
+
internalType: 'uint256',
|
|
65
|
+
name: 'entryPrice',
|
|
66
|
+
type: 'uint256',
|
|
67
|
+
},
|
|
33
68
|
],
|
|
34
69
|
name: 'LeverageOpen',
|
|
35
70
|
type: 'event',
|
|
@@ -43,6 +78,12 @@ exports.LeverageModule = [
|
|
|
43
78
|
name: 'tokenId',
|
|
44
79
|
type: 'uint256',
|
|
45
80
|
},
|
|
81
|
+
{
|
|
82
|
+
indexed: false,
|
|
83
|
+
internalType: 'uint256',
|
|
84
|
+
name: 'lastPrice',
|
|
85
|
+
type: 'uint256',
|
|
86
|
+
},
|
|
46
87
|
],
|
|
47
88
|
name: 'LeverageAdjust',
|
|
48
89
|
type: 'event',
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
export declare const LimitOrder: ({
|
|
2
|
-
anonymous: boolean;
|
|
3
|
-
inputs: {
|
|
4
|
-
indexed: boolean;
|
|
5
|
-
internalType: string;
|
|
6
|
-
name: string;
|
|
7
|
-
type: string;
|
|
8
|
-
}[];
|
|
9
|
-
name: string;
|
|
10
|
-
type: string;
|
|
11
|
-
outputs?: undefined;
|
|
12
|
-
stateMutability?: undefined;
|
|
13
|
-
} | {
|
|
14
2
|
inputs: {
|
|
15
3
|
internalType: string;
|
|
16
4
|
name: string;
|
|
@@ -46,14 +34,15 @@ export declare const LimitOrder: ({
|
|
|
46
34
|
type: string;
|
|
47
35
|
anonymous?: undefined;
|
|
48
36
|
} | {
|
|
37
|
+
anonymous: boolean;
|
|
49
38
|
inputs: {
|
|
39
|
+
indexed: boolean;
|
|
50
40
|
internalType: string;
|
|
51
41
|
name: string;
|
|
52
42
|
type: string;
|
|
53
43
|
}[];
|
|
54
44
|
name: string;
|
|
55
45
|
type: string;
|
|
56
|
-
anonymous?: undefined;
|
|
57
46
|
outputs?: undefined;
|
|
58
47
|
stateMutability?: undefined;
|
|
59
48
|
})[];
|
|
@@ -2,32 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LimitOrder = void 0;
|
|
4
4
|
exports.LimitOrder = [
|
|
5
|
-
{
|
|
6
|
-
anonymous: false,
|
|
7
|
-
inputs: [
|
|
8
|
-
{
|
|
9
|
-
indexed: false,
|
|
10
|
-
internalType: 'uint8',
|
|
11
|
-
name: 'version',
|
|
12
|
-
type: 'uint8',
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
name: 'Initialized',
|
|
16
|
-
type: 'event',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
inputs: [],
|
|
20
|
-
name: 'MODULE_KEY',
|
|
21
|
-
outputs: [
|
|
22
|
-
{
|
|
23
|
-
internalType: 'bytes32',
|
|
24
|
-
name: '',
|
|
25
|
-
type: 'bytes32',
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
stateMutability: 'view',
|
|
29
|
-
type: 'function',
|
|
30
|
-
},
|
|
31
5
|
{
|
|
32
6
|
inputs: [
|
|
33
7
|
{
|
|
@@ -182,23 +156,28 @@ exports.LimitOrder = [
|
|
|
182
156
|
type: 'function',
|
|
183
157
|
},
|
|
184
158
|
{
|
|
159
|
+
anonymous: false,
|
|
185
160
|
inputs: [
|
|
186
161
|
{
|
|
162
|
+
indexed: false,
|
|
187
163
|
internalType: 'address',
|
|
188
164
|
name: 'account',
|
|
189
165
|
type: 'address',
|
|
190
166
|
},
|
|
191
167
|
{
|
|
168
|
+
indexed: false,
|
|
192
169
|
internalType: 'uint256',
|
|
193
170
|
name: 'tokenId',
|
|
194
171
|
type: 'uint256',
|
|
195
172
|
},
|
|
196
173
|
{
|
|
174
|
+
indexed: false,
|
|
197
175
|
internalType: 'uint256',
|
|
198
176
|
name: 'priceLowerThreshold',
|
|
199
177
|
type: 'uint256',
|
|
200
178
|
},
|
|
201
179
|
{
|
|
180
|
+
indexed: false,
|
|
202
181
|
internalType: 'uint256',
|
|
203
182
|
name: 'priceUpperThreshold',
|
|
204
183
|
type: 'uint256',
|
|
@@ -208,28 +187,34 @@ exports.LimitOrder = [
|
|
|
208
187
|
type: 'event',
|
|
209
188
|
},
|
|
210
189
|
{
|
|
190
|
+
anonymous: false,
|
|
211
191
|
inputs: [
|
|
212
192
|
{
|
|
193
|
+
indexed: false,
|
|
213
194
|
internalType: 'address',
|
|
214
195
|
name: 'account',
|
|
215
196
|
type: 'address',
|
|
216
197
|
},
|
|
217
198
|
{
|
|
199
|
+
indexed: false,
|
|
218
200
|
internalType: 'uint256',
|
|
219
201
|
name: 'tokenId',
|
|
220
202
|
type: 'uint256',
|
|
221
203
|
},
|
|
222
204
|
{
|
|
205
|
+
indexed: false,
|
|
223
206
|
internalType: 'uint256',
|
|
224
207
|
name: 'keeperFee',
|
|
225
208
|
type: 'uint256',
|
|
226
209
|
},
|
|
227
210
|
{
|
|
211
|
+
indexed: false,
|
|
228
212
|
internalType: 'uint256',
|
|
229
213
|
name: 'price',
|
|
230
214
|
type: 'uint256',
|
|
231
215
|
},
|
|
232
216
|
{
|
|
217
|
+
indexed: false,
|
|
233
218
|
internalType: 'enum FlatcoinStructs.LimitOrderExecutionType',
|
|
234
219
|
name: 'limitOrderType',
|
|
235
220
|
type: 'uint8',
|
|
@@ -244,7 +229,7 @@ exports.LimitOrder = [
|
|
|
244
229
|
{
|
|
245
230
|
indexed: false,
|
|
246
231
|
internalType: 'address',
|
|
247
|
-
name: 'account
|
|
232
|
+
name: 'account',
|
|
248
233
|
type: 'address',
|
|
249
234
|
},
|
|
250
235
|
{
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
export declare const LiquidationModule: ({
|
|
2
2
|
anonymous: boolean;
|
|
3
|
-
inputs: {
|
|
3
|
+
inputs: ({
|
|
4
4
|
indexed: boolean;
|
|
5
5
|
internalType: string;
|
|
6
6
|
name: string;
|
|
7
7
|
type: string;
|
|
8
|
-
|
|
8
|
+
components?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
components: {
|
|
11
|
+
internalType: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: string;
|
|
14
|
+
}[];
|
|
15
|
+
indexed: boolean;
|
|
16
|
+
internalType: string;
|
|
17
|
+
name: string;
|
|
18
|
+
type: string;
|
|
19
|
+
})[];
|
|
9
20
|
name: string;
|
|
10
21
|
type: string;
|
|
11
22
|
outputs?: undefined;
|
|
@@ -23,6 +23,35 @@ exports.LiquidationModule = [
|
|
|
23
23
|
name: 'liquidationFee',
|
|
24
24
|
type: 'uint256',
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
indexed: false,
|
|
28
|
+
internalType: 'uint256',
|
|
29
|
+
name: 'closePrice',
|
|
30
|
+
type: 'uint256',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
components: [
|
|
34
|
+
{
|
|
35
|
+
internalType: 'int256',
|
|
36
|
+
name: 'profitLoss',
|
|
37
|
+
type: 'int256',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
internalType: 'int256',
|
|
41
|
+
name: 'accruedFunding',
|
|
42
|
+
type: 'int256',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
internalType: 'int256',
|
|
46
|
+
name: 'marginAfterSettlement',
|
|
47
|
+
type: 'int256',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
indexed: false,
|
|
51
|
+
internalType: 'struct FlatcoinStructs.PositionSummary',
|
|
52
|
+
name: 'positionSummary',
|
|
53
|
+
type: 'tuple',
|
|
54
|
+
},
|
|
26
55
|
],
|
|
27
56
|
name: 'PositionLiquidated',
|
|
28
57
|
type: 'event',
|
|
@@ -12,7 +12,6 @@ export declare const StableModule: ({
|
|
|
12
12
|
}[];
|
|
13
13
|
stateMutability: string;
|
|
14
14
|
type: string;
|
|
15
|
-
anonymous?: undefined;
|
|
16
15
|
} | {
|
|
17
16
|
inputs: {
|
|
18
17
|
internalType: string;
|
|
@@ -23,24 +22,10 @@ export declare const StableModule: ({
|
|
|
23
22
|
type: string;
|
|
24
23
|
name?: undefined;
|
|
25
24
|
outputs?: undefined;
|
|
26
|
-
anonymous?: undefined;
|
|
27
|
-
} | {
|
|
28
|
-
anonymous: boolean;
|
|
29
|
-
inputs: {
|
|
30
|
-
indexed: boolean;
|
|
31
|
-
internalType: string;
|
|
32
|
-
name: string;
|
|
33
|
-
type: string;
|
|
34
|
-
}[];
|
|
35
|
-
name: string;
|
|
36
|
-
type: string;
|
|
37
|
-
outputs?: undefined;
|
|
38
|
-
stateMutability?: undefined;
|
|
39
25
|
} | {
|
|
40
26
|
stateMutability: string;
|
|
41
27
|
type: string;
|
|
42
28
|
inputs?: undefined;
|
|
43
29
|
name?: undefined;
|
|
44
30
|
outputs?: undefined;
|
|
45
|
-
anonymous?: undefined;
|
|
46
31
|
})[];
|
|
@@ -42,51 +42,6 @@ exports.StableModule = [
|
|
|
42
42
|
stateMutability: 'payable',
|
|
43
43
|
type: 'constructor',
|
|
44
44
|
},
|
|
45
|
-
{
|
|
46
|
-
anonymous: false,
|
|
47
|
-
inputs: [
|
|
48
|
-
{
|
|
49
|
-
indexed: false,
|
|
50
|
-
internalType: 'address',
|
|
51
|
-
name: 'previousAdmin',
|
|
52
|
-
type: 'address',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
indexed: false,
|
|
56
|
-
internalType: 'address',
|
|
57
|
-
name: 'newAdmin',
|
|
58
|
-
type: 'address',
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
name: 'AdminChanged',
|
|
62
|
-
type: 'event',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
anonymous: false,
|
|
66
|
-
inputs: [
|
|
67
|
-
{
|
|
68
|
-
indexed: true,
|
|
69
|
-
internalType: 'address',
|
|
70
|
-
name: 'beacon',
|
|
71
|
-
type: 'address',
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
name: 'BeaconUpgraded',
|
|
75
|
-
type: 'event',
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
anonymous: false,
|
|
79
|
-
inputs: [
|
|
80
|
-
{
|
|
81
|
-
indexed: true,
|
|
82
|
-
internalType: 'address',
|
|
83
|
-
name: 'implementation',
|
|
84
|
-
type: 'address',
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
name: 'Upgraded',
|
|
88
|
-
type: 'event',
|
|
89
|
-
},
|
|
90
45
|
{
|
|
91
46
|
stateMutability: 'payable',
|
|
92
47
|
type: 'fallback',
|