@hashpower/collateral-abi 0.1.0 → 0.2.0
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/CollateralVault.d.ts +8 -0
- package/dist/CollateralVault.js +10 -0
- package/dist/ContractErrors.d.ts +28 -0
- package/dist/ContractErrors.js +35 -0
- package/dist/IPortfolioMarginEngine.d.ts +84 -0
- package/dist/IPortfolioMarginEngine.js +113 -0
- package/dist/PortfolioMarginEngine.d.ts +161 -37
- package/dist/PortfolioMarginEngine.js +202 -40
- package/json/CollateralVault.json +10 -0
- package/json/ContractErrors.json +35 -0
- package/json/IPortfolioMarginEngine.json +113 -0
- package/json/PortfolioMarginEngine.json +202 -40
- package/json/package.json +7 -0
- package/package.json +1 -1
|
@@ -94,6 +94,10 @@ export declare const CollateralVaultAbi: readonly [{
|
|
|
94
94
|
readonly inputs: readonly [];
|
|
95
95
|
readonly name: "FunctionDisabled";
|
|
96
96
|
readonly type: "error";
|
|
97
|
+
}, {
|
|
98
|
+
readonly inputs: readonly [];
|
|
99
|
+
readonly name: "InvalidDependency";
|
|
100
|
+
readonly type: "error";
|
|
97
101
|
}, {
|
|
98
102
|
readonly inputs: readonly [];
|
|
99
103
|
readonly name: "InvalidInitialization";
|
|
@@ -146,6 +150,10 @@ export declare const CollateralVaultAbi: readonly [{
|
|
|
146
150
|
}];
|
|
147
151
|
readonly name: "UUPSUnsupportedProxiableUUID";
|
|
148
152
|
readonly type: "error";
|
|
153
|
+
}, {
|
|
154
|
+
readonly inputs: readonly [];
|
|
155
|
+
readonly name: "VaultMismatch";
|
|
156
|
+
readonly type: "error";
|
|
149
157
|
}, {
|
|
150
158
|
readonly inputs: readonly [];
|
|
151
159
|
readonly name: "ZeroAddress";
|
package/dist/CollateralVault.js
CHANGED
|
@@ -127,6 +127,11 @@ export const CollateralVaultAbi = [
|
|
|
127
127
|
"name": "FunctionDisabled",
|
|
128
128
|
"type": "error"
|
|
129
129
|
},
|
|
130
|
+
{
|
|
131
|
+
"inputs": [],
|
|
132
|
+
"name": "InvalidDependency",
|
|
133
|
+
"type": "error"
|
|
134
|
+
},
|
|
130
135
|
{
|
|
131
136
|
"inputs": [],
|
|
132
137
|
"name": "InvalidInitialization",
|
|
@@ -196,6 +201,11 @@ export const CollateralVaultAbi = [
|
|
|
196
201
|
"name": "UUPSUnsupportedProxiableUUID",
|
|
197
202
|
"type": "error"
|
|
198
203
|
},
|
|
204
|
+
{
|
|
205
|
+
"inputs": [],
|
|
206
|
+
"name": "VaultMismatch",
|
|
207
|
+
"type": "error"
|
|
208
|
+
},
|
|
199
209
|
{
|
|
200
210
|
"inputs": [],
|
|
201
211
|
"name": "ZeroAddress",
|
package/dist/ContractErrors.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ export declare const contractErrors: readonly [{
|
|
|
2
2
|
readonly inputs: readonly [];
|
|
3
3
|
readonly name: "NoPoints";
|
|
4
4
|
readonly type: "error";
|
|
5
|
+
}, {
|
|
6
|
+
readonly inputs: readonly [];
|
|
7
|
+
readonly name: "OracleStale";
|
|
8
|
+
readonly type: "error";
|
|
5
9
|
}, {
|
|
6
10
|
readonly inputs: readonly [{
|
|
7
11
|
readonly internalType: "string";
|
|
@@ -74,10 +78,18 @@ export declare const contractErrors: readonly [{
|
|
|
74
78
|
readonly inputs: readonly [];
|
|
75
79
|
readonly name: "AccessControlBadConfirmation";
|
|
76
80
|
readonly type: "error";
|
|
81
|
+
}, {
|
|
82
|
+
readonly inputs: readonly [];
|
|
83
|
+
readonly name: "LinearMarketAlreadyRegistered";
|
|
84
|
+
readonly type: "error";
|
|
77
85
|
}, {
|
|
78
86
|
readonly inputs: readonly [];
|
|
79
87
|
readonly name: "NotEnabled";
|
|
80
88
|
readonly type: "error";
|
|
89
|
+
}, {
|
|
90
|
+
readonly inputs: readonly [];
|
|
91
|
+
readonly name: "LinearMarketNotRegistered";
|
|
92
|
+
readonly type: "error";
|
|
81
93
|
}, {
|
|
82
94
|
readonly inputs: readonly [];
|
|
83
95
|
readonly name: "TransfersDisabled";
|
|
@@ -94,6 +106,10 @@ export declare const contractErrors: readonly [{
|
|
|
94
106
|
}];
|
|
95
107
|
readonly name: "ERC20InvalidSpender";
|
|
96
108
|
readonly type: "error";
|
|
109
|
+
}, {
|
|
110
|
+
readonly inputs: readonly [];
|
|
111
|
+
readonly name: "InvalidOracle";
|
|
112
|
+
readonly type: "error";
|
|
97
113
|
}, {
|
|
98
114
|
readonly inputs: readonly [{
|
|
99
115
|
readonly internalType: "address";
|
|
@@ -126,6 +142,14 @@ export declare const contractErrors: readonly [{
|
|
|
126
142
|
readonly inputs: readonly [];
|
|
127
143
|
readonly name: "FunctionDisabled";
|
|
128
144
|
readonly type: "error";
|
|
145
|
+
}, {
|
|
146
|
+
readonly inputs: readonly [];
|
|
147
|
+
readonly name: "VaultMismatch";
|
|
148
|
+
readonly type: "error";
|
|
149
|
+
}, {
|
|
150
|
+
readonly inputs: readonly [];
|
|
151
|
+
readonly name: "InvalidDependency";
|
|
152
|
+
readonly type: "error";
|
|
129
153
|
}, {
|
|
130
154
|
readonly inputs: readonly [];
|
|
131
155
|
readonly name: "FailedCall";
|
|
@@ -202,6 +226,10 @@ export declare const contractErrors: readonly [{
|
|
|
202
226
|
readonly inputs: readonly [];
|
|
203
227
|
readonly name: "MintingFinalized";
|
|
204
228
|
readonly type: "error";
|
|
229
|
+
}, {
|
|
230
|
+
readonly inputs: readonly [];
|
|
231
|
+
readonly name: "OracleNotSet";
|
|
232
|
+
readonly type: "error";
|
|
205
233
|
}, {
|
|
206
234
|
readonly inputs: readonly [];
|
|
207
235
|
readonly name: "InvalidInitialization";
|
package/dist/ContractErrors.js
CHANGED
|
@@ -4,6 +4,11 @@ export const contractErrors = [
|
|
|
4
4
|
"name": "NoPoints",
|
|
5
5
|
"type": "error"
|
|
6
6
|
},
|
|
7
|
+
{
|
|
8
|
+
"inputs": [],
|
|
9
|
+
"name": "OracleStale",
|
|
10
|
+
"type": "error"
|
|
11
|
+
},
|
|
7
12
|
{
|
|
8
13
|
"inputs": [
|
|
9
14
|
{
|
|
@@ -100,11 +105,21 @@ export const contractErrors = [
|
|
|
100
105
|
"name": "AccessControlBadConfirmation",
|
|
101
106
|
"type": "error"
|
|
102
107
|
},
|
|
108
|
+
{
|
|
109
|
+
"inputs": [],
|
|
110
|
+
"name": "LinearMarketAlreadyRegistered",
|
|
111
|
+
"type": "error"
|
|
112
|
+
},
|
|
103
113
|
{
|
|
104
114
|
"inputs": [],
|
|
105
115
|
"name": "NotEnabled",
|
|
106
116
|
"type": "error"
|
|
107
117
|
},
|
|
118
|
+
{
|
|
119
|
+
"inputs": [],
|
|
120
|
+
"name": "LinearMarketNotRegistered",
|
|
121
|
+
"type": "error"
|
|
122
|
+
},
|
|
108
123
|
{
|
|
109
124
|
"inputs": [],
|
|
110
125
|
"name": "TransfersDisabled",
|
|
@@ -126,6 +141,11 @@ export const contractErrors = [
|
|
|
126
141
|
"name": "ERC20InvalidSpender",
|
|
127
142
|
"type": "error"
|
|
128
143
|
},
|
|
144
|
+
{
|
|
145
|
+
"inputs": [],
|
|
146
|
+
"name": "InvalidOracle",
|
|
147
|
+
"type": "error"
|
|
148
|
+
},
|
|
129
149
|
{
|
|
130
150
|
"inputs": [
|
|
131
151
|
{
|
|
@@ -169,6 +189,16 @@ export const contractErrors = [
|
|
|
169
189
|
"name": "FunctionDisabled",
|
|
170
190
|
"type": "error"
|
|
171
191
|
},
|
|
192
|
+
{
|
|
193
|
+
"inputs": [],
|
|
194
|
+
"name": "VaultMismatch",
|
|
195
|
+
"type": "error"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"inputs": [],
|
|
199
|
+
"name": "InvalidDependency",
|
|
200
|
+
"type": "error"
|
|
201
|
+
},
|
|
172
202
|
{
|
|
173
203
|
"inputs": [],
|
|
174
204
|
"name": "FailedCall",
|
|
@@ -268,6 +298,11 @@ export const contractErrors = [
|
|
|
268
298
|
"name": "MintingFinalized",
|
|
269
299
|
"type": "error"
|
|
270
300
|
},
|
|
301
|
+
{
|
|
302
|
+
"inputs": [],
|
|
303
|
+
"name": "OracleNotSet",
|
|
304
|
+
"type": "error"
|
|
305
|
+
},
|
|
271
306
|
{
|
|
272
307
|
"inputs": [],
|
|
273
308
|
"name": "InvalidInitialization",
|
|
@@ -26,6 +26,38 @@ export declare const IPortfolioMarginEngineAbi: readonly [{
|
|
|
26
26
|
}];
|
|
27
27
|
readonly stateMutability: "view";
|
|
28
28
|
readonly type: "function";
|
|
29
|
+
}, {
|
|
30
|
+
readonly inputs: readonly [{
|
|
31
|
+
readonly internalType: "address";
|
|
32
|
+
readonly name: "user";
|
|
33
|
+
readonly type: "address";
|
|
34
|
+
}];
|
|
35
|
+
readonly name: "computePortfolioMargins";
|
|
36
|
+
readonly outputs: readonly [{
|
|
37
|
+
readonly internalType: "uint256";
|
|
38
|
+
readonly name: "im";
|
|
39
|
+
readonly type: "uint256";
|
|
40
|
+
}, {
|
|
41
|
+
readonly internalType: "uint256";
|
|
42
|
+
readonly name: "mm";
|
|
43
|
+
readonly type: "uint256";
|
|
44
|
+
}];
|
|
45
|
+
readonly stateMutability: "view";
|
|
46
|
+
readonly type: "function";
|
|
47
|
+
}, {
|
|
48
|
+
readonly inputs: readonly [{
|
|
49
|
+
readonly internalType: "address";
|
|
50
|
+
readonly name: "user";
|
|
51
|
+
readonly type: "address";
|
|
52
|
+
}];
|
|
53
|
+
readonly name: "hasRestingOrderDelta";
|
|
54
|
+
readonly outputs: readonly [{
|
|
55
|
+
readonly internalType: "bool";
|
|
56
|
+
readonly name: "";
|
|
57
|
+
readonly type: "bool";
|
|
58
|
+
}];
|
|
59
|
+
readonly stateMutability: "view";
|
|
60
|
+
readonly type: "function";
|
|
29
61
|
}, {
|
|
30
62
|
readonly inputs: readonly [];
|
|
31
63
|
readonly name: "imSpotShock";
|
|
@@ -36,6 +68,34 @@ export declare const IPortfolioMarginEngineAbi: readonly [{
|
|
|
36
68
|
}];
|
|
37
69
|
readonly stateMutability: "view";
|
|
38
70
|
readonly type: "function";
|
|
71
|
+
}, {
|
|
72
|
+
readonly inputs: readonly [{
|
|
73
|
+
readonly internalType: "address";
|
|
74
|
+
readonly name: "user";
|
|
75
|
+
readonly type: "address";
|
|
76
|
+
}];
|
|
77
|
+
readonly name: "isLiquidatable";
|
|
78
|
+
readonly outputs: readonly [{
|
|
79
|
+
readonly internalType: "bool";
|
|
80
|
+
readonly name: "";
|
|
81
|
+
readonly type: "bool";
|
|
82
|
+
}];
|
|
83
|
+
readonly stateMutability: "view";
|
|
84
|
+
readonly type: "function";
|
|
85
|
+
}, {
|
|
86
|
+
readonly inputs: readonly [{
|
|
87
|
+
readonly internalType: "uint256";
|
|
88
|
+
readonly name: "notional";
|
|
89
|
+
readonly type: "uint256";
|
|
90
|
+
}];
|
|
91
|
+
readonly name: "linearOrderMargin";
|
|
92
|
+
readonly outputs: readonly [{
|
|
93
|
+
readonly internalType: "uint256";
|
|
94
|
+
readonly name: "";
|
|
95
|
+
readonly type: "uint256";
|
|
96
|
+
}];
|
|
97
|
+
readonly stateMutability: "view";
|
|
98
|
+
readonly type: "function";
|
|
39
99
|
}, {
|
|
40
100
|
readonly inputs: readonly [];
|
|
41
101
|
readonly name: "mmSpotShock";
|
|
@@ -46,4 +106,28 @@ export declare const IPortfolioMarginEngineAbi: readonly [{
|
|
|
46
106
|
}];
|
|
47
107
|
readonly stateMutability: "view";
|
|
48
108
|
readonly type: "function";
|
|
109
|
+
}, {
|
|
110
|
+
readonly inputs: readonly [{
|
|
111
|
+
readonly internalType: "address";
|
|
112
|
+
readonly name: "user";
|
|
113
|
+
readonly type: "address";
|
|
114
|
+
}];
|
|
115
|
+
readonly name: "orderMarginOf";
|
|
116
|
+
readonly outputs: readonly [{
|
|
117
|
+
readonly internalType: "uint256";
|
|
118
|
+
readonly name: "";
|
|
119
|
+
readonly type: "uint256";
|
|
120
|
+
}];
|
|
121
|
+
readonly stateMutability: "view";
|
|
122
|
+
readonly type: "function";
|
|
123
|
+
}, {
|
|
124
|
+
readonly inputs: readonly [];
|
|
125
|
+
readonly name: "vault";
|
|
126
|
+
readonly outputs: readonly [{
|
|
127
|
+
readonly internalType: "contract ICollateralVault";
|
|
128
|
+
readonly name: "";
|
|
129
|
+
readonly type: "address";
|
|
130
|
+
}];
|
|
131
|
+
readonly stateMutability: "view";
|
|
132
|
+
readonly type: "function";
|
|
49
133
|
}];
|
|
@@ -37,6 +37,49 @@ export const IPortfolioMarginEngineAbi = [
|
|
|
37
37
|
"stateMutability": "view",
|
|
38
38
|
"type": "function"
|
|
39
39
|
},
|
|
40
|
+
{
|
|
41
|
+
"inputs": [
|
|
42
|
+
{
|
|
43
|
+
"internalType": "address",
|
|
44
|
+
"name": "user",
|
|
45
|
+
"type": "address"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"name": "computePortfolioMargins",
|
|
49
|
+
"outputs": [
|
|
50
|
+
{
|
|
51
|
+
"internalType": "uint256",
|
|
52
|
+
"name": "im",
|
|
53
|
+
"type": "uint256"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"internalType": "uint256",
|
|
57
|
+
"name": "mm",
|
|
58
|
+
"type": "uint256"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"stateMutability": "view",
|
|
62
|
+
"type": "function"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"inputs": [
|
|
66
|
+
{
|
|
67
|
+
"internalType": "address",
|
|
68
|
+
"name": "user",
|
|
69
|
+
"type": "address"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"name": "hasRestingOrderDelta",
|
|
73
|
+
"outputs": [
|
|
74
|
+
{
|
|
75
|
+
"internalType": "bool",
|
|
76
|
+
"name": "",
|
|
77
|
+
"type": "bool"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"stateMutability": "view",
|
|
81
|
+
"type": "function"
|
|
82
|
+
},
|
|
40
83
|
{
|
|
41
84
|
"inputs": [],
|
|
42
85
|
"name": "imSpotShock",
|
|
@@ -50,6 +93,44 @@ export const IPortfolioMarginEngineAbi = [
|
|
|
50
93
|
"stateMutability": "view",
|
|
51
94
|
"type": "function"
|
|
52
95
|
},
|
|
96
|
+
{
|
|
97
|
+
"inputs": [
|
|
98
|
+
{
|
|
99
|
+
"internalType": "address",
|
|
100
|
+
"name": "user",
|
|
101
|
+
"type": "address"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"name": "isLiquidatable",
|
|
105
|
+
"outputs": [
|
|
106
|
+
{
|
|
107
|
+
"internalType": "bool",
|
|
108
|
+
"name": "",
|
|
109
|
+
"type": "bool"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"stateMutability": "view",
|
|
113
|
+
"type": "function"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"inputs": [
|
|
117
|
+
{
|
|
118
|
+
"internalType": "uint256",
|
|
119
|
+
"name": "notional",
|
|
120
|
+
"type": "uint256"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"name": "linearOrderMargin",
|
|
124
|
+
"outputs": [
|
|
125
|
+
{
|
|
126
|
+
"internalType": "uint256",
|
|
127
|
+
"name": "",
|
|
128
|
+
"type": "uint256"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"stateMutability": "view",
|
|
132
|
+
"type": "function"
|
|
133
|
+
},
|
|
53
134
|
{
|
|
54
135
|
"inputs": [],
|
|
55
136
|
"name": "mmSpotShock",
|
|
@@ -62,5 +143,37 @@ export const IPortfolioMarginEngineAbi = [
|
|
|
62
143
|
],
|
|
63
144
|
"stateMutability": "view",
|
|
64
145
|
"type": "function"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"inputs": [
|
|
149
|
+
{
|
|
150
|
+
"internalType": "address",
|
|
151
|
+
"name": "user",
|
|
152
|
+
"type": "address"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"name": "orderMarginOf",
|
|
156
|
+
"outputs": [
|
|
157
|
+
{
|
|
158
|
+
"internalType": "uint256",
|
|
159
|
+
"name": "",
|
|
160
|
+
"type": "uint256"
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
"stateMutability": "view",
|
|
164
|
+
"type": "function"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"inputs": [],
|
|
168
|
+
"name": "vault",
|
|
169
|
+
"outputs": [
|
|
170
|
+
{
|
|
171
|
+
"internalType": "contract ICollateralVault",
|
|
172
|
+
"name": "",
|
|
173
|
+
"type": "address"
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"stateMutability": "view",
|
|
177
|
+
"type": "function"
|
|
65
178
|
}
|
|
66
179
|
];
|