Function getPool

  • Get pool information by chain id and token addresses

    Parameters

    • __namedParameters: {
          chainId: CHAIN_IDS;
          token0: `0x${string}`;
          token1: `0x${string}`;
          salt: `0x${string}`;
          options?: {
              market?: Market;
              n?: number;
              useSubgraph?: boolean;
          } & DefaultOptions;
      }
      • chainId: CHAIN_IDS
      • token0: `0x${string}`
      • token1: `0x${string}`
      • salt: `0x${string}`
      • Optional options?: {
            market?: Market;
            n?: number;
            useSubgraph?: boolean;
        } & DefaultOptions

    Returns Promise<Pool>

    A pool Pool

    Example

    import { getPool } from '@clober/v2-sdk'

    const market = await getPool({
    chainId: 421614,
    token0: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
    token1: '0x0000000000000000000000000000000000000000',
    salt: '0x0000000000000000000000000000000000000000000000000000000000000000',
    })