@gauntlet-xyz/sdk 1.0.6 → 2.3.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/README.md +82 -1
- package/dist/api/activity.d.ts +70 -0
- package/dist/api/activity.d.ts.map +1 -0
- package/dist/api/activity.js +154 -0
- package/dist/api/activity.js.map +1 -0
- package/dist/api/caip.d.ts +29 -0
- package/dist/api/caip.d.ts.map +1 -0
- package/dist/api/caip.js +38 -0
- package/dist/api/caip.js.map +1 -0
- package/dist/api/client.d.ts +114 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +109 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/decimal.d.ts +21 -0
- package/dist/api/decimal.d.ts.map +1 -0
- package/dist/api/decimal.js +44 -0
- package/dist/api/decimal.js.map +1 -0
- package/dist/api/errors.d.ts +32 -0
- package/dist/api/errors.d.ts.map +1 -0
- package/dist/api/errors.js +41 -0
- package/dist/api/errors.js.map +1 -0
- package/dist/api/generated.d.ts +1461 -0
- package/dist/api/generated.d.ts.map +1 -0
- package/dist/api/generated.js +6 -0
- package/dist/api/generated.js.map +1 -0
- package/dist/api/http.d.ts +16 -0
- package/dist/api/http.d.ts.map +1 -0
- package/dist/api/http.js +39 -0
- package/dist/api/http.js.map +1 -0
- package/dist/api/index.d.ts +14 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +8 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/positionHistory.d.ts +44 -0
- package/dist/api/positionHistory.d.ts.map +1 -0
- package/dist/api/positionHistory.js +126 -0
- package/dist/api/positionHistory.js.map +1 -0
- package/dist/client.d.ts +6 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -0
- package/dist/client.js.map +1 -1
- package/dist/constants.d.ts +16 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +28 -0
- package/dist/constants.js.map +1 -0
- package/dist/errors.d.ts +18 -3
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +20 -2
- package/dist/errors.js.map +1 -1
- package/dist/evm/abis/priceAndFeeCalculatorV2.d.ts +233 -0
- package/dist/evm/abis/priceAndFeeCalculatorV2.d.ts.map +1 -0
- package/dist/evm/abis/priceAndFeeCalculatorV2.js +119 -0
- package/dist/evm/abis/priceAndFeeCalculatorV2.js.map +1 -0
- package/dist/evm/abis/provisionerV2.d.ts +684 -0
- package/dist/evm/abis/provisionerV2.d.ts.map +1 -0
- package/dist/evm/abis/provisionerV2.js +262 -0
- package/dist/evm/abis/provisionerV2.js.map +1 -0
- package/dist/evm/adapters/aera.d.ts +3 -3
- package/dist/evm/adapters/aera.d.ts.map +1 -1
- package/dist/evm/adapters/aera.js +179 -103
- package/dist/evm/adapters/aera.js.map +1 -1
- package/dist/evm/adapters/types.d.ts +12 -1
- package/dist/evm/adapters/types.d.ts.map +1 -1
- package/dist/evm/aeraContracts/priceAndFeeCalculator.d.ts +41 -0
- package/dist/evm/aeraContracts/priceAndFeeCalculator.d.ts.map +1 -0
- package/dist/evm/aeraContracts/priceAndFeeCalculator.js +140 -0
- package/dist/evm/aeraContracts/priceAndFeeCalculator.js.map +1 -0
- package/dist/evm/aeraContracts/v1.d.ts +2317 -0
- package/dist/evm/aeraContracts/v1.d.ts.map +1 -0
- package/dist/evm/aeraContracts/v1.js +59 -0
- package/dist/evm/aeraContracts/v1.js.map +1 -0
- package/dist/evm/aeraContracts/v2.d.ts +4146 -0
- package/dist/evm/aeraContracts/v2.d.ts.map +1 -0
- package/dist/evm/aeraContracts/v2.js +217 -0
- package/dist/evm/aeraContracts/v2.js.map +1 -0
- package/dist/evm/aeraContracts.d.ts +23 -2316
- package/dist/evm/aeraContracts.d.ts.map +1 -1
- package/dist/evm/aeraContracts.js +117 -24
- package/dist/evm/aeraContracts.js.map +1 -1
- package/dist/evm/deposit.d.ts +5 -1
- package/dist/evm/deposit.d.ts.map +1 -1
- package/dist/evm/deposit.js +28 -14
- package/dist/evm/deposit.js.map +1 -1
- package/dist/evm/depositReceiverApproval.d.ts +17 -0
- package/dist/evm/depositReceiverApproval.d.ts.map +1 -0
- package/dist/evm/depositReceiverApproval.js +32 -0
- package/dist/evm/depositReceiverApproval.js.map +1 -0
- package/dist/evm/index.d.ts +8 -1
- package/dist/evm/index.d.ts.map +1 -1
- package/dist/evm/index.js +4 -0
- package/dist/evm/index.js.map +1 -1
- package/dist/evm/operationMode.d.ts +9 -0
- package/dist/evm/operationMode.d.ts.map +1 -0
- package/dist/evm/operationMode.js +41 -0
- package/dist/evm/operationMode.js.map +1 -0
- package/dist/evm/types.d.ts +5 -3
- package/dist/evm/types.d.ts.map +1 -1
- package/dist/evm/types.js +4 -1
- package/dist/evm/types.js.map +1 -1
- package/dist/evm/userCurrentBalance.d.ts.map +1 -1
- package/dist/evm/userCurrentBalance.js +68 -58
- package/dist/evm/userCurrentBalance.js.map +1 -1
- package/dist/evm/withdraw.d.ts +5 -1
- package/dist/evm/withdraw.d.ts.map +1 -1
- package/dist/evm/withdraw.js +25 -13
- package/dist/evm/withdraw.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/privy/index.d.ts +52 -0
- package/dist/privy/index.d.ts.map +1 -0
- package/dist/privy/index.js +51 -0
- package/dist/privy/index.js.map +1 -0
- package/manifest/vaults.json +316 -132
- package/package.json +2 -2
- package/src/api/activity.ts +219 -0
- package/src/api/caip.ts +61 -0
- package/src/api/client.ts +201 -0
- package/src/api/decimal.ts +49 -0
- package/src/api/errors.ts +64 -0
- package/src/api/generated.ts +1461 -0
- package/src/api/http.ts +62 -0
- package/src/api/index.ts +65 -0
- package/src/api/positionHistory.ts +167 -0
- package/src/client.ts +7 -1
- package/src/constants.ts +32 -0
- package/src/errors.ts +44 -5
- package/src/evm/abis/priceAndFeeCalculatorV2.ts +118 -0
- package/src/evm/abis/provisionerV2.ts +261 -0
- package/src/evm/adapters/aera.ts +419 -137
- package/src/evm/adapters/types.ts +19 -1
- package/src/evm/aeraContracts/priceAndFeeCalculator.ts +223 -0
- package/src/evm/aeraContracts/v1.ts +157 -0
- package/src/evm/aeraContracts/v2.ts +466 -0
- package/src/evm/aeraContracts.ts +173 -52
- package/src/evm/deposit.ts +48 -16
- package/src/evm/depositReceiverApproval.ts +51 -0
- package/src/evm/index.ts +23 -1
- package/src/evm/operationMode.ts +60 -0
- package/src/evm/types.ts +7 -3
- package/src/evm/userCurrentBalance.ts +80 -55
- package/src/evm/withdraw.ts +42 -15
- package/src/index.ts +21 -0
- package/src/privy/index.ts +95 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
export declare const priceAndFeeCalculatorV2Abi: readonly [{
|
|
2
|
+
readonly type: "function";
|
|
3
|
+
readonly inputs: readonly [{
|
|
4
|
+
readonly name: "vault";
|
|
5
|
+
readonly internalType: "address";
|
|
6
|
+
readonly type: "address";
|
|
7
|
+
}, {
|
|
8
|
+
readonly name: "token";
|
|
9
|
+
readonly internalType: "contract IERC20";
|
|
10
|
+
readonly type: "address";
|
|
11
|
+
}, {
|
|
12
|
+
readonly name: "tokenAmount";
|
|
13
|
+
readonly internalType: "uint256";
|
|
14
|
+
readonly type: "uint256";
|
|
15
|
+
}];
|
|
16
|
+
readonly name: "convertTokenToUnits";
|
|
17
|
+
readonly outputs: readonly [{
|
|
18
|
+
readonly name: "unitsAmount";
|
|
19
|
+
readonly internalType: "uint256";
|
|
20
|
+
readonly type: "uint256";
|
|
21
|
+
}];
|
|
22
|
+
readonly stateMutability: "view";
|
|
23
|
+
}, {
|
|
24
|
+
readonly type: "function";
|
|
25
|
+
readonly inputs: readonly [{
|
|
26
|
+
readonly name: "vault";
|
|
27
|
+
readonly internalType: "address";
|
|
28
|
+
readonly type: "address";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "token";
|
|
31
|
+
readonly internalType: "contract IERC20";
|
|
32
|
+
readonly type: "address";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "tokenAmount";
|
|
35
|
+
readonly internalType: "uint256";
|
|
36
|
+
readonly type: "uint256";
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "rounding";
|
|
39
|
+
readonly internalType: "enum Math.Rounding";
|
|
40
|
+
readonly type: "uint8";
|
|
41
|
+
}];
|
|
42
|
+
readonly name: "convertTokenToUnitsIfActive";
|
|
43
|
+
readonly outputs: readonly [{
|
|
44
|
+
readonly name: "unitsAmount";
|
|
45
|
+
readonly internalType: "uint256";
|
|
46
|
+
readonly type: "uint256";
|
|
47
|
+
}];
|
|
48
|
+
readonly stateMutability: "view";
|
|
49
|
+
}, {
|
|
50
|
+
readonly type: "function";
|
|
51
|
+
readonly inputs: readonly [{
|
|
52
|
+
readonly name: "vault";
|
|
53
|
+
readonly internalType: "address";
|
|
54
|
+
readonly type: "address";
|
|
55
|
+
}, {
|
|
56
|
+
readonly name: "token";
|
|
57
|
+
readonly internalType: "contract IERC20";
|
|
58
|
+
readonly type: "address";
|
|
59
|
+
}, {
|
|
60
|
+
readonly name: "unitsAmount";
|
|
61
|
+
readonly internalType: "uint256";
|
|
62
|
+
readonly type: "uint256";
|
|
63
|
+
}];
|
|
64
|
+
readonly name: "convertUnitsToToken";
|
|
65
|
+
readonly outputs: readonly [{
|
|
66
|
+
readonly name: "tokenAmount";
|
|
67
|
+
readonly internalType: "uint256";
|
|
68
|
+
readonly type: "uint256";
|
|
69
|
+
}];
|
|
70
|
+
readonly stateMutability: "view";
|
|
71
|
+
}, {
|
|
72
|
+
readonly type: "function";
|
|
73
|
+
readonly inputs: readonly [{
|
|
74
|
+
readonly name: "vault";
|
|
75
|
+
readonly internalType: "address";
|
|
76
|
+
readonly type: "address";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "token";
|
|
79
|
+
readonly internalType: "contract IERC20";
|
|
80
|
+
readonly type: "address";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "unitsAmount";
|
|
83
|
+
readonly internalType: "uint256";
|
|
84
|
+
readonly type: "uint256";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "rounding";
|
|
87
|
+
readonly internalType: "enum Math.Rounding";
|
|
88
|
+
readonly type: "uint8";
|
|
89
|
+
}];
|
|
90
|
+
readonly name: "convertUnitsToTokenIfActive";
|
|
91
|
+
readonly outputs: readonly [{
|
|
92
|
+
readonly name: "tokenAmount";
|
|
93
|
+
readonly internalType: "uint256";
|
|
94
|
+
readonly type: "uint256";
|
|
95
|
+
}];
|
|
96
|
+
readonly stateMutability: "view";
|
|
97
|
+
}, {
|
|
98
|
+
readonly type: "function";
|
|
99
|
+
readonly inputs: readonly [{
|
|
100
|
+
readonly name: "vault";
|
|
101
|
+
readonly internalType: "address";
|
|
102
|
+
readonly type: "address";
|
|
103
|
+
}];
|
|
104
|
+
readonly name: "getAnchorTimestamp";
|
|
105
|
+
readonly outputs: readonly [{
|
|
106
|
+
readonly name: "timestamp";
|
|
107
|
+
readonly internalType: "uint32";
|
|
108
|
+
readonly type: "uint32";
|
|
109
|
+
}];
|
|
110
|
+
readonly stateMutability: "view";
|
|
111
|
+
}, {
|
|
112
|
+
readonly type: "function";
|
|
113
|
+
readonly inputs: readonly [{
|
|
114
|
+
readonly name: "vault";
|
|
115
|
+
readonly internalType: "address";
|
|
116
|
+
readonly type: "address";
|
|
117
|
+
}];
|
|
118
|
+
readonly name: "getVaultState";
|
|
119
|
+
readonly outputs: readonly [{
|
|
120
|
+
readonly name: "";
|
|
121
|
+
readonly internalType: "struct VaultPriceStateV2";
|
|
122
|
+
readonly type: "tuple";
|
|
123
|
+
readonly components: readonly [{
|
|
124
|
+
readonly name: "paused";
|
|
125
|
+
readonly internalType: "bool";
|
|
126
|
+
readonly type: "bool";
|
|
127
|
+
}, {
|
|
128
|
+
readonly name: "pauseOnBadAnchorUpdate";
|
|
129
|
+
readonly internalType: "bool";
|
|
130
|
+
readonly type: "bool";
|
|
131
|
+
}, {
|
|
132
|
+
readonly name: "maxPriceAge";
|
|
133
|
+
readonly internalType: "uint16";
|
|
134
|
+
readonly type: "uint16";
|
|
135
|
+
}, {
|
|
136
|
+
readonly name: "minUpdateIntervalMinutes";
|
|
137
|
+
readonly internalType: "uint16";
|
|
138
|
+
readonly type: "uint16";
|
|
139
|
+
}, {
|
|
140
|
+
readonly name: "maxPriceToleranceRatio";
|
|
141
|
+
readonly internalType: "uint16";
|
|
142
|
+
readonly type: "uint16";
|
|
143
|
+
}, {
|
|
144
|
+
readonly name: "minPriceToleranceRatio";
|
|
145
|
+
readonly internalType: "uint16";
|
|
146
|
+
readonly type: "uint16";
|
|
147
|
+
}, {
|
|
148
|
+
readonly name: "maxUpdateDelayDays";
|
|
149
|
+
readonly internalType: "uint8";
|
|
150
|
+
readonly type: "uint8";
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "accrualLag";
|
|
153
|
+
readonly internalType: "uint32";
|
|
154
|
+
readonly type: "uint32";
|
|
155
|
+
}, {
|
|
156
|
+
readonly name: "anchorTimestamp";
|
|
157
|
+
readonly internalType: "uint32";
|
|
158
|
+
readonly type: "uint32";
|
|
159
|
+
}, {
|
|
160
|
+
readonly name: "driftTimestamp";
|
|
161
|
+
readonly internalType: "uint32";
|
|
162
|
+
readonly type: "uint32";
|
|
163
|
+
}, {
|
|
164
|
+
readonly name: "anchorPrice";
|
|
165
|
+
readonly internalType: "uint128";
|
|
166
|
+
readonly type: "uint128";
|
|
167
|
+
}, {
|
|
168
|
+
readonly name: "driftPrice";
|
|
169
|
+
readonly internalType: "uint128";
|
|
170
|
+
readonly type: "uint128";
|
|
171
|
+
}, {
|
|
172
|
+
readonly name: "highestPrice";
|
|
173
|
+
readonly internalType: "uint128";
|
|
174
|
+
readonly type: "uint128";
|
|
175
|
+
}, {
|
|
176
|
+
readonly name: "lastTotalSupply";
|
|
177
|
+
readonly internalType: "uint128";
|
|
178
|
+
readonly type: "uint128";
|
|
179
|
+
}];
|
|
180
|
+
}, {
|
|
181
|
+
readonly name: "";
|
|
182
|
+
readonly internalType: "struct VaultAccruals";
|
|
183
|
+
readonly type: "tuple";
|
|
184
|
+
readonly components: readonly [{
|
|
185
|
+
readonly name: "fees";
|
|
186
|
+
readonly internalType: "struct Fee";
|
|
187
|
+
readonly type: "tuple";
|
|
188
|
+
readonly components: readonly [{
|
|
189
|
+
readonly name: "tvl";
|
|
190
|
+
readonly internalType: "uint16";
|
|
191
|
+
readonly type: "uint16";
|
|
192
|
+
}, {
|
|
193
|
+
readonly name: "performance";
|
|
194
|
+
readonly internalType: "uint16";
|
|
195
|
+
readonly type: "uint16";
|
|
196
|
+
}];
|
|
197
|
+
}, {
|
|
198
|
+
readonly name: "accruedFees";
|
|
199
|
+
readonly internalType: "uint112";
|
|
200
|
+
readonly type: "uint112";
|
|
201
|
+
}, {
|
|
202
|
+
readonly name: "accruedProtocolFees";
|
|
203
|
+
readonly internalType: "uint112";
|
|
204
|
+
readonly type: "uint112";
|
|
205
|
+
}];
|
|
206
|
+
}];
|
|
207
|
+
readonly stateMutability: "view";
|
|
208
|
+
}, {
|
|
209
|
+
readonly type: "function";
|
|
210
|
+
readonly inputs: readonly [{
|
|
211
|
+
readonly name: "vault";
|
|
212
|
+
readonly internalType: "address";
|
|
213
|
+
readonly type: "address";
|
|
214
|
+
}];
|
|
215
|
+
readonly name: "isVaultPaused";
|
|
216
|
+
readonly outputs: readonly [{
|
|
217
|
+
readonly name: "";
|
|
218
|
+
readonly internalType: "bool";
|
|
219
|
+
readonly type: "bool";
|
|
220
|
+
}];
|
|
221
|
+
readonly stateMutability: "view";
|
|
222
|
+
}, {
|
|
223
|
+
readonly type: "function";
|
|
224
|
+
readonly inputs: readonly [];
|
|
225
|
+
readonly name: "version";
|
|
226
|
+
readonly outputs: readonly [{
|
|
227
|
+
readonly name: "";
|
|
228
|
+
readonly internalType: "string";
|
|
229
|
+
readonly type: "string";
|
|
230
|
+
}];
|
|
231
|
+
readonly stateMutability: "pure";
|
|
232
|
+
}];
|
|
233
|
+
//# sourceMappingURL=priceAndFeeCalculatorV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"priceAndFeeCalculatorV2.d.ts","sourceRoot":"","sources":["../../../src/evm/abis/priceAndFeeCalculatorV2.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmH7B,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// Compact ABI derived from aera-finance/aera-contracts-v3@f4e3433058c29c3a0b1348ffbd358cc036a1687f
|
|
2
|
+
// source: src/core/interfaces/IPriceAndFeeCalculatorV2.sol
|
|
3
|
+
export const priceAndFeeCalculatorV2Abi = [
|
|
4
|
+
{
|
|
5
|
+
type: 'function',
|
|
6
|
+
inputs: [
|
|
7
|
+
{ name: 'vault', internalType: 'address', type: 'address' },
|
|
8
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
9
|
+
{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' },
|
|
10
|
+
],
|
|
11
|
+
name: 'convertTokenToUnits',
|
|
12
|
+
outputs: [{ name: 'unitsAmount', internalType: 'uint256', type: 'uint256' }],
|
|
13
|
+
stateMutability: 'view',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: 'function',
|
|
17
|
+
inputs: [
|
|
18
|
+
{ name: 'vault', internalType: 'address', type: 'address' },
|
|
19
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
20
|
+
{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' },
|
|
21
|
+
{ name: 'rounding', internalType: 'enum Math.Rounding', type: 'uint8' },
|
|
22
|
+
],
|
|
23
|
+
name: 'convertTokenToUnitsIfActive',
|
|
24
|
+
outputs: [{ name: 'unitsAmount', internalType: 'uint256', type: 'uint256' }],
|
|
25
|
+
stateMutability: 'view',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: 'function',
|
|
29
|
+
inputs: [
|
|
30
|
+
{ name: 'vault', internalType: 'address', type: 'address' },
|
|
31
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
32
|
+
{ name: 'unitsAmount', internalType: 'uint256', type: 'uint256' },
|
|
33
|
+
],
|
|
34
|
+
name: 'convertUnitsToToken',
|
|
35
|
+
outputs: [{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' }],
|
|
36
|
+
stateMutability: 'view',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: 'function',
|
|
40
|
+
inputs: [
|
|
41
|
+
{ name: 'vault', internalType: 'address', type: 'address' },
|
|
42
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
43
|
+
{ name: 'unitsAmount', internalType: 'uint256', type: 'uint256' },
|
|
44
|
+
{ name: 'rounding', internalType: 'enum Math.Rounding', type: 'uint8' },
|
|
45
|
+
],
|
|
46
|
+
name: 'convertUnitsToTokenIfActive',
|
|
47
|
+
outputs: [{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' }],
|
|
48
|
+
stateMutability: 'view',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: 'function',
|
|
52
|
+
inputs: [{ name: 'vault', internalType: 'address', type: 'address' }],
|
|
53
|
+
name: 'getAnchorTimestamp',
|
|
54
|
+
outputs: [{ name: 'timestamp', internalType: 'uint32', type: 'uint32' }],
|
|
55
|
+
stateMutability: 'view',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: 'function',
|
|
59
|
+
inputs: [{ name: 'vault', internalType: 'address', type: 'address' }],
|
|
60
|
+
name: 'getVaultState',
|
|
61
|
+
outputs: [
|
|
62
|
+
{
|
|
63
|
+
name: '',
|
|
64
|
+
internalType: 'struct VaultPriceStateV2',
|
|
65
|
+
type: 'tuple',
|
|
66
|
+
components: [
|
|
67
|
+
{ name: 'paused', internalType: 'bool', type: 'bool' },
|
|
68
|
+
{ name: 'pauseOnBadAnchorUpdate', internalType: 'bool', type: 'bool' },
|
|
69
|
+
{ name: 'maxPriceAge', internalType: 'uint16', type: 'uint16' },
|
|
70
|
+
{ name: 'minUpdateIntervalMinutes', internalType: 'uint16', type: 'uint16' },
|
|
71
|
+
{ name: 'maxPriceToleranceRatio', internalType: 'uint16', type: 'uint16' },
|
|
72
|
+
{ name: 'minPriceToleranceRatio', internalType: 'uint16', type: 'uint16' },
|
|
73
|
+
{ name: 'maxUpdateDelayDays', internalType: 'uint8', type: 'uint8' },
|
|
74
|
+
{ name: 'accrualLag', internalType: 'uint32', type: 'uint32' },
|
|
75
|
+
{ name: 'anchorTimestamp', internalType: 'uint32', type: 'uint32' },
|
|
76
|
+
{ name: 'driftTimestamp', internalType: 'uint32', type: 'uint32' },
|
|
77
|
+
{ name: 'anchorPrice', internalType: 'uint128', type: 'uint128' },
|
|
78
|
+
{ name: 'driftPrice', internalType: 'uint128', type: 'uint128' },
|
|
79
|
+
{ name: 'highestPrice', internalType: 'uint128', type: 'uint128' },
|
|
80
|
+
{ name: 'lastTotalSupply', internalType: 'uint128', type: 'uint128' },
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: '',
|
|
85
|
+
internalType: 'struct VaultAccruals',
|
|
86
|
+
type: 'tuple',
|
|
87
|
+
components: [
|
|
88
|
+
{
|
|
89
|
+
name: 'fees',
|
|
90
|
+
internalType: 'struct Fee',
|
|
91
|
+
type: 'tuple',
|
|
92
|
+
components: [
|
|
93
|
+
{ name: 'tvl', internalType: 'uint16', type: 'uint16' },
|
|
94
|
+
{ name: 'performance', internalType: 'uint16', type: 'uint16' },
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
{ name: 'accruedFees', internalType: 'uint112', type: 'uint112' },
|
|
98
|
+
{ name: 'accruedProtocolFees', internalType: 'uint112', type: 'uint112' },
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
stateMutability: 'view',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'function',
|
|
106
|
+
inputs: [{ name: 'vault', internalType: 'address', type: 'address' }],
|
|
107
|
+
name: 'isVaultPaused',
|
|
108
|
+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
|
|
109
|
+
stateMutability: 'view',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'function',
|
|
113
|
+
inputs: [],
|
|
114
|
+
name: 'version',
|
|
115
|
+
outputs: [{ name: '', internalType: 'string', type: 'string' }],
|
|
116
|
+
stateMutability: 'pure',
|
|
117
|
+
},
|
|
118
|
+
];
|
|
119
|
+
//# sourceMappingURL=priceAndFeeCalculatorV2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"priceAndFeeCalculatorV2.js","sourceRoot":"","sources":["../../../src/evm/abis/priceAndFeeCalculatorV2.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,2DAA2D;AAC3D,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC;QACE,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;YAC3D,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,EAAE;YACnE,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;SAClE;QACD,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,I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