Query SC args for the latest event Swap

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

By Aleksey · saved 28 December 2020 · run 2 times · Bitquery API v1

What it returns

Filters

The query

query {
  ethereum(network: bsc) {
    arguments(
      options: {limitBy: {each: "sender" limit: 1} 
        desc: "block.height"}
      smartContractAddress: {is: "0x1b96b92314c44b159149f7e0303511fb2fc4774f"}
    	smartContractEvent: {is: "Swap"}
    ) {

      block{height}
      transaction {hash}
      
      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