forked from ceptor-club/blockmagic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChainLink.ts
41 lines (34 loc) · 1.03 KB
/
ChainLink.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { HardhatUserConfig, HttpNetworkUserConfig, NetworksUserConfig, NetworkUserConfig } from "hardhat/types";
export interface ChainLinkContractsConfig {
token: string;
}
export interface ChainLinkFunctionsConfig {
donId: { onChain: string; offChain: string };
router: string;
secretsUploadEndpoints: string[];
}
interface PriceFeed {
pair: string;
address: string;
}
export interface DataFeedConfig {
price: {
native: PriceFeed;
[key: string]: PriceFeed;
};
}
export type ChainLinkNetworkUserConfig = HttpNetworkUserConfig & {
contracts: ChainLinkContractsConfig;
functions: ChainLinkFunctionsConfig;
feeds: DataFeedConfig;
};
export type ChainLinkNetworksUserConfig = Pick<NetworksUserConfig, "hardhat"> & {
[networkName: string]: NetworkUserConfig | ChainLinkNetworkUserConfig;
};
export type ChainLinkUserConfig = Omit<HardhatUserConfig, "networks"> & {
networks?: ChainLinkNetworksUserConfig;
};
export interface DONSecret {
ttl: number; // time to live in minutes
secrets: Record<string, string>;
}