# Getting method calls of an LP token

**URL:** <https://community.bitquery.io/t/getting-method-calls-of-an-lp-token/1069>\
**Category:** GraphQL API\
**Tags:** support, closed\
**Created:** [May 28, 2022, 8:23pm UTC](https://community.bitquery.io/t/getting-method-calls-of-an-lp-token/1069 "2022-05-28T20:23:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![evanct](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@evanct](https://community.bitquery.io/u/evanct)\
**Post date:** [May 28, 2022, 8:23pm UTC](https://community.bitquery.io/t/getting-method-calls-of-an-lp-token/1069/1 "2022-05-28T20:23:56Z")

</div>

I want to get method calls of an LP token:

> **[SushiSwap UMA/ETH LP (SLP) Token Tracker | Etherscan](https://etherscan.io/token/0x001b6450083e531a5a7bf310bd2c1af4247e23d4)**
>
> SushiSwap UMA/ETH LP (SLP) Token Tracker on Etherscan shows the price of the Token $191.5608, total supply 2,234.931403813418523666, number of holders 63 and updated information of the token. The token tracker page also shows the analytics and...

So I try:

```auto
{
  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:

> **[SushiSwap: UMA | Address 0x001b6450083e531a5a7bf310bd2c1af4247e23d4 | Etherscan](https://etherscan.io/address/0x001b6450083e531a5a7bf310bd2c1af4247e23d4)**
>
> The Contract Address 0x001b6450083e531a5a7bf310bd2c1af4247e23d4 page allows users to view the source code, transactions, balances, and analytics for the contract address. Users can also interact and make transactions to the contract directly on...

can I get the method calls of the token?

---

<div class="post-metadata">

**Author:** ![sayon-bitquery](https://sea2.discourse-cdn.com/flex016/user_avatar/community.bitquery.io/sayon-bitquery/32/522_2.png) [@sayon-bitquery](https://community.bitquery.io/u/sayon-bitquery)\
**Post date:** [May 30, 2022, 4:52am UTC](https://community.bitquery.io/t/getting-method-calls-of-an-lp-token/1069/2 "2022-05-30T04:52:12Z")

</div>

I guess this is the GraphQL query you were looking for

> **[SmartContract Method for LP Token](https://graphql.bitquery.io/ide/SmartContract-Method-for-LP-Token)**
>
> Bitquery is analytical engine for blockchains

---

<div class="post-metadata">

**Author:** ![evanct](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@evanct](https://community.bitquery.io/u/evanct)\
**Post date:** [May 30, 2022, 8:16pm UTC](https://community.bitquery.io/t/getting-method-calls-of-an-lp-token/1069/3 "2022-05-30T20:16:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![evanct](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@evanct](https://community.bitquery.io/u/evanct)\
**Post date:** [May 31, 2022, 10:49pm UTC](https://community.bitquery.io/t/getting-method-calls-of-an-lp-token/1069/4 "2022-05-31T22:49:28Z")

</div>

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

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

```

this works

---

<div class="post-metadata">

**Author:** ![gaurav](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@gaurav](https://community.bitquery.io/u/gaurav)\
**Post date:** [June 6, 2022, 10:41am UTC](https://community.bitquery.io/t/getting-method-calls-of-an-lp-token/1069/5 "2022-06-06T10:41:26Z")

</div>

Try this

```auto
{
  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

```auto
{
  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"})
    }
  }
}

```
