I've subscribed to pending transactions of Uniswap V2 and V3 and am inspecting them, by decoding input
of the transactions. I'm getting data as follows:
//1
data: {
method: 'swapExactETHForTokens',
types: [ 'uint256', 'address[]', 'address', 'uint256' ],
inputs: [
BigNumber { _hex: '0x010c3ff3bae4bd84', _isBigNumber: true },
[
'C02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
'3a1311B8C404629E38f61D566cefEFed083B9670'
],
'463ceb903480827E1d4140aE1df007eA44DfAc10',
BigNumber { _hex: '0x6187bb69', _isBigNumber: true }
],
names: [ 'amountOutMin', 'path', 'to', 'deadline' ]
}
and
//2
data: {
method: 'swapExactTokensForTokens',
types: [ 'uint256', 'uint256', 'address[]', 'address', 'uint256' ],
inputs: [
BigNumber { _hex: '0x0b1a2bc2ec500000', _isBigNumber: true },
BigNumber { _hex: '0x2a967f2b8cb4b4c043', _isBigNumber: true },
[
'8B3192f5eEBD8579568A2Ed41E6FEB402f93f73F',
'C02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
'4da08a1Bff50BE96bdeD5C7019227164b49C2bFc'
],
'A07503510F3A09DA0513e1040F7869a52E2b052D',
BigNumber { _hex: '0x619cb502', _isBigNumber: true }
],
names: [ 'amountIn', 'amountOutMin', 'path', 'to', 'deadline' ]
}
There're also multicall
methods which I've not included.
Help me make sense of the (1) and (2) please. What I'm interested in is:
- what it's that's being swaped (ETH-token, or token-token)
- and the amounts of a deal/swap
Where the logs is those?
And in general, I'll also need:
- slippage
- fees
- the wallets of a deal
How to get yet these too? Via additional calls? How?