@varla/sdk 1.11.4 → 1.13.2
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/AGENTS.md +82 -95
- package/CHANGELOG.md +359 -0
- package/README.md +227 -275
- package/dist/abi/full/OpinionCtfExecutionEngineAdapter.js +1 -0
- package/dist/abi/full/OpinionCtfExecutionEngineAdapter.js.map +1 -0
- package/dist/abi/full/OracleUpdaterRouter.d.ts +30 -9
- package/dist/abi/full/OracleUpdaterRouter.d.ts.map +1 -1
- package/dist/abi/full/OracleUpdaterRouter.js +37 -9
- package/dist/abi/full/OracleUpdaterRouter.js.map +1 -0
- package/dist/abi/full/PolymarketCtfAdapter.js +1 -0
- package/dist/abi/full/PolymarketCtfAdapter.js.map +1 -0
- package/dist/abi/full/VarlaAccessManager.js +1 -0
- package/dist/abi/full/VarlaAccessManager.js.map +1 -0
- package/dist/abi/full/VarlaConvertLiquidator.js +1 -0
- package/dist/abi/full/VarlaConvertLiquidator.js.map +1 -0
- package/dist/abi/full/VarlaCore.js +1 -0
- package/dist/abi/full/VarlaCore.js.map +1 -0
- package/dist/abi/full/VarlaInterestRateStrategy.js +1 -0
- package/dist/abi/full/VarlaInterestRateStrategy.js.map +1 -0
- package/dist/abi/full/VarlaLiquidator.d.ts +1 -1
- package/dist/abi/full/VarlaLiquidator.js +2 -1
- package/dist/abi/full/VarlaLiquidator.js.map +1 -0
- package/dist/abi/full/VarlaMergeLiquidator.js +1 -0
- package/dist/abi/full/VarlaMergeLiquidator.js.map +1 -0
- package/dist/abi/full/VarlaOracle.js +1 -0
- package/dist/abi/full/VarlaOracle.js.map +1 -0
- package/dist/abi/full/VarlaPool.js +1 -0
- package/dist/abi/full/VarlaPool.js.map +1 -0
- package/dist/abi/full/VarlaProxyAdmin.js +1 -0
- package/dist/abi/full/VarlaProxyAdmin.js.map +1 -0
- package/dist/abi/index.js +1 -0
- package/dist/abi/index.js.map +1 -0
- package/dist/abi/subsets/VarlaOracle.registry.js +1 -0
- package/dist/abi/subsets/VarlaOracle.registry.js.map +1 -0
- package/dist/abi.js +1 -0
- package/dist/abi.js.map +1 -0
- package/dist/actions/admin.js +1 -0
- package/dist/actions/admin.js.map +1 -0
- package/dist/actions/core.js +1 -0
- package/dist/actions/core.js.map +1 -0
- package/dist/actions/erc1155.js +1 -0
- package/dist/actions/erc1155.js.map +1 -0
- package/dist/actions/erc20.js +1 -0
- package/dist/actions/erc20.js.map +1 -0
- package/dist/actions/index.d.ts +7 -7
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +8 -7
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/liquidator.js +1 -0
- package/dist/actions/liquidator.js.map +1 -0
- package/dist/actions/oracle.d.ts +1 -2
- package/dist/actions/oracle.d.ts.map +1 -1
- package/dist/actions/oracle.js +1 -0
- package/dist/actions/oracle.js.map +1 -0
- package/dist/actions/oracleUpdaterRouter.d.ts +8 -1
- package/dist/actions/oracleUpdaterRouter.d.ts.map +1 -1
- package/dist/actions/oracleUpdaterRouter.js +14 -1
- package/dist/actions/oracleUpdaterRouter.js.map +1 -0
- package/dist/actions/pool.js +1 -0
- package/dist/actions/pool.js.map +1 -0
- package/dist/actions/rbac.js +1 -0
- package/dist/actions/rbac.js.map +1 -0
- package/dist/actions/tx.js +1 -0
- package/dist/actions/tx.js.map +1 -0
- package/dist/actions/utils.js +1 -0
- package/dist/actions/utils.js.map +1 -0
- package/dist/addresses/bsc.js +1 -0
- package/dist/addresses/bsc.js.map +1 -0
- package/dist/addresses/index.js +1 -0
- package/dist/addresses/index.js.map +1 -0
- package/dist/addresses/polygon.js +1 -0
- package/dist/addresses/polygon.js.map +1 -0
- package/dist/addresses.js +1 -0
- package/dist/addresses.js.map +1 -0
- package/dist/batch.js +1 -0
- package/dist/batch.js.map +1 -0
- package/dist/contracts.d.ts +1 -2
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +2 -2
- package/dist/contracts.js.map +1 -0
- package/dist/errors.d.ts +87 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +240 -0
- package/dist/errors.js.map +1 -0
- package/dist/events/decode.js +1 -0
- package/dist/events/decode.js.map +1 -0
- package/dist/events/defs.js +1 -0
- package/dist/events/defs.js.map +1 -0
- package/dist/events/index.d.ts +3 -3
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +4 -3
- package/dist/events/index.js.map +1 -0
- package/dist/events/logs.js +1 -0
- package/dist/events/logs.js.map +1 -0
- package/dist/events/oracleRegistrySync.js +1 -0
- package/dist/events/oracleRegistrySync.js.map +1 -0
- package/dist/events/recent.d.ts +1 -1
- package/dist/events/recent.d.ts.map +1 -1
- package/dist/events/recent.js +2 -1
- package/dist/events/recent.js.map +1 -0
- package/dist/format.js +1 -0
- package/dist/format.js.map +1 -0
- package/dist/generated.d.ts +31 -10
- package/dist/generated.d.ts.map +1 -1
- package/dist/generated.js +1 -0
- package/dist/generated.js.map +1 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -0
- package/dist/leverage/deleverageExecute.d.ts +36 -0
- package/dist/leverage/deleverageExecute.d.ts.map +1 -0
- package/dist/leverage/deleverageExecute.js +53 -0
- package/dist/leverage/deleverageExecute.js.map +1 -0
- package/dist/leverage/execute.d.ts +62 -0
- package/dist/leverage/execute.d.ts.map +1 -0
- package/dist/leverage/execute.js +84 -0
- package/dist/leverage/execute.js.map +1 -0
- package/dist/leverage/index.d.ts +32 -0
- package/dist/leverage/index.d.ts.map +1 -0
- package/dist/leverage/index.js +12 -0
- package/dist/leverage/index.js.map +1 -0
- package/dist/leverage/math.d.ts +119 -0
- package/dist/leverage/math.d.ts.map +1 -0
- package/dist/leverage/math.js +304 -0
- package/dist/leverage/math.js.map +1 -0
- package/dist/leverage/plan.d.ts +143 -0
- package/dist/leverage/plan.d.ts.map +1 -0
- package/dist/leverage/plan.js +204 -0
- package/dist/leverage/plan.js.map +1 -0
- package/dist/leverage/preflight.d.ts +27 -0
- package/dist/leverage/preflight.d.ts.map +1 -0
- package/dist/leverage/preflight.js +34 -0
- package/dist/leverage/preflight.js.map +1 -0
- package/dist/leverage/types.d.ts +157 -0
- package/dist/leverage/types.d.ts.map +1 -0
- package/dist/leverage/types.js +43 -0
- package/dist/leverage/types.js.map +1 -0
- package/dist/meta.d.ts +42 -0
- package/dist/meta.d.ts.map +1 -0
- package/dist/meta.js +47 -0
- package/dist/meta.js.map +1 -0
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/dist/views/accessManager.js +1 -0
- package/dist/views/accessManager.js.map +1 -0
- package/dist/views/adapters.js +1 -0
- package/dist/views/adapters.js.map +1 -0
- package/dist/views/admin.d.ts.map +1 -1
- package/dist/views/admin.js +1 -0
- package/dist/views/admin.js.map +1 -0
- package/dist/views/core.d.ts.map +1 -1
- package/dist/views/core.js +1 -0
- package/dist/views/core.js.map +1 -0
- package/dist/views/index.d.ts +5 -5
- package/dist/views/index.d.ts.map +1 -1
- package/dist/views/index.js +6 -5
- package/dist/views/index.js.map +1 -0
- package/dist/views/lenders.js +1 -0
- package/dist/views/lenders.js.map +1 -0
- package/dist/views/liquidators.js +1 -0
- package/dist/views/liquidators.js.map +1 -0
- package/dist/views/oracle.js +1 -0
- package/dist/views/oracle.js.map +1 -0
- package/dist/views/pool.js +1 -0
- package/dist/views/pool.js.map +1 -0
- package/dist/views/system.d.ts.map +1 -1
- package/dist/views/system.js +1 -0
- package/dist/views/system.js.map +1 -0
- package/package.json +18 -5
- package/src/abi/README.md +17 -0
- package/src/abi/full/OpinionCtfExecutionEngineAdapter.ts +320 -0
- package/src/abi/full/OracleUpdaterRouter.ts +528 -0
- package/src/abi/full/PolymarketCtfAdapter.ts +312 -0
- package/src/abi/full/VarlaAccessManager.ts +1171 -0
- package/src/abi/full/VarlaConvertLiquidator.ts +834 -0
- package/src/abi/full/VarlaCore.ts +2277 -0
- package/src/abi/full/VarlaInterestRateStrategy.ts +442 -0
- package/src/abi/full/VarlaLiquidator.ts +914 -0
- package/src/abi/full/VarlaMergeLiquidator.ts +797 -0
- package/src/abi/full/VarlaOracle.ts +1825 -0
- package/src/abi/full/VarlaPool.ts +1637 -0
- package/src/abi/full/VarlaProxyAdmin.ts +301 -0
- package/src/abi/index.ts +17 -0
- package/src/abi/subsets/VarlaOracle.registry.ts +784 -0
- package/src/abi.ts +2 -0
- package/src/actions/admin.ts +357 -0
- package/src/actions/core.ts +68 -0
- package/src/actions/erc1155.ts +22 -0
- package/src/actions/erc20.ts +22 -0
- package/src/actions/index.ts +13 -0
- package/src/actions/liquidator.ts +76 -0
- package/src/actions/oracle.ts +618 -0
- package/src/actions/oracleUpdaterRouter.ts +233 -0
- package/src/actions/pool.ts +76 -0
- package/src/actions/rbac.ts +72 -0
- package/src/actions/tx.ts +16 -0
- package/src/actions/utils.ts +15 -0
- package/src/addresses/README.md +17 -0
- package/src/addresses/bsc.json +16 -0
- package/src/addresses/bsc.ts +15 -0
- package/src/addresses/index.ts +6 -0
- package/src/addresses/polygon.json +16 -0
- package/src/addresses/polygon.ts +15 -0
- package/src/addresses.ts +2 -0
- package/src/batch.ts +55 -0
- package/src/contracts.ts +232 -0
- package/src/errors.ts +305 -0
- package/src/events/decode.ts +37 -0
- package/src/events/defs.ts +70 -0
- package/src/events/index.ts +7 -0
- package/src/events/logs.ts +42 -0
- package/src/events/oracleRegistrySync.ts +206 -0
- package/src/events/recent.ts +39 -0
- package/src/format.ts +121 -0
- package/src/generated.ts +27 -0
- package/src/index.ts +18 -0
- package/src/leverage/deleverageExecute.ts +111 -0
- package/src/leverage/execute.ts +172 -0
- package/src/leverage/index.ts +88 -0
- package/src/leverage/math.ts +446 -0
- package/src/leverage/plan.ts +356 -0
- package/src/leverage/preflight.ts +63 -0
- package/src/leverage/types.ts +204 -0
- package/src/meta.ts +82 -0
- package/src/types.ts +25 -0
- package/src/views/accessManager.ts +286 -0
- package/src/views/adapters.ts +27 -0
- package/src/views/admin.ts +92 -0
- package/src/views/core.ts +1370 -0
- package/src/views/index.ts +11 -0
- package/src/views/lenders.ts +65 -0
- package/src/views/liquidators.ts +227 -0
- package/src/views/oracle.ts +739 -0
- package/src/views/pool.ts +277 -0
- package/src/views/system.ts +42 -0
- package/BACKEND.md +0 -405
- package/FRONTEND.md +0 -485
package/AGENTS.md
CHANGED
|
@@ -18,13 +18,15 @@ Published package: **@varla/sdk**
|
|
|
18
18
|
- Contracts/bindings + views: `@varla/sdk` or `@varla/sdk/views`
|
|
19
19
|
- Actions: `@varla/sdk/actions`
|
|
20
20
|
- Events/indexer: `@varla/sdk/events`
|
|
21
|
+
- Errors: `@varla/sdk/errors`
|
|
21
22
|
- Utilities: `@varla/sdk/batch`, `@varla/sdk/format`
|
|
23
|
+
- Leverage: `@varla/sdk/leverage`
|
|
22
24
|
|
|
23
25
|
---
|
|
24
26
|
|
|
25
27
|
## Frontend-oriented view helpers (quick map)
|
|
26
28
|
|
|
27
|
-
> Tip: prefer **subpath imports** so it
|
|
29
|
+
> Tip: prefer **subpath imports** so it's obvious what you're using:
|
|
28
30
|
>
|
|
29
31
|
> ```ts
|
|
30
32
|
> import * as views from "@varla/sdk/views";
|
|
@@ -37,7 +39,7 @@ Published package: **@varla/sdk**
|
|
|
37
39
|
- `views.readLenderSnapshot({ pool, user })` →
|
|
38
40
|
`{ shares, assets, maxWithdrawAssets, maxRedeemShares }`
|
|
39
41
|
- Notes:
|
|
40
|
-
- `assets` is the **current underlying value** of the user
|
|
42
|
+
- `assets` is the **current underlying value** of the user's ERC4626 shares (principal + interest).
|
|
41
43
|
- `maxWithdrawAssets` is the **available-to-withdraw right now** (liquidity + reserve aware).
|
|
42
44
|
|
|
43
45
|
- **Available-to-withdraw only**
|
|
@@ -69,25 +71,34 @@ Published package: **@varla/sdk**
|
|
|
69
71
|
- `views.readHealthFactor({ core, user })` → `{ healthFactor, canBeLiquidated }`
|
|
70
72
|
- `views.readLiquidationConfig({ core })` and `views.readTierLiquidationConfig({ core, tier })`
|
|
71
73
|
|
|
72
|
-
### Home page /
|
|
74
|
+
### Home page / "Top opportunities" (suggested inputs)
|
|
73
75
|
|
|
74
76
|
The SDK can provide raw primitives; **ranking is app-side**:
|
|
75
77
|
- `views.readPoolRates({ pool })` (supplyAPY, utilization)
|
|
76
78
|
- `views.readPoolCaps({ pool })` (capacity constraints)
|
|
77
79
|
- `views.readPoolHealthScore({ pool })` (simple risk signal)
|
|
78
80
|
|
|
81
|
+
### Error decoding
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
import { decodeVarlaError, formatVarlaError } from "@varla/sdk/errors";
|
|
85
|
+
|
|
86
|
+
const decoded = decodeVarlaError(err); // works with raw hex or caught errors
|
|
87
|
+
if (decoded) console.log(formatVarlaError(decoded));
|
|
88
|
+
```
|
|
89
|
+
|
|
79
90
|
---
|
|
80
91
|
|
|
81
92
|
## Not provided by the SDK (by design)
|
|
82
93
|
|
|
83
|
-
-
|
|
94
|
+
- **"Interest accrued / lender earnings" for a user**
|
|
84
95
|
- ERC4626 does not track principal per-user.
|
|
85
|
-
- To show
|
|
96
|
+
- To show "interest accrued", you need a cost basis, e.g.:
|
|
86
97
|
- app-side tracking of deposits/withdrawals, or
|
|
87
98
|
- an indexer that reconstructs deposits/withdrawals from events.
|
|
88
99
|
|
|
89
|
-
- **Borrow
|
|
90
|
-
- `borrowRate` and pool `supplyAPY` are available, but
|
|
100
|
+
- **Borrow "net rate"**
|
|
101
|
+
- `borrowRate` and pool `supplyAPY` are available, but "net" is product-specific
|
|
91
102
|
(depends on whether you consider collateral yield, whether user is also a lender, etc.).
|
|
92
103
|
|
|
93
104
|
- **Cooldown period**
|
|
@@ -96,95 +107,71 @@ The SDK can provide raw primitives; **ranking is app-side**:
|
|
|
96
107
|
|
|
97
108
|
---
|
|
98
109
|
|
|
99
|
-
##
|
|
110
|
+
## Full API Reference (auto-generated)
|
|
100
111
|
|
|
101
|
-
<!-- BEGIN GENERATED:
|
|
112
|
+
<!-- BEGIN GENERATED:EXPORTS -->
|
|
102
113
|
<!--
|
|
103
|
-
|
|
104
|
-
|
|
114
|
+
Auto-generated by scripts/sdk/generate-docs.ts — DO NOT EDIT MANUALLY.
|
|
115
|
+
336 functions, 165 types across 10 subpaths.
|
|
105
116
|
-->
|
|
106
117
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
- `readPoolRates`
|
|
168
|
-
- `readPoolSharePrice`
|
|
169
|
-
- `readPoolSnapshot`
|
|
170
|
-
- `readPortfolioValue`
|
|
171
|
-
- `readPositionBalance`
|
|
172
|
-
- `readPositionBalances`
|
|
173
|
-
- `readPositionCount`
|
|
174
|
-
- `readPositionLiquidationConfigOverride`
|
|
175
|
-
- `readPositionLtvOverride`
|
|
176
|
-
- `readPositionSnapshot`
|
|
177
|
-
- `readPreviewLiquidation`
|
|
178
|
-
- `readPrice`
|
|
179
|
-
- `readProxyAdminPaused`
|
|
180
|
-
- `readRepayTiming`
|
|
181
|
-
- `readRiskTier`
|
|
182
|
-
- `readRoleSummary`
|
|
183
|
-
- `readSpotPrice`
|
|
184
|
-
- `readSystemSnapshot`
|
|
185
|
-
- `readTargetConfig`
|
|
186
|
-
- `readTierLiquidationConfig`
|
|
187
|
-
- `readTieredLtvConfig`
|
|
188
|
-
- `readTryGetPrice`
|
|
189
|
-
- `readTwap`
|
|
190
|
-
<!-- END GENERATED:VIEW_HELPERS -->
|
|
118
|
+
### `@varla/sdk` (166 functions, 84 types, 8 constants)
|
|
119
|
+
|
|
120
|
+
**Functions:** `prepareCoreSetDefaultLtvConfig`, `prepareCoreSetLiquidationConfig`, `prepareCoreSetTierLiquidationConfig`, `prepareCoreSetMaxPositions`, `prepareCoreSetMaxPositionsBounds`, `prepareCoreSetOracle`, `prepareCoreSetPositionLtvOverride`, `prepareCoreClearPositionLtvOverride`, `prepareCoreSetPositionLiquidationConfigOverride`, `prepareCoreClearPositionLiquidationConfigOverride`, `preparePoolSetDepositCap`, `preparePoolSetBorrowCap`, `preparePoolWithdrawReserve`, `preparePoolSetInterestRateStrategy`, `prepareOracleSetMaxStaleness`, `prepareOracleSetLiquidationGracePeriod`, `prepareOracleSetDefaultEarlyClosureWindow`, `prepareStrategySetPool`, `prepareStrategySetRateParams`, `prepareOracleUpdaterRouterSetPublisher`, `prepareCoreDeposit`, `prepareCoreWithdraw`, `prepareCoreBorrow`, `prepareCoreRepay`, `prepareErc20Approve`, `prepareErc1155SetApprovalForAll`, `prepareLiquidatorLiquidate`, `prepareLiquidatorLiquidateMulti`, `prepareLiquidatorLiquidateBadDebt`, `prepareLiquidatorResolveBadDebtWithReserve`, `prepareOracleConfigurePositionsBatch`, `prepareOracleConfigurePosition`, `prepareOracleSetUpdater`, `prepareOracleSetPositionEarlyClosureWindowOverride`, `prepareOracleClearPositionEarlyClosureWindowOverride`, `prepareOracleInvalidatePosition`, `prepareOracleValidatePosition`, `prepareOracleRegisterNegRiskMarketPositions`, `prepareOracleOverrideNegRiskMarketPositions`, `prepareOracleConfigureOppositePositions`, `prepareOracleConfigureNegRiskPositionsBatch`, `prepareOracleUpdatePrices`, `prepareOracleUpdatePrice`, `prepareOracleSetResolutionPrice`, `planOracleSeed`, `seedOracleFromJson`, `seedOracleFromJsonFiles`, `prepareOracleSeedPlan`, `executeOracleSeedPlan`, `buildNonce`, `splitNonce`, `toOracleUpdaterRouterTypedMessage`, `computeOracleUpdaterDigest`, `signOracleUpdaterRouterUpdate`, `prepareOracleUpdaterRouterUpdatePricesWithSig`, `preparePoolDeposit`, `preparePoolMint`, `preparePoolWithdraw`, `preparePoolRedeem`, `readCanCall`, `assertCanCallImmediate`, `sendTx`, `selectorFromSignature`, `chunk`, `multicallChunks`, `getAddressBook`, `getVarlaContracts`, `getRequiredVarlaContracts`, `getErc20`, `getErc1155`, `getErc4626`, `decodeEventLogs`, `getEventLogsChunked`, `syncOracleRegistryViaEvents`, `getRecentEvents`, `formatWad`, `formatBps`, `formatPriceE8`, `parseUnits`, `parseWad`, `isSupportedChain`, `assertSupportedChain`, `getChainMeta`, `readAccessManagerBasics`, `readRoleSummary`, `readTargetConfig`, `readHasRole`, `readManyHasRole`, `readManyTargetFunctionRoles`, `readManyTargetConfigs`, `readAdapterInfo`, `readInterestRateStrategyBasics`, `getInterestRateStrategyFromPool`, `readProxyAdminPaused`, `readRepayTiming`, `readPositionCount`, `readOracleGuardsStatus`, `readAccountSnapshot`, `readCoreAddresses`, `readMaxPositionsConfig`, `readAccountPositionsFull`, `readPositionBalances`, `readBorrowerState`, `readPortfolioValue`, `readBorrowers`, `readCoreGlobalDebt`, `readPositionLiquidationConfigOverride`, `readPositionBalance`, `readAccountPositions`, `readBorrowersPage`, `readManyAccountSnapshots`, `readHealthFactor`, `readLiquidationConfig`, `readDefaultLtvConfig`, `readTieredLtvConfig`, `readTierLiquidationConfig`, `readLiquidationParamsForPosition`, `readPositionLtvOverride`, `readLtvForPosition`, `readLiquidationBonusBps`, `readManyLiquidationBonusBps`, `previewBorrow`, `previewRepay`, `readBorrowLimits`, `readManyBorrowLimits`, `readHypotheticalBorrowCapacity`, `readLenderSnapshot`, `readMaxWithdraw`, `readMaxRedeem`, `readLiquidatorBasics`, `readCanLiquidate`, `readPreviewLiquidation`, `readCalculateLiquidationBonus`, `readBadDebtStatus`, `readMergeLiquidatorBasics`, `readConvertLiquidatorBasics`, `readOracleRegistry`, `readOracleRegistryPage`, `readOracleFinalizationStatus`, `readOracleConfig`, `readOracleCollateralStatus`, `readTryGetPrice`, `readOraclePriceData`, `readOracleBasics`, `readOracleTiming`, `readConfiguredPositionIds`, `readNegRiskMarketPositionIds`, `readRiskTier`, `readSpotPrice`, `readTwap`, `readPrice`, `readLiquidity`, `readPositionSnapshot`, `readManyPositionSnapshots`, `readOraclePositionMeta`, `readManyOraclePositionMeta`, `hydrateOraclePositionIds`, `readPoolSnapshot`, `readPoolCaps`, `readPoolAccounting`, `readPoolRates`, `readPoolSharePrice`, `readPoolHealthScore`, `readPoolDebtState`, `readPoolCoreAddress`, `readSystemSnapshot`
|
|
121
|
+
|
|
122
|
+
**Types:** `StrategyRateParams`, `SimulatedTx`, `MarketConfigItem`, `OraclePriceUpdateItem`, `OracleLikeForSeeding`, `OracleSeedPlan`, `OracleSeedExecResult`, `MarketConfigItemJson`, `OppositePairItemJson`, `NegRiskMarketItemJson`, `SeedOracleFromJsonResult`, `OracleUpdaterRouterUpdate`, `AccessManagerCanCallLike`, `CanCallResult`, `MulticallChunkOptions`, `ReadonlyContract`, `VarlaContracts`, `GetVarlaContractsParams`, `DecodedEvent`, `GetEventLogsChunkedParams`, `OracleRegistryEntry`, `SyncOracleRegistryViaEventsParams`, `GetRecentEventsParams`, `VarlaChainKey`, `StablecoinKind`, `CollateralMeta`, `ChainMeta`, `ChainKey`, `AddressBook`, `ReadAccessManagerBasics`, `ReadManyHasRoleResult`, `ReadManyTargetFunctionRolesResult`, `ReadManyTargetConfigsResult`, `ReadAdapterInfo`, `InterestRateParams`, `ReadAccountSnapshot`, `ReadRepayTiming`, `ReadPositionCount`, `ReadOracleGuardsStatus`, `ReadCoreAddresses`, `ReadMaxPositionsConfig`, `ReadAccountPositionsFull`, `ReadPositionBalances`, `ReadBorrowerState`, `ReadPortfolioValue`, `ReadCoreGlobalDebt`, `ReadPositionLiquidationConfigOverride`, `ReadBorrowersPage`, `ReadHealthFactor`, `ReadLiquidationConfig`, `ReadDefaultLtvConfig`, `ReadTieredLtvConfig`, `ReadTierLiquidationConfig`, `ReadLiquidationParamsForPosition`, `ReadPositionLtvOverride`, `ReadManyLiquidationBonusBpsRow`, `ReadBorrowLimits`, `ReadHypotheticalBorrowCapacity`, `PreviewBorrow`, `PreviewRepay`, `ReadLenderSnapshot`, `ReadLiquidatorBasics`, `ReadCanLiquidate`, `ReadPreviewLiquidation`, `ReadBadDebtStatus`, `ReadOracleRegistryParams`, `ReadOracleRegistryPage`, `ReadOracleConfig`, `ReadOracleFinalizationStatus`, `ReadOracleCollateralStatus`, `ReadTryGetPrice`, `ReadOraclePriceData`, `ReadOracleBasics`, `ReadOracleTiming`, `ReadPositionSnapshot`, `ReadOraclePositionMeta`, `ReadPoolSnapshot`, `ReadPoolDebtState`, `ReadPoolCaps`, `ReadPoolAccounting`, `ReadPoolRates`, `ReadPoolSharePrice`, `ReadPoolHealthScore`, `ReadSystemSnapshot`
|
|
123
|
+
|
|
124
|
+
**Constants:** `ORACLE_UPDATER_ROUTER_EIP712`, `ORACLE_UPDATER_ROUTER_TYPES`, `UPDATE_TYPEHASH`, `ORACLE_SIGS`, `ORACLE_EVENTS`, `CORE_EVENTS`, `POOL_EVENTS`, `SUPPORTED_CHAINS`
|
|
125
|
+
|
|
126
|
+
### `@varla/sdk/contracts` (6 functions, 3 types)
|
|
127
|
+
|
|
128
|
+
**Functions:** `getAddressBook`, `getVarlaContracts`, `getRequiredVarlaContracts`, `getErc20`, `getErc1155`, `getErc4626`
|
|
129
|
+
|
|
130
|
+
**Types:** `ReadonlyContract`, `VarlaContracts`, `GetVarlaContractsParams`
|
|
131
|
+
|
|
132
|
+
### `@varla/sdk/views` (83 functions, 55 types)
|
|
133
|
+
|
|
134
|
+
**Functions:** `readAccessManagerBasics`, `readRoleSummary`, `readTargetConfig`, `readHasRole`, `readManyHasRole`, `readManyTargetFunctionRoles`, `readManyTargetConfigs`, `readAdapterInfo`, `readInterestRateStrategyBasics`, `getInterestRateStrategyFromPool`, `readProxyAdminPaused`, `readRepayTiming`, `readPositionCount`, `readOracleGuardsStatus`, `readAccountSnapshot`, `readCoreAddresses`, `readMaxPositionsConfig`, `readAccountPositionsFull`, `readPositionBalances`, `readBorrowerState`, `readPortfolioValue`, `readBorrowers`, `readCoreGlobalDebt`, `readPositionLiquidationConfigOverride`, `readPositionBalance`, `readAccountPositions`, `readBorrowersPage`, `readManyAccountSnapshots`, `readHealthFactor`, `readLiquidationConfig`, `readDefaultLtvConfig`, `readTieredLtvConfig`, `readTierLiquidationConfig`, `readLiquidationParamsForPosition`, `readPositionLtvOverride`, `readLtvForPosition`, `readLiquidationBonusBps`, `readManyLiquidationBonusBps`, `previewBorrow`, `previewRepay`, `readBorrowLimits`, `readManyBorrowLimits`, `readHypotheticalBorrowCapacity`, `readLenderSnapshot`, `readMaxWithdraw`, `readMaxRedeem`, `readLiquidatorBasics`, `readCanLiquidate`, `readPreviewLiquidation`, `readCalculateLiquidationBonus`, `readBadDebtStatus`, `readMergeLiquidatorBasics`, `readConvertLiquidatorBasics`, `readOracleRegistry`, `readOracleRegistryPage`, `readOracleFinalizationStatus`, `readOracleConfig`, `readOracleCollateralStatus`, `readTryGetPrice`, `readOraclePriceData`, `readOracleBasics`, `readOracleTiming`, `readConfiguredPositionIds`, `readNegRiskMarketPositionIds`, `readRiskTier`, `readSpotPrice`, `readTwap`, `readPrice`, `readLiquidity`, `readPositionSnapshot`, `readManyPositionSnapshots`, `readOraclePositionMeta`, `readManyOraclePositionMeta`, `hydrateOraclePositionIds`, `readPoolSnapshot`, `readPoolCaps`, `readPoolAccounting`, `readPoolRates`, `readPoolSharePrice`, `readPoolHealthScore`, `readPoolDebtState`, `readPoolCoreAddress`, `readSystemSnapshot`
|
|
135
|
+
|
|
136
|
+
**Types:** `ReadAccessManagerBasics`, `ReadManyHasRoleResult`, `ReadManyTargetFunctionRolesResult`, `ReadManyTargetConfigsResult`, `ReadAdapterInfo`, `InterestRateParams`, `ReadAccountSnapshot`, `ReadRepayTiming`, `ReadPositionCount`, `ReadOracleGuardsStatus`, `ReadCoreAddresses`, `ReadMaxPositionsConfig`, `ReadAccountPositionsFull`, `ReadPositionBalances`, `ReadBorrowerState`, `ReadPortfolioValue`, `ReadCoreGlobalDebt`, `ReadPositionLiquidationConfigOverride`, `ReadBorrowersPage`, `ReadHealthFactor`, `ReadLiquidationConfig`, `ReadDefaultLtvConfig`, `ReadTieredLtvConfig`, `ReadTierLiquidationConfig`, `ReadLiquidationParamsForPosition`, `ReadPositionLtvOverride`, `ReadManyLiquidationBonusBpsRow`, `ReadBorrowLimits`, `ReadHypotheticalBorrowCapacity`, `PreviewBorrow`, `PreviewRepay`, `ReadLenderSnapshot`, `ReadLiquidatorBasics`, `ReadCanLiquidate`, `ReadPreviewLiquidation`, `ReadBadDebtStatus`, `ReadOracleRegistryParams`, `ReadOracleRegistryPage`, `ReadOracleConfig`, `ReadOracleFinalizationStatus`, `ReadOracleCollateralStatus`, `ReadTryGetPrice`, `ReadOraclePriceData`, `ReadOracleBasics`, `ReadOracleTiming`, `ReadPositionSnapshot`, `ReadOraclePositionMeta`, `ReadPoolSnapshot`, `ReadPoolDebtState`, `ReadPoolCaps`, `ReadPoolAccounting`, `ReadPoolRates`, `ReadPoolSharePrice`, `ReadPoolHealthScore`, `ReadSystemSnapshot`
|
|
137
|
+
|
|
138
|
+
### `@varla/sdk/actions` (63 functions, 14 types, 4 constants)
|
|
139
|
+
|
|
140
|
+
**Functions:** `prepareCoreSetDefaultLtvConfig`, `prepareCoreSetLiquidationConfig`, `prepareCoreSetTierLiquidationConfig`, `prepareCoreSetMaxPositions`, `prepareCoreSetMaxPositionsBounds`, `prepareCoreSetOracle`, `prepareCoreSetPositionLtvOverride`, `prepareCoreClearPositionLtvOverride`, `prepareCoreSetPositionLiquidationConfigOverride`, `prepareCoreClearPositionLiquidationConfigOverride`, `preparePoolSetDepositCap`, `preparePoolSetBorrowCap`, `preparePoolWithdrawReserve`, `preparePoolSetInterestRateStrategy`, `prepareOracleSetMaxStaleness`, `prepareOracleSetLiquidationGracePeriod`, `prepareOracleSetDefaultEarlyClosureWindow`, `prepareStrategySetPool`, `prepareStrategySetRateParams`, `prepareOracleUpdaterRouterSetPublisher`, `prepareCoreDeposit`, `prepareCoreWithdraw`, `prepareCoreBorrow`, `prepareCoreRepay`, `prepareErc20Approve`, `prepareErc1155SetApprovalForAll`, `prepareLiquidatorLiquidate`, `prepareLiquidatorLiquidateMulti`, `prepareLiquidatorLiquidateBadDebt`, `prepareLiquidatorResolveBadDebtWithReserve`, `prepareOracleConfigurePositionsBatch`, `prepareOracleConfigurePosition`, `prepareOracleSetUpdater`, `prepareOracleSetPositionEarlyClosureWindowOverride`, `prepareOracleClearPositionEarlyClosureWindowOverride`, `prepareOracleInvalidatePosition`, `prepareOracleValidatePosition`, `prepareOracleRegisterNegRiskMarketPositions`, `prepareOracleOverrideNegRiskMarketPositions`, `prepareOracleConfigureOppositePositions`, `prepareOracleConfigureNegRiskPositionsBatch`, `prepareOracleUpdatePrices`, `prepareOracleUpdatePrice`, `prepareOracleSetResolutionPrice`, `planOracleSeed`, `seedOracleFromJson`, `seedOracleFromJsonFiles`, `prepareOracleSeedPlan`, `executeOracleSeedPlan`, `buildNonce`, `splitNonce`, `toOracleUpdaterRouterTypedMessage`, `computeOracleUpdaterDigest`, `signOracleUpdaterRouterUpdate`, `prepareOracleUpdaterRouterUpdatePricesWithSig`, `preparePoolDeposit`, `preparePoolMint`, `preparePoolWithdraw`, `preparePoolRedeem`, `readCanCall`, `assertCanCallImmediate`, `sendTx`, `selectorFromSignature`
|
|
141
|
+
|
|
142
|
+
**Types:** `StrategyRateParams`, `SimulatedTx`, `MarketConfigItem`, `OraclePriceUpdateItem`, `OracleLikeForSeeding`, `OracleSeedPlan`, `OracleSeedExecResult`, `MarketConfigItemJson`, `OppositePairItemJson`, `NegRiskMarketItemJson`, `SeedOracleFromJsonResult`, `OracleUpdaterRouterUpdate`, `AccessManagerCanCallLike`, `CanCallResult`
|
|
143
|
+
|
|
144
|
+
**Constants:** `ORACLE_UPDATER_ROUTER_EIP712`, `ORACLE_UPDATER_ROUTER_TYPES`, `UPDATE_TYPEHASH`, `ORACLE_SIGS`
|
|
145
|
+
|
|
146
|
+
### `@varla/sdk/events` (4 functions, 5 types, 3 constants)
|
|
147
|
+
|
|
148
|
+
**Functions:** `decodeEventLogs`, `getEventLogsChunked`, `syncOracleRegistryViaEvents`, `getRecentEvents`
|
|
149
|
+
|
|
150
|
+
**Types:** `DecodedEvent`, `GetEventLogsChunkedParams`, `OracleRegistryEntry`, `SyncOracleRegistryViaEventsParams`, `GetRecentEventsParams`
|
|
151
|
+
|
|
152
|
+
**Constants:** `ORACLE_EVENTS`, `CORE_EVENTS`, `POOL_EVENTS`
|
|
153
|
+
|
|
154
|
+
### `@varla/sdk/addresses` (2 constants)
|
|
155
|
+
|
|
156
|
+
**Constants:** `polygon`, `bsc`
|
|
157
|
+
|
|
158
|
+
### `@varla/sdk/types` (2 types)
|
|
159
|
+
|
|
160
|
+
**Types:** `ChainKey`, `AddressBook`
|
|
161
|
+
|
|
162
|
+
### `@varla/sdk/batch` (2 functions, 1 types)
|
|
163
|
+
|
|
164
|
+
**Functions:** `chunk`, `multicallChunks`
|
|
165
|
+
|
|
166
|
+
**Types:** `MulticallChunkOptions`
|
|
167
|
+
|
|
168
|
+
### `@varla/sdk/format` (5 functions)
|
|
169
|
+
|
|
170
|
+
**Functions:** `formatWad`, `formatBps`, `formatPriceE8`, `parseUnits`, `parseWad`
|
|
171
|
+
|
|
172
|
+
### `@varla/sdk/errors` (7 functions, 1 types)
|
|
173
|
+
|
|
174
|
+
**Functions:** `extractRevertData`, `decodeVarlaError`, `isVarlaError`, `formatVarlaError`, `tryFormatVarlaError`, `getAllVarlaErrorNames`, `getVarlaErrorSelectors`
|
|
175
|
+
|
|
176
|
+
**Types:** `DecodedVarlaError`
|
|
177
|
+
<!-- END GENERATED:EXPORTS -->
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
# @varla-xyz/protocol
|
|
2
|
+
|
|
3
|
+
## 1.13.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 68344dc: Updated the unsupported chain error message wording in the SDK metadata helper.
|
|
8
|
+
|
|
9
|
+
- Adjusted the error text thrown by `assertSupportedChain` to improve clarity.
|
|
10
|
+
|
|
11
|
+
## 1.13.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- e88e5c3: Adjusted the unsupported chain error message format in assertSupportedChain.
|
|
16
|
+
|
|
17
|
+
- Update the error string to use a comma-separated phrasing for unsupported chain validation.
|
|
18
|
+
|
|
19
|
+
## 1.13.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- 8b15fe4: Added a new assertSupportedChain helper to validate supported chain keys with descriptive errors.
|
|
24
|
+
|
|
25
|
+
- Exported assertSupportedChain to throw a clear error when an unsupported chain key is provided.
|
|
26
|
+
|
|
27
|
+
## 1.12.0
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- a820ddc: Add supported chain constants and a type guard to the SDK metadata API.
|
|
32
|
+
|
|
33
|
+
- Expose SUPPORTED_CHAINS and isSupportedChain for checking valid chain keys
|
|
34
|
+
|
|
35
|
+
## 1.11.8
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- d4c9c9c: Reordered exports and import statements across the SDK for consistency without changing functionality.
|
|
40
|
+
|
|
41
|
+
- Reorganized module export ordering in actions, events, views, and leverage indices
|
|
42
|
+
- Cleaned up import ordering and formatting in several SDK files
|
|
43
|
+
|
|
44
|
+
## 1.11.7
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- 09f85ca: - Update SDK documentation files (README, AGENTS, BACKEND, FRONTEND)
|
|
49
|
+
- Adjust SDK tests in errors.unit.test.ts and generated views.referenced tests
|
|
50
|
+
- Minor configuration tweaks in package.json and tsconfig.json
|
|
51
|
+
|
|
52
|
+
## 1.11.6
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- 14f5de7: - feat(sdk): add deleverage execution and planning helpers
|
|
57
|
+
- feat(sdk): add leverage loop planning and execution utilities
|
|
58
|
+
- update leverage planning/types and adjust execute/index exports
|
|
59
|
+
- expand leverage and generated view test coverage
|
|
60
|
+
|
|
61
|
+
## 1.11.5
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- 2bdbab0: - add new leverage module utilities (execute, math, plan, types, and index)
|
|
66
|
+
- add extensive leverage unit tests covering edge cases, invariants, and math
|
|
67
|
+
- update sdk package.json for leverage additions
|
|
68
|
+
|
|
69
|
+
## 1.11.4
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- 1707039: - Refactor tokenomics funding flow to use distributor account
|
|
74
|
+
- Adjust core SDK views implementation in `packages/sdk/src/views/core.ts`
|
|
75
|
+
- Update and expand core and multicall view tests
|
|
76
|
+
|
|
77
|
+
## 1.11.3
|
|
78
|
+
|
|
79
|
+
### Patch Changes
|
|
80
|
+
|
|
81
|
+
- 624a11d: - update SDK generated view reference test (`packages/sdk/test/generated/views.referenced.test.ts`)
|
|
82
|
+
- docs: align protocol docs with VarlaCore custody and risk model
|
|
83
|
+
|
|
84
|
+
## 1.11.2
|
|
85
|
+
|
|
86
|
+
### Patch Changes
|
|
87
|
+
|
|
88
|
+
- 748ae7c: - add/update SDK documentation in AGENTS.md and FRONTEND.md
|
|
89
|
+
- tweak generated views referenced test (packages/sdk/test/generated/views.referenced.test.ts)
|
|
90
|
+
- include SDK release commit "chore(release): sdk v1.11.1"
|
|
91
|
+
|
|
92
|
+
## 1.11.1
|
|
93
|
+
|
|
94
|
+
### Patch Changes
|
|
95
|
+
|
|
96
|
+
- 5e4af32: - feat(sdk): add oracle finalization status view
|
|
97
|
+
- feat: add early oracle resolution and ops tooling
|
|
98
|
+
- update SDK views (core, lenders, pool, index) and README
|
|
99
|
+
- expand SDK tests for views and RPCs (exports, referenced, bsc, polygon)
|
|
100
|
+
|
|
101
|
+
## 1.11.0
|
|
102
|
+
|
|
103
|
+
### Minor Changes
|
|
104
|
+
|
|
105
|
+
- BSC deployments and updates:
|
|
106
|
+
- Added OracleUpdaterRouter deployment
|
|
107
|
+
- Updated Varla contracts (core, pool, oracle, liquidators, access manager, proxy admin)
|
|
108
|
+
- Updated OpinionCtfExecutionEngineAdapter deployment
|
|
109
|
+
- Added new BSC solc input artifacts for deployments
|
|
110
|
+
|
|
111
|
+
## 1.10.14
|
|
112
|
+
|
|
113
|
+
### Patch Changes
|
|
114
|
+
|
|
115
|
+
- c17e34a: Updated oracle view utilities in `packages/sdk/src/views/oracle.ts` and expanded oracle view logic by 18 lines.
|
|
116
|
+
|
|
117
|
+
## 1.10.13
|
|
118
|
+
|
|
119
|
+
### Patch Changes
|
|
120
|
+
|
|
121
|
+
- Updated `deployments/.touch` and included the CI release routing commit.
|
|
122
|
+
- 7240619:
|
|
123
|
+
- Export `OracleUpdaterRouter` ABI via `generated.abis`.
|
|
124
|
+
- Export `OracleUpdaterRouter` action helpers via `@varla/sdk/actions`.
|
|
125
|
+
- Add `oracleUpdaterRouter` to `getVarlaContracts` / `getRequiredVarlaContracts`.
|
|
126
|
+
- Add admin helper to manage router publishers.
|
|
127
|
+
|
|
128
|
+
## 1.10.12
|
|
129
|
+
|
|
130
|
+
### Patch Changes
|
|
131
|
+
|
|
132
|
+
- 6873b37:
|
|
133
|
+
- docs(sdk): add frontend integration guide
|
|
134
|
+
- feat(sdk): add action helpers and core view reads
|
|
135
|
+
- feat(sdk): add oracle seed helpers, JSON seeding, and RBAC/signature utilities
|
|
136
|
+
- Updated packaged SDK artifact (packages/sdk/varla-sdk-1.0.1.tgz)
|
|
137
|
+
|
|
138
|
+
## 1.10.11
|
|
139
|
+
|
|
140
|
+
### Patch Changes
|
|
141
|
+
|
|
142
|
+
- Add frontend integration guide (`packages/sdk/FRONTEND.md`)
|
|
143
|
+
- Update SDK README with integration info (`packages/sdk/README.md`)
|
|
144
|
+
- Adjust SDK package metadata/version (`packages/sdk/package.json`)
|
|
145
|
+
- Update generated views test snapshot (`packages/sdk/test/generated/views.referenced.test.ts`)
|
|
146
|
+
|
|
147
|
+
## 1.10.10
|
|
148
|
+
|
|
149
|
+
### Patch Changes
|
|
150
|
+
|
|
151
|
+
- Update generated SDK view reference test expectations.
|
|
152
|
+
- Touch `packages/sdk/test/generated/views.referenced.test.ts`.
|
|
153
|
+
|
|
154
|
+
## 1.10.9
|
|
155
|
+
|
|
156
|
+
### Patch Changes
|
|
157
|
+
|
|
158
|
+
- cd6a0d3:
|
|
159
|
+
- sdk: add oracle seed helpers, selector/JSON seeding, and execution/RBAC signature helpers
|
|
160
|
+
- sdk: add pool, liquidator, and admin write helpers
|
|
161
|
+
- tests: add oracle seed RBAC coverage for Anvil
|
|
162
|
+
- docs: update SDK README and actions admin/oracle modules
|
|
163
|
+
|
|
164
|
+
## 1.10.8
|
|
165
|
+
|
|
166
|
+
### Patch Changes
|
|
167
|
+
|
|
168
|
+
- test(sdk): add oracle seed RBAC anvil coverage
|
|
169
|
+
- update anvil tests for `oracle.seed.rbac` and `write.local`
|
|
170
|
+
- adjust generated views referenced by tests
|
|
171
|
+
|
|
172
|
+
## 1.10.7
|
|
173
|
+
|
|
174
|
+
### Patch Changes
|
|
175
|
+
|
|
176
|
+
- - feat(sdk): add pool, liquidator, and admin write helpers
|
|
177
|
+
- update actions index and SDK docs
|
|
178
|
+
- expand SDK tests for actions and local anvil writes
|
|
179
|
+
|
|
180
|
+
## 1.10.6
|
|
181
|
+
|
|
182
|
+
### Patch Changes
|
|
183
|
+
|
|
184
|
+
- - feat(sdk): add oracle seed execution and RBAC signature helpers
|
|
185
|
+
- add JSON seeding and oracle seed helper utilities to SDK actions
|
|
186
|
+
- update SDK tests and README for the new helpers
|
|
187
|
+
|
|
188
|
+
## 1.10.5
|
|
189
|
+
|
|
190
|
+
### Patch Changes
|
|
191
|
+
|
|
192
|
+
- 29f54e7: feat(sdk): add action helpers and core view reads
|
|
193
|
+
- add oracle action helpers and utilities in `packages/sdk/src/actions/*`
|
|
194
|
+
- add unit tests in `packages/sdk/test/actions/actions.unit.test.ts`
|
|
195
|
+
|
|
196
|
+
## 1.10.4
|
|
197
|
+
|
|
198
|
+
### Patch Changes
|
|
199
|
+
|
|
200
|
+
- Added SDK action helpers across core, erc20, erc1155, oracle, rbac, and tx modules.
|
|
201
|
+
- Added core view read helpers, including repay timing and guard-related reads.
|
|
202
|
+
- Expanded SDK exports and tests to cover new actions and views.
|
|
203
|
+
|
|
204
|
+
## 1.10.3
|
|
205
|
+
|
|
206
|
+
### Patch Changes
|
|
207
|
+
|
|
208
|
+
- Updated BSC deployment artifacts for Varla contracts (core, pool, oracle, liquidators, access manager, proxy admin), refreshed OpinionCtfExecutionEngineAdapter deployment data, and adjusted related BSC solc input artifacts.
|
|
209
|
+
|
|
210
|
+
## 1.10.2
|
|
211
|
+
|
|
212
|
+
### Patch Changes
|
|
213
|
+
|
|
214
|
+
- Updated deployment artifacts for multiple Varla contracts on BSC.
|
|
215
|
+
- Updated deployment artifacts for multiple Varla contracts on Polygon.
|
|
216
|
+
- Adjusted solc input snapshots for BSC and Polygon deployments.
|
|
217
|
+
|
|
218
|
+
## 1.10.1
|
|
219
|
+
|
|
220
|
+
### Patch Changes
|
|
221
|
+
|
|
222
|
+
- Add borrow/repay preview helpers to core views.
|
|
223
|
+
- Add liquidation-related helpers to liquidator views.
|
|
224
|
+
- Add unit tests for the new core and liquidator view helpers.
|
|
225
|
+
|
|
226
|
+
## 1.10.0
|
|
227
|
+
|
|
228
|
+
### Minor Changes
|
|
229
|
+
|
|
230
|
+
- Add SDK view helpers:
|
|
231
|
+
- Core/oracle/pool helpers
|
|
232
|
+
- Borrow limit and pool rate helpers
|
|
233
|
+
- Paging for oracle registry and borrowers
|
|
234
|
+
- Oracle position metadata and system snapshot helpers
|
|
235
|
+
|
|
236
|
+
## 1.9.0
|
|
237
|
+
|
|
238
|
+
### Minor Changes
|
|
239
|
+
|
|
240
|
+
- Added core/oracle/pool view helper APIs:
|
|
241
|
+
- Borrow limit and pool rate helpers
|
|
242
|
+
- Paging helpers for oracle registry and borrowers
|
|
243
|
+
- Oracle position metadata and system snapshot support
|
|
244
|
+
|
|
245
|
+
## 1.8.0
|
|
246
|
+
|
|
247
|
+
### Minor Changes
|
|
248
|
+
|
|
249
|
+
- Updated SDK changelog for recent releases.
|
|
250
|
+
- Adjusted package version metadata.
|
|
251
|
+
- Made a minor documentation tweak in `AGENTS.md`.
|
|
252
|
+
|
|
253
|
+
## 1.7.0
|
|
254
|
+
|
|
255
|
+
### Minor Changes
|
|
256
|
+
|
|
257
|
+
- Added SDK view helpers for core/oracle/pool data, borrow limits, and pool rates.
|
|
258
|
+
- Added paging helpers for the oracle registry/borrowers and oracle position meta/system snapshots.
|
|
259
|
+
- Updated SDK docs, changelog, and package metadata.
|
|
260
|
+
|
|
261
|
+
## 1.6.0
|
|
262
|
+
|
|
263
|
+
### Minor Changes
|
|
264
|
+
|
|
265
|
+
- Bump `@varla/sdk` and update package metadata
|
|
266
|
+
- Update SDK changelog entries
|
|
267
|
+
- Refresh AGENTS documentation
|
|
268
|
+
|
|
269
|
+
## 1.5.0
|
|
270
|
+
|
|
271
|
+
### Minor Changes
|
|
272
|
+
|
|
273
|
+
- Added SDK view/helper APIs for core/oracle/pool, including borrow limits, pool rates, and curated views
|
|
274
|
+
- Added paging helpers for oracle registry/borrowers and oracle position meta/system snapshot helpers
|
|
275
|
+
- Added multicall grid/formatting utilities and access manager + liquidation/LTV helpers
|
|
276
|
+
- Improved test coverage for multicall failure paths and strict helper reference checks
|
|
277
|
+
|
|
278
|
+
## 1.4.0
|
|
279
|
+
|
|
280
|
+
### Minor Changes
|
|
281
|
+
|
|
282
|
+
- Updated SDK docs (README/AGENTS) and changelog
|
|
283
|
+
- Refreshed VarlaCore ABI definitions
|
|
284
|
+
- Adjusted generated views test reference
|
|
285
|
+
|
|
286
|
+
## 1.3.0
|
|
287
|
+
|
|
288
|
+
### Minor Changes
|
|
289
|
+
|
|
290
|
+
- - Added new core and oracle view helper utilities in the SDK.
|
|
291
|
+
- Expanded and validated view exports with additional generated tests.
|
|
292
|
+
- Added RPC and unit test coverage for core/oracle views.
|
|
293
|
+
|
|
294
|
+
## 1.2.1
|
|
295
|
+
|
|
296
|
+
### Patch Changes
|
|
297
|
+
|
|
298
|
+
- d26aa01: sdk: add oracle position metadata and system snapshot
|
|
299
|
+
- 385745c: sdk: add oracle/core paging helpers
|
|
300
|
+
|
|
301
|
+
## 1.2.0
|
|
302
|
+
|
|
303
|
+
### Minor Changes
|
|
304
|
+
|
|
305
|
+
- 65129cb: sdk: expanded view helpers + tests
|
|
306
|
+
|
|
307
|
+
## 1.1.1
|
|
308
|
+
|
|
309
|
+
### Patch Changes
|
|
310
|
+
|
|
311
|
+
- 6d1298e: test: speed up SDK test suite by switching oracle registry sync to fixtures by default, adding an env-gated slow RPC test, and adding an ABI coverage smoke test.
|
|
312
|
+
|
|
313
|
+
## 1.1.0
|
|
314
|
+
|
|
315
|
+
### Minor Changes
|
|
316
|
+
|
|
317
|
+
- ## SDK: read-only views, batching, and indexer helpers
|
|
318
|
+
|
|
319
|
+
### Added
|
|
320
|
+
|
|
321
|
+
- Read-only viem contract bindings + helpers (`getVarlaContracts`, `getRequiredVarlaContracts`).
|
|
322
|
+
- High-level read facades for Core/Pool/Oracle (account snapshot/positions, pool snapshot, oracle registry).
|
|
323
|
+
- Multicall batching utilities (`multicallChunks`) to make frontend reads RPC-efficient.
|
|
324
|
+
- Adapter read facade (`readAdapterInfo`) for Polymarket + Opinion adapters.
|
|
325
|
+
- Event/indexer helpers:
|
|
326
|
+
- chunked event log fetching
|
|
327
|
+
- `syncOracleRegistryViaEvents()` (event-driven discovery + multicall hydration)
|
|
328
|
+
|
|
329
|
+
### Testing
|
|
330
|
+
|
|
331
|
+
- Expanded RPC-backed tests (Polygon + BSC) and added Bun typechecking for tests.
|
|
332
|
+
|
|
333
|
+
## 1.0.1
|
|
334
|
+
|
|
335
|
+
### Patch Changes
|
|
336
|
+
|
|
337
|
+
- bf48696: bump sdk version
|
|
338
|
+
|
|
339
|
+
## 1.0.0
|
|
340
|
+
|
|
341
|
+
### Major Changes
|
|
342
|
+
|
|
343
|
+
- 1f05548: First stable protocol package release.
|
|
344
|
+
|
|
345
|
+
- Publishes Polygon + BSC deployments addressbooks
|
|
346
|
+
- Publishes canonical ABIs
|
|
347
|
+
|
|
348
|
+
### Patch Changes
|
|
349
|
+
|
|
350
|
+
- 9f411bf: trigger NPM publish
|
|
351
|
+
|
|
352
|
+
## 1.0.0
|
|
353
|
+
|
|
354
|
+
### Major Changes
|
|
355
|
+
|
|
356
|
+
- 1f05548: First stable protocol package release.
|
|
357
|
+
|
|
358
|
+
- Publishes Polygon + BSC deployments addressbooks
|
|
359
|
+
- Publishes canonical ABIs
|