@1delta/margin-fetcher 0.0.245 → 0.0.247
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/index.js +248 -189
- package/dist/index.js.map +1 -1
- package/dist/lending/public-data/gearbox/publicCallBuild.d.ts +18 -8
- package/dist/lending/public-data/gearbox/publicCallBuild.d.ts.map +1 -1
- package/dist/lending/public-data/gearbox/publicCallParse.d.ts +20 -12
- package/dist/lending/public-data/gearbox/publicCallParse.d.ts.map +1 -1
- package/dist/lending/user-data/gearbox/userCallBuild.d.ts +12 -9
- package/dist/lending/user-data/gearbox/userCallBuild.d.ts.map +1 -1
- package/dist/lending/user-data/gearbox/userCallParse.d.ts +18 -14
- package/dist/lending/user-data/gearbox/userCallParse.d.ts.map +1 -1
- package/dist/prices/oracle-prices/fetchers/gearbox.d.ts +510 -514
- package/dist/prices/oracle-prices/fetchers/gearbox.d.ts.map +1 -1
- package/dist/prices/oracle-prices/fetchers/morpho.d.ts.map +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/vaults/gearbox/publicCallBuild.d.ts +10 -5
- package/dist/vaults/gearbox/publicCallBuild.d.ts.map +1 -1
- package/dist/vaults/gearbox/publicCallParse.d.ts +13 -3
- package/dist/vaults/gearbox/publicCallParse.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gearbox.d.ts","sourceRoot":"","sources":["../../../../src/prices/oracle-prices/fetchers/gearbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gearbox.d.ts","sourceRoot":"","sources":["../../../../src/prices/oracle-prices/fetchers/gearbox.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,YAAY,EACb,MAAM,UAAU,CAAA;AAEjB;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,KAAK,EAAE,CAAA;CACX;AAED;;;;;;;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;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"morpho.d.ts","sourceRoot":"","sources":["../../../../src/prices/oracle-prices/fetchers/morpho.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,aAAa,EAEb,gBAAgB,EAChB,YAAY,EACb,MAAM,UAAU,CAAA;AAQjB;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAS3D;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB,EAAE,CAAA;CAC1C,CAAA;AAyBD;;;GAGG;AACH,UAAU,iBAAiB;IACzB,OAAO,EAAE,eAAe,EAAE,CAAA;CAC3B;AAgCD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,CAAC,EAAE,qBAAqB,CAAA;CACxC;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,oBAAoB,GAC7B,aAAa,CAAC,iBAAiB,CAAC,EAAE,CA6BpC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,GAAG,EAAE,EACX,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,YAAY,GACpB,gBAAgB,EAAE,CAgEpB;AAED;;GAEG;AACH,wBAAgB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;GAE3B;AA+CD;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,CA4DpC;AA+JD;;GAEG;AACH,eAAO,MAAM,aAAa;;;;CAIzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAI9C,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,WAAW,GACZ,MAAM,yBAAyB,CAAA;AAgChC,eAAO,MAAM,uBAAuB,EAAE,MAAM,EAgB3C,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAI9C,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,WAAW,GACZ,MAAM,yBAAyB,CAAA;AAgChC,eAAO,MAAM,uBAAuB,EAAE,MAAM,EAgB3C,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,GAAG,MAAM,aAkF3C,CAAA;AAED,sCAAsC;AACtC,eAAO,MAAM,uBAAuB,GAClC,YAAY,MAAM,EAAE,EACpB,eAAe,MAAM,EAAE,KACtB,MAAM,EAmBR,CAAA;AAED,mCAAmC;AACnC,eAAO,MAAM,gBAAgB;;CAS5B,CAAA;AAED,eAAO,MAAM,eAAe,GAC1B,SAAS,MAAM,GAAG,MAAM,GAAG,SAAS,EACpC,kBAAiB,MAAuB,KACvC,MAAM,EAOR,CAAA"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Builds the multicall descriptor for Gearbox V3 passive-pool data.
|
|
2
|
+
* Builds the multicall descriptor for Gearbox V3.1 passive-pool data.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* public-data fetcher
|
|
6
|
-
* symbol, totals, rates, withdrawFee and diesel rate
|
|
4
|
+
* Shares the same `MarketCompressor.getMarkets(filter)` call as the
|
|
5
|
+
* lending public-data fetcher — the response carries every pool's
|
|
6
|
+
* underlying, symbol, totals, rates, withdrawFee and diesel rate inside
|
|
7
|
+
* the `pool` sub-struct of each `MarketData` entry. No per-pool
|
|
7
8
|
* follow-up calls are needed.
|
|
8
9
|
*/
|
|
9
10
|
export declare const buildGearboxV3PoolsCall: (chainId: string) => {
|
|
10
11
|
address: string;
|
|
11
12
|
name: string;
|
|
12
|
-
params:
|
|
13
|
+
params: {
|
|
14
|
+
configurators: string[];
|
|
15
|
+
pools: string[];
|
|
16
|
+
underlying: "0x0000000000000000000000000000000000000000";
|
|
17
|
+
}[];
|
|
13
18
|
}[];
|
|
14
19
|
//# sourceMappingURL=publicCallBuild.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publicCallBuild.d.ts","sourceRoot":"","sources":["../../../src/vaults/gearbox/publicCallBuild.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"publicCallBuild.d.ts","sourceRoot":"","sources":["../../../src/vaults/gearbox/publicCallBuild.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,GAAI,SAAS,MAAM;;;;;eAehC,MAAM,EAAE;;;GAM9B,CAAA"}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { GenericTokenList } from '../../types';
|
|
2
2
|
import { GearboxV3Pools } from './types';
|
|
3
3
|
/**
|
|
4
|
-
* Parser for the single-call pool fetch built by
|
|
4
|
+
* Parser for the single-call Gearbox V3.1 pool fetch built by
|
|
5
|
+
* `buildGearboxV3PoolsCall`.
|
|
5
6
|
*
|
|
6
|
-
* data[0] =
|
|
7
|
+
* data[0] = MarketData[] (from MarketCompressor.getMarkets)
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
+
* Each `MarketData.pool` carries the full ERC-4626 + rate snapshot we
|
|
10
|
+
* need; we skip `creditManagers[]`, `quotaKeeper`, `priceOracle`, and
|
|
11
|
+
* `lossPolicy` here — those belong to the credit-side fetcher under
|
|
12
|
+
* `lending/public-data/gearbox/`. Returns a map keyed by lowercased
|
|
13
|
+
* underlying address (or `zeroAddress` for mainnet WETH, per the
|
|
14
|
+
* native-ETH convention).
|
|
15
|
+
*
|
|
16
|
+
* `totalAssets` (old DataCompressor field) maps to `expectedLiquidity`
|
|
17
|
+
* in V3.1 — Gearbox PoolV3's ERC-4626 `totalAssets()` returns
|
|
18
|
+
* `expectedLiquidity`, so they're interchangeable.
|
|
9
19
|
*/
|
|
10
20
|
export declare const getGearboxV3PoolsConverter: (chainId: string, prices?: {
|
|
11
21
|
[asset: string]: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publicCallParse.d.ts","sourceRoot":"","sources":["../../../src/vaults/gearbox/publicCallParse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAiB,cAAc,EAAE,MAAM,SAAS,CAAA;AAmBvD
|
|
1
|
+
{"version":3,"file":"publicCallParse.d.ts","sourceRoot":"","sources":["../../../src/vaults/gearbox/publicCallParse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAiB,cAAc,EAAE,MAAM,SAAS,CAAA;AAmBvD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,0BAA0B,GACrC,SAAS,MAAM,EACf,SAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAO,EACxC,YAAW,gBAAqB,KAC/B,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,cAAc,GAAG,SAAS,EAAE,MAAM,CAWtD,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1delta/margin-fetcher",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.247",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"async-retry": "^1.3.3",
|
|
24
24
|
"lodash": "^4.17.23",
|
|
25
|
+
"@1delta/abis": "0.0.15",
|
|
25
26
|
"@1delta/dex-registry": "0.0.99",
|
|
26
|
-
"@1delta/
|
|
27
|
-
"@1delta/abis": "0.0.14",
|
|
27
|
+
"@1delta/calldata-sdk": "0.0.145",
|
|
28
28
|
"@1delta/providers": "0.0.56",
|
|
29
|
-
"@1delta/
|
|
29
|
+
"@1delta/lender-registry": "0.0.25"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/async-retry": "^1.4.9",
|