fix(multicall): resolve critical multicall parsing corruption issues

- Added comprehensive bounds checking to prevent buffer overruns in multicall parsing
- Implemented graduated validation system (Strict/Moderate/Permissive) to reduce false positives
- Added LRU caching system for address validation with 10-minute TTL
- Enhanced ABI decoder with missing Universal Router and Arbitrum-specific DEX signatures
- Fixed duplicate function declarations and import conflicts across multiple files
- Added error recovery mechanisms with multiple fallback strategies
- Updated tests to handle new validation behavior for suspicious addresses
- Fixed parser test expectations for improved validation system
- Applied gofmt formatting fixes to ensure code style compliance
- Fixed mutex copying issues in monitoring package by introducing MetricsSnapshot
- Resolved critical security vulnerabilities in heuristic address extraction
- Progress: Updated TODO audit from 10% to 35% complete

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Krypto Kajun
2025-10-17 00:12:55 -05:00
parent f358f49aa9
commit 850223a953
8621 changed files with 79808 additions and 7340 deletions

View File

@@ -0,0 +1,12 @@
{
"block_number": "",
"contract_name": "TraderJoeRouter",
"from": "0x3855808a7f42dbaebacf07291e0ae0a7ed692ecb",
"function": "multicall",
"function_sig": "0xac9650d8",
"hash": "0xaf6228fcef1fa34dafd4e8d6e359b845e052a1a6597c88c1c2c94045c6140f9f",
"input_data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000447d39aaf100000000000000000000000031ef83a530fde1b38ee9a18093a333d8bbbc40d50000000000000000000000000000000000000000000000000002d407c9f880c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000344f59c48eb0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000098d7803aea152ff1009f000000000000000000000000000000000000000000000000000000000000000012f0569e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000031a27787e450000000000000000000000000000000000000000000000000002d407c9f880c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000003855808a7f42dbaebacf07291e0ae0a7ed692ecb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff00000000000000000000000000000000000001000000000000000000000000de967676db7b1ccdba2bd94b01b5b19de4b563e4000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e583100000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"protocol": "Multicall",
"to": "0x87d66368cd08a7ca42252f5ab44b2fb6d1fb8d15",
"value": "796079871787200"
}

View File

@@ -0,0 +1,12 @@
{
"block_number": "",
"contract_name": "UniswapV2Router02",
"from": "0xba7a224852693f9a1695334105c2e63159eb2311",
"function": "swapExactTokensForTokens",
"function_sig": "0x38ed1739",
"hash": "0xee2af12f5e40c87e7452f70ef439bcf22663a726cc1bdf9f0def2e0f33f72320",
"input_data": "0x38ed17390000000000000000000000000000000000000000000000053220a269ab55c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000ba7a224852693f9a1695334105c2e63159eb23110000000000000000000000000000000000000000000000000000000068ed12b5000000000000000000000000000000000000000000000000000000000000000200000000000000000000000003f6921f6e948016631ce796331294d5a863a9ee000000000000000000000000dcc9691793633176acf5cfdc1a658cb3b982e2fb",
"protocol": "UniswapV2",
"to": "0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",
"value": "0"
}

View File

@@ -0,0 +1,12 @@
{
"block_number": "",
"contract_name": "UniswapV3PositionManager",
"from": "0xe5e58921dfa6602792e3f5624e91d291c01dc135",
"function": "decreaseLiquidity",
"function_sig": "0x0c49ccbe",
"hash": "0x5992966aa1cc733367aa0a00e2b3098b6d0d6b88835affbc43e02e1101ac4b8b",
"input_data": "0x0c49ccbe00000000000000000000000000000000000000000000000000000000004c1f2c00000000000000000000000000000000000000000000000000000001e20e0177000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000068ed105b",
"protocol": "UniswapV3",
"to": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
"value": "0"
}

View File

@@ -0,0 +1,12 @@
{
"block_number": "",
"contract_name": "UniswapV3Router",
"from": "0x196beae17c9577256a4c20d72a3c01cae5d00e9e",
"function": "exactInputSingle",
"function_sig": "0x414bf389",
"hash": "0xd39c510f44355cca3b7ee947b9697ef95df8921c8a90b3639572382092afe90c",
"input_data": "0x414bf38900000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1000000000000000000000000440017a1b021006d556d7fc06a54c32e42eb745b0000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000196beae17c9577256a4c20d72a3c01cae5d00e9e0000000000000000000000000000000000000000000000000000000068ed0e0e0000000000000000000000000000000000000000000000000024a689f2b2e3f0000000000000000000000000000000000000000000000011470476b682d78b380000000000000000000000000000000000000000000000000000000000000000",
"protocol": "UniswapV3",
"to": "0xe592427a0aece92de3edee1f18e0157c05861564",
"value": "0"
}

View File

@@ -0,0 +1,12 @@
{
"block_number": "",
"contract_name": "UniswapV3Router",
"from": "0x8cc6ab9ac1d1b7c5f6fc33f767aded9a305744e3",
"function": "exactOutputSingle",
"function_sig": "0xdb3e2198",
"hash": "0x69bad4eca82a4e139aad810777dc72faf5414e338b0a1b648e8472cd4904f93e",
"input_data": "0xdb3e2198000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc8000000000000000000000000912ce59144191c1204e64559fe8253a0e49e654800000000000000000000000000000000000000000000000000000000000001f40000000000000000000000008cc6ab9ac1d1b7c5f6fc33f767aded9a305744e30000000000000000000000000000000000000000000000000000000068ed0bbd00000000000000000000000000000000000000000000001b1ae4d6e2ef500000000000000000000000000000000000000000000000000000000000000a482cf40000000000000000000000000000000000000000000000000000000000000000",
"protocol": "UniswapV3",
"to": "0xe592427a0aece92de3edee1f18e0157c05861564",
"value": "0"
}