Getting method calls of an LP token

I want to get method calls of an LP token:

So I try:

{
  ethereum {
    smartContractCalls(
      smartContractAddress: {is: "0x001b6450083e531a5a7bf310bd2c1af4247e23d4"}
    ) {
      date {
        date
      }
      transaction {
        hash
      }
      smartContractMethod {
        name
      }
    }
  }
}

The problem is, this only gets the method calls for the associated pool contract, not the LP token:

can I get the method calls of the token?

I guess this is the GraphQL query you were looking for

No, that doesn’t solve my problem at all.

I just wanted to get the AddLiquidity calls, so I figured out I can instead just search for “Mint” Smart Contract Events instead:

query MyQuery {
  ethereum {
    smartContractEvents(
      smartContractAddress: {is: "0x001b6450083e531a5a7bf310bd2c1af4247e23d4"}
      smartContractEvent: {is: "Mint"}
      options: {limit: 10}
    ) {
      date {
        date
      }
      transaction {
        hash
      }
      arguments {
        argument
        value
      }
    }
  }
}

this works

1 Like

Try this

{
  ethereum(network: ethereum) {
    arguments(
      options: {desc: ["block.height","index"], limit: 10}
      smartContractAddress: {in: "0x680a025da7b1be2c204d7745e809919bce074026", }
      smartContractEvent: {is: "Mint"}
    ) {
      block {
        height
        timestamp{
          time(format:"%Y-%m-%d %H:%M:%S")
        }
      }
      transaction{
        hash
      }
      index
      sender: any(of: argument_value, argument: {is: "sender"})
      amount0: any(of: argument_value, argument: {is: "amount0"})
      amount1: any(of: argument_value, argument: {is: "amount1"})
    }
  }
}

To get to know what amount is belong to which token use this

{
  ethereum(network: ethereum) {
    arguments(
      options: {desc: ["block.height","index"], limit: 10}
      smartContractAddress: {in: "0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f", }
      smartContractMethod: {is: "createPair"}
      external:true
    ) {
      block {
        height
        timestamp{
          time(format:"%Y-%m-%d %H:%M:%S")
        }
      }
      index
      tokenA: any(of: argument_value, argument: {is: "tokenA"})
      tokenB: any(of: argument_value, argument: {is: "tokenB"})
    }
  }
}
1 Like