You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(morpho-sdk): add native wrapping to blueRepay
Allow funding part or all of a Blue repay's transferAmount by wrapping
native into wNative via GeneralAdapter1, mirroring blueSupply /
blueSupplyCollateral. Adds the optional nativeAmount arg, the
BlueRepayAction.nativeAmount field, and the exported
NativeAmountExceedsTransferAmountError.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add native-wrapping support to `blueRepay`. The action now accepts an optional `args.nativeAmount` that funds part or all of `transferAmount` by wrapping native into wNative via `GeneralAdapter1.wrapNative()` (the remainder is pulled via the ERC-20 path), mirroring the native-wrapping flow already available on `blueSupply` / `blueSupplyCollateral`. Requires the market's loan token to be the chain's wNative. The new `BlueRepayAction.args.nativeAmount` field and the `NativeAmountExceedsTransferAmountError` class are exported as public API.
Copy file name to clipboardExpand all lines: packages/morpho-sdk/AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Transaction builders for VaultV1, VaultV2, and Blue. Subfolders carry the layer-
7
7
## Routing summary
8
8
9
9
-**VaultV1 / VaultV2 deposits** route through bundler3 via GeneralAdapter1 (which enforces `maxSharePrice`, protecting against inflation attacks). VaultV1/V2 `withdraw` and `redeem` are direct vault calls. VaultV2 `forceWithdraw` / `forceRedeem` use `multicall` with `forceDeallocate` calls before the final withdraw/redeem.
10
-
-**Blue bundled paths** (`supply`, `supplyCollateral`, `borrow`, `supplyCollateralBorrow`, `repay`, `repayWithdrawCollateral`, `withdraw`) route through bundler3 via GeneralAdapter1. `repay` and `withdraw` each accept assets or shares (mutually exclusive); `repayWithdrawCollateral` repays first then withdraws. Loan-asset `supply`supports native wrapping when `loanToken === wNative`; loan-asset `withdraw` supports optional PublicAllocator reallocations to top up market liquidity (same mechanism as `borrow`).
10
+
-**Blue bundled paths** (`supply`, `supplyCollateral`, `borrow`, `supplyCollateralBorrow`, `repay`, `repayWithdrawCollateral`, `withdraw`) route through bundler3 via GeneralAdapter1. `repay` and `withdraw` each accept assets or shares (mutually exclusive); `repayWithdrawCollateral` repays first then withdraws. Loan-asset `supply`and `repay` support native wrapping when `loanToken === wNative` (for `repay`, `nativeAmount` funds part or all of `transferAmount`); loan-asset `withdraw` supports optional PublicAllocator reallocations to top up market liquidity (same mechanism as `borrow`).
11
11
-**Bundle composition, native wrapping, and reallocation rules** are canonical in [`src/actions/AGENTS.md`](./src/actions/AGENTS.md).
0 commit comments