So I made program that listens for swap events and decode it and how would I get what is swapped eg usdt to ethereum or etherum to usdt, Here is output:
{
name: 'Swap',
events: [
{
name: 'sender',
type: 'address',
value: '0x10ed43c718714eb63d5aa57b78b54704e256024e'
},
{ name: 'amount0In', type: 'uint256', value: '0' },
{
name: 'amount1In',
type: 'uint256',
value: '1202473582518654197'
},
{
name: 'amount0Out',
type: 'uint256',
value: '777540000000000000000'
},
{ name: 'amount1Out', type: 'uint256', value: '0' },
{
name: 'to',
type: 'address',
value: '0x431731d312dffa688a37d81af8874a58776eacfd'
}
],
address: '0x3D2Bcc3Ec4f97b0d4209Fd947FC70F666F39D995'
}