feat(tests): MIP-4 and reserve balance tests#18
Merged
QEDK merged 3 commits intoforks/monad_ninefrom Mar 20, 2026
Merged
Conversation
Co-Authored-By: Claude
…recompile Co-Authored-By: Claude
Greptile SummaryThis PR fills two testing gaps for Monad's execution specs: (1) direct-transaction ( Key changes:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[tx to precompile] --> B{DELEGATE_TO_PRECOMPILE?}
B -- Yes --> C[to = delegated EOA, priority-1 check]
B -- No --> D[to = RESERVE_BALANCE_PRECOMPILE]
C --> E[Derive gas_limit / calldata / value from scenarios]
D --> E
E --> F[sender funded: gas_limit x gas_price + value]
F --> G[Execute tx - Monad charges full gas_limit]
G --> H{Any scenario fails?}
H -- Yes --> I[status=0, value not transferred, sender balance = value]
H -- No, SUCCESS only --> J[status=1, value transferred, sender balance = value]
I --> K[post: sender Account with balance=value]
J --> K
subgraph test_credit_with_value
L[initial_balance = RESERVE_BALANCE + send_value + prepare_tx_fee] --> M[blocks 0-2: setup txs + optional credit]
M --> N[balance at test tx = RESERVE_BALANCE + credit_value]
N --> O{credit_value less than 1?}
O -- Yes, violation=True --> P{is_exception? not pre_delegated AND send outside k=3 window}
P -- Yes --> Q[tx succeeds]
P -- No --> R[tx reverts]
O -- No, violation=False --> Q
end
Last reviewed commit: "feat(tests): test_cr..." |
Co-Authored-By: Claude claude-opus-4-6
Collaborator
Author
|
@greptileai re review |
mijovic
approved these changes
Mar 20, 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.
A couple of gaps filled:
tx.to, with various reasons to fail, similar to how calling from EVM is tested