SmartContract: Calling & Swap and any others

Returns the latest arguments on Ethereum, where smart contract address is 0xb4e1…c9dc, tx hash is 0x29ba…4a6f and smart contract event is Swap: block height, transaction hash, address address, annotation, currency address, currency name and any of argument value.

By howard.pen9 · saved 23 February 2021 · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    arguments(
      options: {limitBy: {each: "sender", limit: 1}, desc: "block.height"}
      smartContractAddress: {is: "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc"}
      smartContractEvent: {is: "Swap"}
      txHash: {is:"0x29ba1d290b684ed8f5010d8cc83667a7ff10b2fb9da15a147544e2458f7e4a6f"}
    ) {
      block {
        height
      }
      transaction {
        hash
      }
      smartContract{
        address{
         address
          annotation
        }
        currency{
          address
          name
        }
      }
      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