Get token amounts and symbols in add_liquidity transaction?

For a given pool address I want to get all of the add_liquidity method calls, with the token amounts of each liquidity addition.

{
  ethereum {
    smartContractCalls(
      date: {since: "2022-05-15"}
      options: {limit: 10}
      smartContractAddress: {is: "0x5D0F47B32fDd343BfA74cE221808e2abE4A53827"}
      smartContractMethod: {is: "029b2f34"}
    ) {
      date {
        date
      }
      address: caller {
        address
      }
      arguments {
        argument
        value
      }
    }
  }
}

The problem is the “amounts” arguments to the add_liquidity method are just raw integers, there’s no data about which tokens they are or their decimal places.

{
        "date": {
          "date": "2022-05-17"
        },
        "address": {
          "address": "0x6cf9aa65ebad7028536e353393630e2340ca6049"
        },
        "arguments": [
          {
            "argument": "amounts",
            "value": "695538230"
          },
          {
            "argument": "amounts",
            "value": "0"
          },
          {
            "argument": "amounts",
            "value": "44748969"
          },
          {
            "argument": "amounts",
            "value": "0"
          },
          {
            "argument": "min_mint_amount",
            "value": "366376403811352844560"
          }
        ]
      },

Is there a way to get the token data associated with each amount value? I’d like to avoid having to query the transfers on each individual transaction.

The best way is to get through Event APIs.

Like this Latest Pair Created on Pancake Swap

The contract you mentioned has AddLiquidity event

However I think we don’t have ABI for this, we have asked the team to update the ABI, So we can index it properly. If you find the ABI let me know.

I found out you can get the tokens in a pool by looking at the constructor arguments:

(scroll to the bottom)

does bitquery have a way to get the constructor arguments ?