@venusprotocol/liquidity-hub 1.0.0-dev.2 → 1.0.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 +22 -0
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -333,6 +333,28 @@ forge fmt # formatting
|
|
|
333
333
|
|
|
334
334
|
**Test tiers:** unit (per Hub and per YieldGroup family), integration lifecycle over the real Hub + real adapters against faithful mocks, a stateful invariant fuzz (asserts _backed_ / _non-dilutive_ / _conservative_; FRV excluded so its state machine doesn't starve coverage), and BSC-mainnet **fork** tests that reuse the real deploy scripts against live Venus Core, Fluid, and FRV.
|
|
335
335
|
|
|
336
|
+
## Consuming the npm package
|
|
337
|
+
|
|
338
|
+
Published as `@venusprotocol/liquidity-hub`. The tarball carries `contracts/` and `deployments/` only — there is no `artifacts/` tree, so ABIs come from the deployment records.
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
npm i @venusprotocol/liquidity-hub # stable, cut from main
|
|
342
|
+
npm i @venusprotocol/liquidity-hub@develop # prerelease, cut from develop
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
**Solidity.** Import the sources directly. OpenZeppelin 4.9+ is pulled in as a dependency. `@venusprotocol/governance-contracts` is an _optional_ peer: only `Hub.sol`, `HubRegistry.sol` and `YieldGroupBase.sol` need it, since they inherit `AccessControlledV8`. Interface-only consumers need nothing beyond the install.
|
|
346
|
+
|
|
347
|
+
```solidity
|
|
348
|
+
import { IHub } from "@venusprotocol/liquidity-hub/contracts/interfaces/IHub.sol";
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
**Addresses and ABIs.** `deployments/<network>_addresses.json` is a name → address map; each `deployments/<network>/<Name>.json` carries `address`, `block`, `chainId`, `contract` and the deployed `abi`.
|
|
352
|
+
|
|
353
|
+
```ts
|
|
354
|
+
import addresses from "@venusprotocol/liquidity-hub/deployments/bscmainnet_addresses.json";
|
|
355
|
+
import hub from "@venusprotocol/liquidity-hub/deployments/bscmainnet/Hub_USDT.json";
|
|
356
|
+
```
|
|
357
|
+
|
|
336
358
|
## Deployment
|
|
337
359
|
|
|
338
360
|
Beacon-proxy model: one `UpgradeableBeacon` **per family per chain** (Hub, Core, FRV, Flux), each owned by governance — `beacon.upgradeTo` upgrades every vault of that family atomically. Per-asset instances are `BeaconProxy`s.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venusprotocol/liquidity-hub",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Per-asset ERC-4626 allocator vault",
|
|
5
5
|
"author": "Venus",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -33,9 +33,16 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@openzeppelin/contracts": "^4.9.6",
|
|
36
|
-
"@openzeppelin/contracts-upgradeable": "^4.9.6"
|
|
36
|
+
"@openzeppelin/contracts-upgradeable": "^4.9.6"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
37
39
|
"@venusprotocol/governance-contracts": "^2.14.0"
|
|
38
40
|
},
|
|
41
|
+
"peerDependenciesMeta": {
|
|
42
|
+
"@venusprotocol/governance-contracts": {
|
|
43
|
+
"optional": true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
39
46
|
"devDependencies": {
|
|
40
47
|
"@commitlint/cli": "^21.0.1",
|
|
41
48
|
"@commitlint/config-conventional": "^21.0.1",
|