openchainxyz/openchain-monorepo

Recursive parsing of transaction data

Opened this issue · 0 comments

In some cases, the data of the transaction may contain more than just one transaction, such as:

0x252dba42000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000dda7e340286cc621bb326ac202fcf3fa6c7a870900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000284656f3d64000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000014000000000000000000000000099d8a9c45b2eca8864373a26d1459e3dff1e17f300000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006423b872dd0000000000000000000000003c1cb7d4c0ce0dc72edc7ea06acc866e62a8f1d8000000000000000000000000dd83ff7c87220f954a3273de1eac6c8c08e3b4ed0000000000000000000000000000000000000000000000069543042e3ed294b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

We can use ABI Tools to decode this data, we get function aggregate((address, bytes)[]). It’s a multicall contract and first parameter is 'to address', second is call bytecodes but we can't immediately recognize what the specific methods and parameters are.
If the ABI tool can implement recursive parsing of input data, I think this will help us parse the transaction data better.
I hope you can adopt my suggestion, thanks.