Skip to content

Lesson 10 Update front-end; my UpdateAbi and UpdateAddresses functions #6527

Discussion options

You must be logged in to vote

Anyone using ethers v6, looking for working syntax can use this: had to use a longer path because it kept saying the path did not exist.

const fs = require("fs");
require("dotenv").config();
const {
  developmentChains,
  networkConfig,
} = require("../helper-hardhat-config.js");

const FRONT_END_ADDRESSES_FILE =
  "/Users/kvngeko/Desktop/Cyfrin/Hardhat/hh-smartcontract-lottery/nexjs-smartcontract-lottery/constants/contractAddresses.json";
const FRONT_END_ABI_FILE = "/Users/kvngeko/Desktop/Cyfrin/Hardhat/hh-smartcontract-lottery/nexjs-smartcontract-lottery/constants/abi.json";

module.exports = async function () {
  if (process.env.UPDATE_FRONT_END) {
     updateContractAddresses();
     …

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@AyodejiKomolafe
Comment options

@Nlferu
Comment options

@Nlferu
Comment options

@AyodejiKomolafe
Comment options

@Nlferu
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by AyodejiKomolafe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants