diff --git a/.gitignore b/.gitignore index af113b1..87eb238 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,6 @@ node_modules .openzeppelin -/src/types \ No newline at end of file +/src/types + +output \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index e7fe6e4..bac8afa 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -26,7 +26,7 @@ if (!process.env.CI) { hardhat: { allowUnlimitedContractSize: false, }, - mumbai: { + amoy: { url: RPC, accounts: [account], }, diff --git a/utils/file.ts b/utils/file.ts index ada7d9a..9f497b5 100644 --- a/utils/file.ts +++ b/utils/file.ts @@ -4,12 +4,12 @@ import path from "path" // Import the 'path' module export type Addresses = { proxy?: string latestVersion?: string - admin?:string + admin?: string } +const filePath = path.join(__dirname, "..", "output", "addresses.json") export function loadAddresses(): Addresses { let output: Addresses = {} - const filePath = path.join(__dirname, "output", "addresses.json") if (fs.existsSync(filePath)) { output = JSON.parse(fs.readFileSync(filePath, "utf8")) } else { @@ -21,7 +21,6 @@ export function loadAddresses(): Addresses { } export function saveAddresses(content: Addresses): void { - const filePath = path.join(__dirname, "output", "addresses.json") if (!fs.existsSync(filePath)) { const outputDir = path.join(__dirname, "output") if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir)