diff --git a/hardhat.config.js b/hardhat.config.js index 2e6d2b08..6469bfc5 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -1,6 +1,6 @@ require("@nomiclabs/hardhat-waffle"); const fs = require('fs'); -// const privateKey = fs.readFileSync(".secret").toString().trim() || "01234567890123456789"; + const privateKey = fs.readFileSync(".secret").toString().trim() || "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; // const infuraId = fs.readFileSync(".infuraid").toString().trim() || ""; module.exports = { @@ -9,11 +9,11 @@ module.exports = { hardhat: { chainId: 1337 }, - /* + mumbai: { // Infura - // url: `https://polygon-mumbai.infura.io/v3/${infuraId}` - url: "https://rpc-mumbai.matic.today", + url: `https://polygon-mumbai.g.alchemy.com/v2/GbJHjJ2xgjsA79CHDTViR5foi8ukcc7s`, + // url: "https://rpc-mumbai.matic.today", accounts: [privateKey] }, matic: { @@ -22,7 +22,7 @@ module.exports = { url: "https://rpc-mainnet.maticvigil.com", accounts: [privateKey] } - */ + }, solidity: { version: "0.8.4", diff --git a/pages/index.js b/pages/index.js index 9f3a8dbb..0c9a254c 100644 --- a/pages/index.js +++ b/pages/index.js @@ -17,7 +17,7 @@ export default function Home() { loadNFTs() }, []) async function loadNFTs() { - const provider = new ethers.providers.JsonRpcProvider() + const provider = new ethers.providers.JsonRpcProvider("https://8545-bronze-lemur-c9rjug4x.ws-eu18.gitpod.io/") const tokenContract = new ethers.Contract(nftaddress, NFT.abi, provider) const marketContract = new ethers.Contract(nftmarketaddress, Market.abi, provider) const data = await marketContract.fetchMarketItems() diff --git a/yarn.lock b/yarn.lock index a214f2e2..19c362a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5480,9 +5480,9 @@ ipfs-core-utils@^0.8.3: timeout-abort-controller "^1.1.1" uint8arrays "^2.1.3" -ipfs-http-client@^50.1.2: +ipfs-http-client@50.1.2: version "50.1.2" - resolved "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.2.tgz" + resolved "https://registry.yarnpkg.com/ipfs-http-client/-/ipfs-http-client-50.1.2.tgz#31b60f4bd301b2addbc6fd1288f5f973d57afc2a" integrity sha512-ZbJlED4wqwFXQFVB9FQDs20ygdq7O/zSq4AvO9KRAmkqUj2TsCWCteUz2fBMnGWLh2tExxeSl/rQbHbJptb8JQ== dependencies: abort-controller "^3.0.0"