feat(morpho-sdk): add Midnight action flows#815
Draft
Rubilmax wants to merge 32 commits into
Draft
Conversation
25013e7 to
1870b00
Compare
05288a6 to
e29dfc1
Compare
1870b00 to
3e850f2
Compare
ef6d795 to
e070f41
Compare
3e850f2 to
9adf550
Compare
dad9be6 to
3350d27
Compare
Rubilmax
commented
Jun 24, 2026
| params: MidnightBorrowMarketParams, | ||
| ): Readonly<Transaction<MidnightBorrowMarketAction>> => { | ||
| if (params.collateralAssets < 0n) { | ||
| throw new NegativeMidnightAmountError( |
Contributor
Author
There was a problem hiding this comment.
Blue actions use blue-specific errors with blue-specific Market for example. Why? tbd with @Foulks-Plb
c7a3132 to
ea10f38
Compare
Rubilmax
commented
Jun 24, 2026
6605a9a to
c024ee5
Compare
6e6c682 to
4ebc78e
Compare
9301f31 to
ef3d406
Compare
2 tasks
c80482c to
d9f0f44
Compare
Rubilmax
commented
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the concrete
morpho-sdkMidnight action-flow implementation on top of the prerequisite SDK split in #829.This PR now contains only:
client.morpho.midnight(chainId)entity wiringMorphoMidnightaction outputs for Midnight flowsactions/midnighttransaction builders and focused unit testsThe shared SDK prerequisites, Blue requirement-helper refactors, Midnight SDK package changes, and
midnight-apire-export path are isolated in #829. The TIB remains isolated in #769.Stack
Validation
pnpm --filter @morpho-org/morpho-sdk buildpnpm --filter @morpho-org/morpho-sdk test -- packages/morpho-sdk/src/actions/midnight packages/morpho-sdk/src/entities/midnightwas attempted, but the morpho-sdk Vitest project still loads fork-backed suites that requireMAINNET_RPC_URL; 364 tests passed before env-gated suites failed during setup.