otterscan/src/api/address-resolver/address-resolver.ts

17 lines
384 B
TypeScript
Raw Normal View History

2021-10-31 08:10:42 +00:00
import React from "react";
2021-10-31 00:06:11 +00:00
import { BaseProvider } from "@ethersproject/providers";
export interface IAddressResolver<T> {
2021-10-31 00:06:11 +00:00
resolveAddress(
provider: BaseProvider,
address: string
): Promise<T | undefined>;
2021-10-31 00:06:11 +00:00
}
2021-10-31 08:10:42 +00:00
export type ResolvedAddressRenderer = (
address: string,
resolvedAddress: string,
linkable: boolean,
dontOverrideColors: boolean
) => React.ReactElement;