fragment TransactionToken on Token {
  id
  address
  symbol
  chain
  decimals
  project {
    id
    name
    tokens {
      id
      address
      symbol
      chain
    }
    logo {
      id
      url
    }
  }
}

fragment PoolTx on PoolTransaction {
  id
  chain
  protocolVersion
  timestamp
  hash
  account
  token0 {
    ...TransactionToken
  }
  token0Quantity
  token1 {
    ...TransactionToken
  }
  token1Quantity
  usdValue {
    id
    value
  }
  type
}


query V4Transactions($chain: Chain!, $first: Int!, $cursor: Int) {
  v4Transactions(chain: $chain, first: $first, timestampCursor: $cursor) { ...PoolTx }
}

query V3Transactions($chain: Chain!, $first: Int!, $cursor: Int) {
  v3Transactions(chain: $chain, first: $first, timestampCursor: $cursor) { ...PoolTx }
}

query V2Transactions($chain: Chain!, $first: Int!, $cursor: Int) {
  v2Transactions(chain: $chain, first: $first, timestampCursor: $cursor) { ...PoolTx }
}
