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";
|
|
|
|
|
2021-10-31 05:38:41 +00:00
|
|
|
export interface IAddressResolver<T> {
|
2021-10-31 00:06:11 +00:00
|
|
|
resolveAddress(
|
|
|
|
provider: BaseProvider,
|
|
|
|
address: string
|
2021-10-31 05:38:41 +00:00
|
|
|
): Promise<T | undefined>;
|
2021-10-31 00:06:11 +00:00
|
|
|
}
|
2021-10-31 08:10:42 +00:00
|
|
|
|
2021-10-31 22:51:11 +00:00
|
|
|
export type ResolvedAddressRenderer<T> = (
|
2022-02-25 18:56:08 +00:00
|
|
|
chainId: number,
|
2021-10-31 08:10:42 +00:00
|
|
|
address: string,
|
2021-10-31 22:51:11 +00:00
|
|
|
resolvedAddress: T,
|
2021-10-31 08:10:42 +00:00
|
|
|
linkable: boolean,
|
|
|
|
dontOverrideColors: boolean
|
|
|
|
) => React.ReactElement;
|