otterscan/src/api/address-resolver/address-resolver.ts
2022-02-25 15:56:08 -03:00

18 lines
401 B
TypeScript

import React from "react";
import { BaseProvider } from "@ethersproject/providers";
export interface IAddressResolver<T> {
resolveAddress(
provider: BaseProvider,
address: string
): Promise<T | undefined>;
}
export type ResolvedAddressRenderer<T> = (
chainId: number,
address: string,
resolvedAddress: T,
linkable: boolean,
dontOverrideColors: boolean
) => React.ReactElement;