Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P1: rename interfaces and fix verification #25

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tasks/verifyOffsetHelper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { task } from "hardhat/config";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import paths from "../utils/paths";
import { poolAddresses } from "../utils/addresses";
import { poolAddresses, routerAddresses } from "../utils/addresses";

task("verify:offsetHelper", "Verifies the OffsetHelper")
.addParam("address", "The OffsetHelper address")
Expand Down
28 changes: 20 additions & 8 deletions utils/addresses.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface IfcOneNetworkAddresses {
interface INetworkTokenAddresses {
BCT: string;
NCT: string;
mcUSD?: string;
Expand All @@ -8,14 +8,26 @@ interface IfcOneNetworkAddresses {
USDC?: string;
WMATIC?: string;
}
interface IfcAddresses {
celo: IfcOneNetworkAddresses;
alfajores: IfcOneNetworkAddresses;
polygon: IfcOneNetworkAddresses;
mumbai: IfcOneNetworkAddresses;
interface INetworkAddresses {
celo: INetworkTokenAddresses;
alfajores: INetworkTokenAddresses;
polygon: INetworkTokenAddresses;
mumbai: INetworkTokenAddresses;
}

const addresses: IfcAddresses = {
interface IPoolAddresses {
BCT: string;
NCT: string;
}

interface INetworkPoolAddresses {
celo: IPoolAddresses;
alfajores: IPoolAddresses;
polygon: IPoolAddresses;
mumbai: IPoolAddresses;
}

const addresses: INetworkAddresses = {
celo: {
BCT: "0x0CcB0071e8B8B716A2a5998aB4d97b83790873Fe",
NCT: "0x02De4766C272abc10Bc88c220D214A26960a7e92",
Expand Down Expand Up @@ -47,7 +59,7 @@ const addresses: IfcAddresses = {
},
};

export const poolAddresses: IfcNetworkPoolAddresses = {
export const poolAddresses: INetworkPoolAddresses = {
celo: {
BCT: "0x0CcB0071e8B8B716A2a5998aB4d97b83790873Fe",
NCT: "0x02De4766C272abc10Bc88c220D214A26960a7e92",
Expand Down
24 changes: 7 additions & 17 deletions utils/paths.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
interface IfcPoolAddresses {
BCT: string;
NCT: string;
}
interface IfcTokenAddresses {
interface ITokenPaths {
mcUSD?: string[];
cUSD?: string[];
CELO?: string[];
WETH?: string[];
USDC?: string[];
WMATIC?: string[];
}
interface IfcNetworkTokenAddresses {
celo: IfcTokenAddresses;
alfajores: IfcTokenAddresses;
polygon: IfcTokenAddresses;
mumbai: IfcTokenAddresses;
}
interface IfcNetworkPoolAddresses {
celo: IfcPoolAddresses;
alfajores: IfcPoolAddresses;
polygon: IfcPoolAddresses;
mumbai: IfcPoolAddresses;
interface INetworkTokenAddresses {
celo: ITokenPaths;
alfajores: ITokenPaths;
polygon: ITokenPaths;
mumbai: ITokenPaths;
}

const paths: IfcNetworkTokenAddresses = {
const paths: INetworkTokenAddresses = {
celo: {
mcUSD: ["0x918146359264c492bd6934071c6bd31c854edbc3"],
cUSD: [
Expand Down
Loading