import "cross-fetch/polyfill"; export declare type Pool = { address: string; baseAddress: string; baseSymbol: string; quoteAddress: string; quoteSymbol: string; }; export declare type Pools = Pool[]; export declare type RawPools = Pool[]; export declare type Collateral = { address: string; decimals: number; symbol: string; name: string; priceFeedAddress: string; }; export interface ChainMetadata { chainId: number; contracts: { [PriceFeed: string]: { address: string; createdBlockNumber: number; name: string; }; }; externalContracts: { DefaultProxyAdmin: string; USDC: string; UniswapV3Factory: string; }; network: "optimism" | "optimism-goerli"; pools: Pool[]; collaterals: Collateral[]; } export declare type Contracts = ChainMetadata["contracts"]; export declare type ExternalContracts = ChainMetadata["externalContracts"]; export declare class Metadata { readonly contracts: Contracts; readonly externalContracts: ExternalContracts; readonly pools: Pools; readonly rawPools: RawPools; readonly collaterals: Collateral[]; private constructor(); static create(chainId: number): Promise; private static _fetch; findCollateralByAddress(address: string): Collateral | undefined; /** * 1. Make addresses lower case * 2. Remove "v" from symbols (vETH -> ETH) * @param rawPools raw pools from metadata * @returns normalized pools */ private _normalizePools; }