events for a given address

Returns the latest arguments on Ethereum and BNB Chain, where smart contract address is 0x1b96…774f, tx from is 0x95e6…aa7d and smart contract event is Swap: block height, transaction hash, tx from address and any of argument value.

By gaurav · saved 16 February 2022 · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    arguments(
      options: {limitBy: {each: "sender", limit: 1}, desc: "block.height"}
      smartContractAddress: {is: "0x1b96b92314c44b159149f7e0303511fb2fc4774f"}
      smartContractEvent: {is: "Swap"}
      txFrom: {is: "0x95e6aa5a4d83b08b023bd2310596f3a12da6aa7d"}
    ) {
      block {
        height
      }
      transaction {
        hash
        txFrom {
          address
        }
      }
      sender: any(of: argument_value, argument: {is: "sender"})
      to: any(of: argument_value, argument: {is: "to"})
      amount0In: any(of: argument_value, argument: {is: "amount0In"})
      amount0Out: any(of: argument_value, argument: {is: "amount0Out"})
      amount1In: any(of: argument_value, argument: {is: "amount1In"})
      amount1Out: any(of: argument_value, argument: {is: "amount1Out"})
    }
  }
}

Similar queries