-
Notifications
You must be signed in to change notification settings - Fork 0
/
helper-hardhat.config.ts
66 lines (57 loc) · 2.08 KB
/
helper-hardhat.config.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import tokenList, { SuperTokenInfo } from "@superfluid-finance/tokenlist";
import metaData from "@superfluid-finance/metadata";
import { MONTH_IN_SECONDS } from "./utils/time";
type Address = `0x${string}`;
type NetworkName = "hardhat" | "localhost" | "polygon" | "polygonMumbai";
const fUSDCx = tokenList.tokens.find(
(token) => token.symbol === "fUSDCx" && token.chainId === 80001
)!;
const polygonMumbai = metaData.getNetworkByChainId(80001)!;
export type NetworkConfig = {
name: NetworkName;
superTokens: SuperTokenInfo[];
hostAddress: Address;
cfaV1ForwarderAddress: Address;
recipients: Address[];
requiredFlowRates: bigint[];
tokenName: string;
tokenSymbol: string;
tokenURI: string;
};
const polygonMumbaiConfig: NetworkConfig = {
name: "polygonMumbai",
superTokens: [fUSDCx, fUSDCx],
hostAddress: polygonMumbai.contractsV1.host as Address,
cfaV1ForwarderAddress: polygonMumbai.contractsV1.cfaV1Forwarder as Address,
recipients: [
"0xdf3d1C11752B35A5a3d984cC86E5A535745412Fe",
"0xdf3d1C11752B35A5a3d984cC86E5A535745412Fe",
],
requiredFlowRates: [
BigInt(Math.floor(MONTH_IN_SECONDS / 30)),
2n * BigInt(Math.floor(MONTH_IN_SECONDS / 30)),
],
tokenName: "Superfluid Test Mumbai NFT",
tokenSymbol: "SFTF",
tokenURI:
"https://sfnft.superfluid.finance/v1/existential/getmeta?name=SuperfluidTest&description=descriptionasdadasd&chain=80001&ipfs=QmQT4U5XydPoMMijaTFYeZ7D1kxG5Str3McKFB9UN6D7Fc",
};
const hardhatConfig: NetworkConfig = {
...polygonMumbaiConfig,
name: "hardhat",
recipients: [
"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
],
tokenName: "Test NFT",
tokenSymbol: "TST",
tokenURI:
"https://sfnft.superfluid.finance/v1/existential/getmeta?name=SuperfluidTest&description=descriptionasdadasd&chain=31337&ipfs=QmQT4U5XydPoMMijaTFYeZ7D1kxG5Str3McKFB9UN6D7Fc",
};
const networks: Record<number, NetworkConfig> = {
// 137: polygonConfig,
80001: polygonMumbaiConfig,
31337: hardhatConfig,
};
export const developmentChains = ["hardhat", "localhost"];
export default networks;