Skip to content
Open

Next #420

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
008ac42
feat(vault-v2): create classes
oumar-fall Aug 6, 2025
602049c
feat(vault-v2): implement class
oumar-fall Aug 8, 2025
386602e
feat(simulation-sdk): simulate vault v2 deposit and withdraw
oumar-fall Aug 8, 2025
46a1a88
test(vault-v2): add v2 simulation tests
oumar-fall Aug 11, 2025
128bddc
feat(vault-v2): update wagmi fetchers
oumar-fall Aug 12, 2025
52991b9
feat(vault-v2): add encoding
oumar-fall Aug 13, 2025
f2443bc
fix(test): systematically remove code from test address
oumar-fall Aug 13, 2025
5914e63
fix: bump viem
oumar-fall Aug 13, 2025
b8ed90b
test(vault-v2): add withdraw tests
oumar-fall Aug 14, 2025
07cb879
Merge branch 'next' into feat/vault-v2-class
oumar-fall Aug 14, 2025
cf16e6d
fix(test): fix build
oumar-fall Aug 14, 2025
b72192c
test(populateBundle): remove test.only
oumar-fall Aug 14, 2025
cc974b1
fix(test): fix EIP7702 check
oumar-fall Aug 14, 2025
39fe0e0
fix: fix eip7702 check
oumar-fall Aug 14, 2025
dd0a339
fix(vault-v2-adapters): throw dedicated error
oumar-fall Aug 20, 2025
86105db
fix(addresses): checksum addresses
oumar-fall Aug 20, 2025
b2b705d
fix(vault-v2): fix casing
oumar-fall Aug 20, 2025
e9c32ef
fix: use strict null checks
oumar-fall Aug 20, 2025
f5b2b66
chore(deps): remove useless lodash dep
oumar-fall Aug 20, 2025
96aaa11
docs(vault-v2): add comment for eip5267 domain
oumar-fall Aug 20, 2025
75d8b7e
fix(addresses): remove deuplicate address override
oumar-fall Aug 20, 2025
a74e439
test(paraswap): update test due to accrued interests
oumar-fall Aug 21, 2025
d1c87fd
test(vault-v2): fix withdraw test
oumar-fall Aug 21, 2025
547468d
fix(nock): use stable version
oumar-fall Aug 21, 2025
a723ad1
test(blue-sdk): update viem version in test snapshot
oumar-fall Aug 21, 2025
1b1639f
test(vault-v2): add allowances tests
oumar-fall Aug 21, 2025
7c9020f
feat(vault-v2): deployless reads
oumar-fall Aug 21, 2025
513e5dd
Merge pull request #387 from morpho-org/feat/vault-v2-class
oumar-fall Aug 21, 2025
dc3c67b
Merge branch 'main' of github.com:morpho-org/sdks into next
Rubilmax Sep 30, 2025
d91a463
Merge branch 'main' of github.com:morpho-org/sdks into next
Rubilmax Sep 30, 2025
927da8d
chore(vault-v2): drop vault v2 operations
Rubilmax Sep 30, 2025
eec9209
Merge branch 'main' of github.com:morpho-org/sdks into chore/merge-next
Rubilmax Sep 30, 2025
1e731b2
Merge pull request #418 from morpho-org/chore/merge-next
Rubilmax Sep 30, 2025
839bb03
Merge branch 'next' of github.com:morpho-org/sdks into next
Rubilmax Sep 30, 2025
675b90a
refactor(contracts): rename paths
Rubilmax Sep 30, 2025
6282ac5
Merge pull request #421 from morpho-org/fix/rename-paths
Rubilmax Sep 30, 2025
847eeb0
Merge branch 'main' of github.com:morpho-org/sdks into next
Rubilmax Oct 1, 2025
de1bcea
Merge pull request #422 from morpho-org/chore/sync-main
Rubilmax Oct 1, 2025
f916d78
fix(vault-v2): repair accrue interest
Rubilmax Oct 1, 2025
9db831d
Merge pull request #423 from morpho-org/fix/vault-v2-accrue-interest
Rubilmax Oct 1, 2025
bc069d2
feat(vault-v2): add liquidity caps & allocation
Rubilmax Oct 1, 2025
9f0c10c
feat(vault-v2): add maxDeposit/maxWithdraw
Rubilmax Oct 1, 2025
7bfc43b
fix(vault-v2): fix max deposit
Rubilmax Oct 1, 2025
f1c1d20
Merge branch 'next' of github.com:morpho-org/sdks into feat/vault-v2-…
Rubilmax Oct 1, 2025
e454ef8
fix(vault-v2): add liquidity data and fix max capacities
Rubilmax Oct 2, 2025
c2a4dd1
fix(vault-v2): update fetch
Rubilmax Oct 2, 2025
072b476
fix(vault-v2): increase liquidity instead of overwriting it
Rubilmax Oct 2, 2025
9d3eb0b
Merge pull request #424 from morpho-org/feat/vault-v2-maxdeposit-with…
Rubilmax Oct 10, 2025
c0b5eec
feat(vault-v2): implement maxDeposit function e2e test
Foulks-Plb Oct 12, 2025
aa585d7
feat(vault-v2): maxWithdraw e2e test
Foulks-Plb Oct 12, 2025
55ed73d
Merge branch 'next' into feat/test-deployless-read-max
Foulks-Plb Oct 12, 2025
5b9a508
fix(vault-v2): handle zero address liquidity adapter and negative caps
Rubilmax Oct 13, 2025
2efe357
Merge branch 'feat/test-deployless-read-max' into fix/vault-v2-caps
Foulks-Plb Oct 13, 2025
ea5bf79
Merge pull request #433 from morpho-org/fix/vault-v2-caps
Foulks-Plb Oct 13, 2025
c60631a
fix(vault-v2): update tests for maxDeposit and maxWithdraw functionality
Foulks-Plb Oct 13, 2025
f5b0fce
feat(vault-v2): support MorphoMarketV1Adapter
Rubilmax Oct 13, 2025
4217fe4
fix(vault-v2): correct maxDeposit and maxWithdraw logic for zero addr…
Foulks-Plb Oct 13, 2025
03433b2
refactor(vault-v2): replace maxInt256 with MathLib.MAX_UINT_256 in te…
Foulks-Plb Oct 14, 2025
380491b
Merge pull request #432 from morpho-org/feat/test-deployless-read-max
Rubilmax Oct 14, 2025
5729f84
fix(vault-v2): rewrite relative cap logic order
Rubilmax Oct 14, 2025
ca04f4c
Merge pull request #437 from morpho-org/refactor/vault-v2-relative-cap
Rubilmax Oct 14, 2025
e80d975
fix(vault-v2): rewrite relative cap logic order (2)
Rubilmax Oct 14, 2025
7cc5361
Merge branch 'main' of github.com:morpho-org/sdks into refactor/vault…
Rubilmax Oct 14, 2025
af8979d
Merge branch 'next' into refactor/vault-v2-relative-cap
Rubilmax Oct 14, 2025
dc1d186
Merge pull request #438 from morpho-org/refactor/vault-v2-relative-cap
Rubilmax Oct 14, 2025
efb4b70
fix(blue-sdk): re-export utils
Rubilmax Oct 14, 2025
2f34ed8
Merge pull request #439 from morpho-org/fix/blue-sdk-utils
Rubilmax Oct 14, 2025
95978b5
feat(vault-v2): add GetVaultV2MorphoMarketV1Adapter and IMorphoMarket…
Foulks-Plb Oct 15, 2025
e98de23
feat(vault-v2): enhance GetVaultV2MorphoMarketV1Adapter with marketPa…
Foulks-Plb Oct 15, 2025
61df1e4
Merge branch 'next' into feat/vault-v2-market-v1-adapter
Foulks-Plb Oct 15, 2025
58b9d86
feat(vault-v2): update tests for marketV1
Foulks-Plb Oct 15, 2025
e39a6c7
feat(vault-v2): integrate MorphoMarketV1Adapter into fetchVaultV2Adap…
Foulks-Plb Oct 15, 2025
264399b
feat(vault-v2): add MorphoMarketV1Adapter ABI and integrate into Vaul…
Foulks-Plb Oct 15, 2025
7754aca
refactor(vault-v2): simplify expected data structure in VaultV2Adapte…
Foulks-Plb Oct 15, 2025
0b166be
revert(blue-sdk): addresses
Foulks-Plb Oct 15, 2025
c8ff019
Merge branch 'main' of github.com:morpho-org/sdks into sync/main
Rubilmax Oct 16, 2025
1ee8f14
Merge pull request #443 from morpho-org/sync/main
Rubilmax Oct 16, 2025
ea6cdc1
Merge branch 'next' of github.com:morpho-org/sdks into feat/vault-v2-…
Rubilmax Oct 16, 2025
e9ae0c5
fix(vault-v2-adapter): remove useless adapterId fetch
Rubilmax Oct 16, 2025
6c5b76b
refactor(array): use Array.from instead of new Array
Rubilmax Oct 16, 2025
00032ae
fix(blue-sdk-viem): update import
Rubilmax Oct 16, 2025
1d3a0df
fix(vault-v2-adapter): drop adapterId from instanciations
Rubilmax Oct 16, 2025
f796014
fix(vault-v2): handle any liquidity adapter maxDeposit/maxWithdraw
Rubilmax Oct 16, 2025
671afb8
Merge pull request #434 from morpho-org/feat/vault-v2-market-v1-adapter
Rubilmax Oct 16, 2025
644a77c
feat(vault-v2): integrate market v1 adapter and enhance maxDeposit/ma…
Foulks-Plb Oct 16, 2025
5e57d30
refactor(tests): reorganize maxWithdraw function tests for clarity
Foulks-Plb Oct 16, 2025
7d2cf8a
Merge pull request #445 from morpho-org/feature/dvxsdk-41-market-v1-a…
Rubilmax Oct 16, 2025
12e8d63
feat(market-params): add static decoding from bytes
Rubilmax Oct 17, 2025
bf31537
fix(market-params): add clear error msg
Rubilmax Oct 17, 2025
835842d
Merge pull request #446 from morpho-org/feat/market-params-decode
Rubilmax Oct 17, 2025
d622abf
Merge branch 'main' of github.com:morpho-org/sdks into next
Rubilmax Oct 17, 2025
afb4bf6
Merge pull request #447 from morpho-org/chore/next/sync-main-17.10
Rubilmax Oct 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/liquidity-sdk-viem/.env.example → .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
MAINNET_RPC_URL=
BASE_RPC_URL=
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"JuanBlanco.solidity",
"biomejs.biome"
]
}
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[solidity]": {
"editor.defaultFormatter": "JuanBlanco.solidity"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
}
},
"solidity.formatter": "forge"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"lint-staged": "^15.4.3",
"semver": "^7.7.1",
"typescript": "^5.7.2",
"viem": "^2.23.0",
"viem": "^2.33.3",
"vitest": "^3.0.5"
},
"lint-staged": {
Expand Down
10 changes: 10 additions & 0 deletions packages/blue-sdk-viem/contracts/interfaces/IERC2612.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2025 Morpho Association
pragma solidity >=0.5.0;

interface IERC2612 {
function permit(address owner, address spender, uint256 shares, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
external;
function nonces(address owner) external view returns (uint256);
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
90 changes: 90 additions & 0 deletions packages/blue-sdk-viem/contracts/vault-v2/GetVaultV2.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import {IVaultV2, Caps} from "./interfaces/IVaultV2.sol";
import {IMorphoVaultV1AdapterFactory} from "./interfaces/IMorphoVaultV1AdapterFactory.sol";

struct Token {
address asset;
string symbol;
string name;
uint256 decimals;
}

struct VaultV2Allocation {
bytes32 id;
uint256 absoluteCap;
uint256 relativeCap;
uint256 allocation;
}

struct VaultV2Response {
Token token;
address asset;
uint256 totalAssets;
uint128 _totalAssets;
uint256 totalSupply;
uint256 virtualShares;
uint64 maxRate;
uint64 lastUpdate;
address[] adapters;
address liquidityAdapter;
bytes liquidityData;
bool isLiquidityAdapterKnown;
VaultV2Allocation[] liquidityAllocations;
uint96 performanceFee;
uint96 managementFee;
address performanceFeeRecipient;
address managementFeeRecipient;
}

contract GetVaultV2 {
function query(IVaultV2 vault, IMorphoVaultV1AdapterFactory morphoVaultV1AdapterFactory)
external
view
returns (VaultV2Response memory res)
{
res.token =
Token({asset: vault.asset(), symbol: vault.symbol(), name: vault.name(), decimals: vault.decimals()});
res.asset = vault.asset();
res.totalAssets = vault.totalAssets();
res._totalAssets = vault._totalAssets();
res.totalSupply = vault.totalSupply();
res.virtualShares = vault.virtualShares();
res.maxRate = vault.maxRate();
res.lastUpdate = vault.lastUpdate();
res.liquidityAdapter = vault.liquidityAdapter();
res.liquidityData = vault.liquidityData();
res.performanceFee = vault.performanceFee();
res.managementFee = vault.managementFee();
res.performanceFeeRecipient = vault.performanceFeeRecipient();
res.managementFeeRecipient = vault.managementFeeRecipient();

uint256 adaptersLength = vault.adaptersLength();
res.adapters = new address[](adaptersLength);
for (uint256 i; i < adaptersLength; ++i) {
res.adapters[i] = vault.adapters(i);
}

if (morphoVaultV1AdapterFactory.isMorphoVaultV1Adapter(res.liquidityAdapter)) {
res.isLiquidityAdapterKnown = true;

res.liquidityAllocations = new VaultV2Allocation[](1);
res.liquidityAllocations[0] = VaultV2Allocation({
id: keccak256(abi.encode("this", res.liquidityAdapter)),
absoluteCap: 0,
relativeCap: 0,
allocation: 0
});
}

uint256 liquidityAllocationsLength = res.liquidityAllocations.length;
for (uint256 i; i < liquidityAllocationsLength; ++i) {
VaultV2Allocation memory allocation = res.liquidityAllocations[i];

allocation.absoluteCap = vault.absoluteCap(allocation.id);
allocation.relativeCap = vault.relativeCap(allocation.id);
allocation.allocation = vault.allocation(allocation.id);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import {IMorphoMarketV1Adapter} from "./interfaces/IMorphoMarketV1Adapter.sol";
import {MarketParams} from "../interfaces/IMorpho.sol";

struct VaultV2MorphoMarketV1AdapterResponse {
address parentVault;
address skimRecipient;
MarketParams[] marketParamsList;
}

contract GetVaultV2MorphoMarketV1Adapter {
function query(IMorphoMarketV1Adapter adapter)
external
view
returns (VaultV2MorphoMarketV1AdapterResponse memory res)
{
res.parentVault = adapter.parentVault();
res.skimRecipient = adapter.skimRecipient();

uint256 length = adapter.marketParamsListLength();
res.marketParamsList = new MarketParams[](length);
for (uint256 i = 0; i < length; i++) {
res.marketParamsList[i] = adapter.marketParamsList(i);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import {IMorphoVaultV1Adapter} from "./interfaces/IMorphoVaultV1Adapter.sol";

struct VaultV2MorphoVaultV1AdapterResponse {
address morphoVaultV1;
address parentVault;
address skimRecipient;
}

contract GetVaultV2MorphoVaultV1Adapter {
function query(IMorphoVaultV1Adapter adapter)
external
view
returns (VaultV2MorphoVaultV1AdapterResponse memory res)
{
res.morphoVaultV1 = adapter.morphoVaultV1();
res.parentVault = adapter.parentVault();
res.skimRecipient = adapter.skimRecipient();
}
}
19 changes: 19 additions & 0 deletions packages/blue-sdk-viem/contracts/vault-v2/interfaces/IAdapter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2025 Morpho Association
pragma solidity >=0.5.0;

/// @dev See VaultV2 NatSpec comments for more details on adapter's spec.
interface IAdapter {
/// @dev Returns the market' ids and the change in assets on this market.
function allocate(bytes memory data, uint256 assets, bytes4 selector, address sender)
external
returns (bytes32[] memory ids, int256 change);

/// @dev Returns the market' ids and the change in assets on this market.
function deallocate(bytes memory data, uint256 assets, bytes4 selector, address sender)
external
returns (bytes32[] memory ids, int256 change);

/// @dev Returns the current value of the investments of the adapter (in underlying asset).
function realAssets() external view returns (uint256 assets);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2025 Morpho Association
pragma solidity >=0.5.0;

import {IAdapter} from "./IAdapter.sol";
import {MarketParams} from "../../interfaces/IMorpho.sol";

interface IMorphoMarketV1Adapter is IAdapter {
/* EVENTS */

event SetSkimRecipient(address indexed newSkimRecipient);
event Skim(address indexed token, uint256 assets);

/* ERRORS */

error LoanAssetMismatch();
error NotAuthorized();

/* FUNCTIONS */

function factory() external view returns (address);
function parentVault() external view returns (address);
function asset() external view returns (address);
function morpho() external view returns (address);
function adapterId() external view returns (bytes32);
function skimRecipient() external view returns (address);
function marketParamsList(uint256 index) external view returns (MarketParams calldata);
function marketParamsListLength() external view returns (uint256);
function allocation(MarketParams memory marketParams) external view returns (uint256);
function ids(MarketParams memory marketParams) external view returns (bytes32[] memory);
function setSkimRecipient(address newSkimRecipient) external;
function skim(address token) external;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2025 Morpho Association
pragma solidity >= 0.5.0;

import {IAdapter} from "./IAdapter.sol";

interface IMorphoVaultV1Adapter is IAdapter {
/* EVENTS */

event SetSkimRecipient(address indexed newSkimRecipient);
event Skim(address indexed token, uint256 assets);

/* ERRORS */

error AssetMismatch();
error CannotSkimMorphoVaultV1Shares();
error InvalidData();
error NotAuthorized();

/* FUNCTIONS */

function factory() external view returns (address);
function parentVault() external view returns (address);
function morphoVaultV1() external view returns (address);
function adapterId() external view returns (bytes32);
function skimRecipient() external view returns (address);
function allocation() external view returns (uint256);
function ids() external view returns (bytes32[] memory);
function setSkimRecipient(address newSkimRecipient) external;
function skim(address token) external;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2025 Morpho Association
pragma solidity >=0.5.0;

interface IMorphoVaultV1AdapterFactory {
/* EVENTS */

event CreateMorphoVaultV1Adapter(
address indexed parentVault, address indexed morphoVaultV1, address indexed morphoVaultV1Adapter
);

/* FUNCTIONS */

function morphoVaultV1Adapter(address parentVault, address morphoVaultV1) external view returns (address);
function isMorphoVaultV1Adapter(address account) external view returns (bool);
function createMorphoVaultV1Adapter(address parentVault, address morphoVaultV1)
external
returns (address morphoVaultV1Adapter);
}
101 changes: 101 additions & 0 deletions packages/blue-sdk-viem/contracts/vault-v2/interfaces/IVaultV2.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2025 Morpho Association
pragma solidity >=0.5.0;

import {IERC20} from "../../interfaces/IERC20.sol";
import {IERC4626} from "../../interfaces/IERC4626.sol";
import {IERC2612} from "../../interfaces/IERC2612.sol";

struct Caps {
uint256 allocation;
uint128 absoluteCap;
uint128 relativeCap;
}

interface IVaultV2 is IERC4626, IERC2612 {
// State variables
function virtualShares() external view returns (uint256);
function owner() external view returns (address);
function curator() external view returns (address);
function sharesGate() external view returns (address);
function receiveAssetsGate() external view returns (address);
function sendAssetsGate() external view returns (address);
function isSentinel(address account) external view returns (bool);
function isAllocator(address account) external view returns (bool);
function firstTotalAssets() external view returns (uint256);
function _totalAssets() external view returns (uint128);
function lastUpdate() external view returns (uint64);
function maxRate() external view returns (uint64);
function adapters(uint256 index) external view returns (address);
function adaptersLength() external view returns (uint256);
function isAdapter(address account) external view returns (bool);
function allocation(bytes32 id) external view returns (uint256);
function absoluteCap(bytes32 id) external view returns (uint256);
function relativeCap(bytes32 id) external view returns (uint256);
function forceDeallocatePenalty(address adapter) external view returns (uint256);
function liquidityAdapter() external view returns (address);
function liquidityData() external view returns (bytes memory);
function timelock(bytes4 selector) external view returns (uint256);
function executableAt(bytes memory data) external view returns (uint256);
function performanceFee() external view returns (uint96);
function performanceFeeRecipient() external view returns (address);
function managementFee() external view returns (uint96);
function managementFeeRecipient() external view returns (address);

// Gating
function canSendShares(address account) external view returns (bool);
function canReceiveShares(address account) external view returns (bool);
function canSendAssets(address account) external view returns (bool);
function canReceiveAssets(address account) external view returns (bool);

// Multicall
function multicall(bytes[] memory data) external;

// Owner functions
function setOwner(address newOwner) external;
function setCurator(address newCurator) external;
function setIsSentinel(address account, bool isSentinel) external;
function setName(string memory newName) external;
function setSymbol(string memory newSymbol) external;

// Timelocks for curator functions
function submit(bytes memory data) external;
function revoke(bytes memory data) external;

// Curator functions
function setIsAllocator(address account, bool newIsAllocator) external;
function setSharesGate(address newSharesGate) external;
function setReceiveAssetsGate(address newReceiveAssetsGate) external;
function setSendAssetsGate(address newSendAssetsGate) external;
function setIsAdapter(address account, bool newIsAdapter) external;
function increaseTimelock(bytes4 selector, uint256 newDuration) external;
function abdicateSubmit(bytes4 selector) external;
function decreaseTimelock(bytes4 selector, uint256 newDuration) external;
function setPerformanceFee(uint256 newPerformanceFee) external;
function setManagementFee(uint256 newManagementFee) external;
function setPerformanceFeeRecipient(address newPerformanceFeeRecipient) external;
function setManagementFeeRecipient(address newManagementFeeRecipient) external;
function increaseAbsoluteCap(bytes memory idData, uint256 newAbsoluteCap) external;
function decreaseAbsoluteCap(bytes memory idData, uint256 newAbsoluteCap) external;
function increaseRelativeCap(bytes memory idData, uint256 newRelativeCap) external;
function decreaseRelativeCap(bytes memory idData, uint256 newRelativeCap) external;
function setMaxRate(uint256 newMaxRate) external;
function setForceDeallocatePenalty(address adapter, uint256 newForceDeallocatePenalty) external;

// Allocator functions
function allocate(address adapter, bytes memory data, uint256 assets) external;
function deallocate(address adapter, bytes memory data, uint256 assets) external;
function setLiquidityAdapterAndData(address newLiquidityAdapter, bytes memory newLiquidityData) external;

// Exchange rate
function accrueInterest() external;
function accrueInterestView()
external
view
returns (uint256 newTotalAssets, uint256 performanceFeeShares, uint256 managementFeeShares);

// Force deallocate
function forceDeallocate(address adapter, bytes memory data, uint256 assets, address onBehalf)
external
returns (uint256 penaltyShares);
}
Loading