Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4503 +/- ##
==========================================
- Coverage 32.79% 29.13% -3.66%
==========================================
Files 494 495 +1
Lines 58611 58648 +37
==========================================
- Hits 19223 17090 -2133
- Misses 36026 38457 +2431
+ Partials 3362 3101 -261 |
❌ 12 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
MishkaRogachev
left a comment
There was a problem hiding this comment.
A few questions and it's worth merging latest master
| } | ||
|
|
||
| /// @notice Makes a CALLCODE to the target address (requires inline assembly) | ||
| function callcodeTarget( |
There was a problem hiding this comment.
As far as i know, CALLCODE is considered deprecated, I'm not sure we need to support it
| // TestAddressFilterCallViaFilteredIntermediary verifies that when a non-filtered | ||
| // contract CALLs a filtered intermediary, the transaction is rejected even though | ||
| // the final target is not filtered. | ||
| func TestAddressFilterCallViaFilteredIntermediary(t *testing.T) { |
There was a problem hiding this comment.
This seem to be similar to existing TestAddressFilterCall scenario
| receive() external payable {} | ||
|
|
||
| /// @notice Send this contract's entire balance to the target address | ||
| function payTo(address payable target) external { |
There was a problem hiding this comment.
Shouldn't payTo be payable?
| Require(t, err) | ||
| } | ||
|
|
||
| func TestAddressFilterIndirectPayment(t *testing.T) { |
There was a problem hiding this comment.
This test seems very valuable, but it fails now. payTo should be payable — right now the intermediary reverts before the filtered address is ever reached. There could also be a deeper gap in the filter (value transfers to filtered EOAs via internal CALLs may not trigger TouchAddress), but probably worth merging latest master first to investigate
I initially wanted to add a single test for a contract that uses a contract as an intermediary before paying out to a censored address. I then asked Claude to find missing tests and it added several more.
Claude's output:
Here's a summary of everything implemented:
Changes
Solidity: contracts-local/src/mocks/AddressFilterTest.sol
Added 3 new functions:
Tests: system_tests/tx_address_filter_test.go
Added 5 new test functions:
only loads code from the target; the execution context stays in the caller. PushContract touches contract.Address() which is the caller, not the code source.
Includes a sanity check that a regular CALL to the same address IS still filtered.
→ clean-target should fail because entering the intermediary via CALL touches its address in PushContract.
Pre-computes the CREATE address from deployer nonce, filters it, then verifies deployment is rejected.
topic equals a specific address. Verifies: (a) transfer TO filtered address is normally rejected, (b) transfer FROM the bypass address TO filtered address
succeeds, (c) transfer FROM filtered address (non-bypass) is still rejected.