Skip to content

Commit 94344d0

Browse files
authored
Merge pull request #120 from kristjanpeterson1/replace-rinkeby-with-goerli
Replace Rinkeby with Goerli everywhere, because Rinkeby is getting de…
2 parents a1eac60 + 418f4de commit 94344d0

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

backend/src/config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const extraMetadata = {
4545
// ** REQUIRED **
4646
const AUTH = process.env.NFTPORT_API_KEY; // Set this in the .env file to prevent exposing your API key when pushing to Github
4747
const LIMIT = 2; // Your API key rate limit
48-
const CHAIN = 'rinkeby'; // only rinkeby, polygon, or ethereum
48+
const CHAIN = 'goerli'; // only goerli, polygon, or ethereum
4949

5050
// REQUIRED CONTRACT DETAILS THAT CANNOT BE UPDATED LATER!
5151
const CONTRACT_NAME = 'CRYPTOPUNKS';
@@ -54,7 +54,7 @@ const METADATA_UPDATABLE = true; // set to false if you don't want to allow meta
5454
const OWNER_ADDRESS = 'YOUR WALLET ADDRESS HERE';
5555
const TREASURY_ADDRESS = 'YOUR WALLET ADDRESS HERE';
5656
const MAX_SUPPLY = 5000; // The maximum number of NFTs that can be minted. CANNOT BE UPDATED!
57-
const MINT_PRICE = 0.01; // Minting price per NFT. Rinkeby = ETH, Ethereum = ETH, Polygon = MATIC. CANNOT BE UPDATED!
57+
const MINT_PRICE = 0.01; // Minting price per NFT. Goerli = ETH, Ethereum = ETH, Polygon = MATIC. CANNOT BE UPDATED!
5858
const TOKENS_PER_MINT = 10; // maximum number of NFTs a user can mint in a single transaction. CANNOT BE UPDATED!
5959

6060
// REQUIRED CONTRACT DETAILS THAT CAN BE UPDATED LATER.

backend/utils/functions/refreshOpensea.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ if (!START || !END) {
1717
}
1818

1919
const COLLECTION_BASE_URL =
20-
CHAIN.toLowerCase() === "rinkeby"
21-
? `https://testnets.opensea.io/assets`
20+
CHAIN.toLowerCase() === "goerli"
21+
? `https://testnets.opensea.io/assets/goerli`
2222
: "https://opensea.io/assets/matic";
2323

2424
async function main() {

frontend/js/app.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ const updateConnectStatus = async () => {
102102

103103
async function checkChain() {
104104
let chainId = 0;
105-
if(chain === 'rinkeby') {
106-
chainId = 4;
105+
if(chain === 'goerli') {
106+
chainId = 5;
107107
} else if(chain === 'polygon') {
108108
chainId = 137;
109109
} else if(chain === 'ethereum') {
@@ -120,15 +120,15 @@ async function checkChain() {
120120
// This error code indicates that the chain has not been added to MetaMask.
121121
if (err.code === 4902) {
122122
try {
123-
if(chain === 'rinkeby') {
123+
if(chain === 'goerli') {
124124
await window.ethereum.request({
125125
method: 'wallet_addEthereumChain',
126126
params: [
127127
{
128-
chainName: 'Rinkeby Test Network',
128+
chainName: 'Goerli Test Network',
129129
chainId: web3.utils.toHex(chainId),
130130
nativeCurrency: { name: 'ETH', decimals: 18, symbol: 'ETH' },
131-
rpcUrls: ['https://rinkeby.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'],
131+
rpcUrls: ['https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'],
132132
},
133133
],
134134
});
@@ -223,7 +223,7 @@ async function loadInfo() {
223223
}, 1000);
224224

225225
let priceType = '';
226-
if(chain === 'rinkeby' || chain === 'ethereum') {
226+
if(chain === 'goerli' || chain === 'ethereum') {
227227
priceType = 'ETH';
228228
} else if (chain === 'polygon') {
229229
priceType = 'MATIC';
@@ -288,7 +288,7 @@ function setTotalPrice() {
288288
const totalPriceWei = BigInt(info.deploymentConfig.mintPrice) * BigInt(mintInputValue);
289289

290290
let priceType = '';
291-
if(chain === 'rinkeby' || chain === 'ethereum') {
291+
if(chain === 'goerli' || chain === 'ethereum') {
292292
priceType = 'ETH';
293293
} else if (chain === 'polygon') {
294294
priceType = 'MATIC';
@@ -317,8 +317,8 @@ async function mint() {
317317
.mint(amount)
318318
.send({ from: window.address, value: value.toString() });
319319
if(mintTransaction) {
320-
if(chain === 'rinkeby') {
321-
const url = `https://rinkeby.etherscan.io/tx/${mintTransaction.transactionHash}`;
320+
if(chain === 'goerli') {
321+
const url = `https://goerli.etherscan.io/tx/${mintTransaction.transactionHash}`;
322322
const mintedContainer = document.querySelector('.minted-container');
323323
const countdownContainer = document.querySelector('.countdown');
324324
const mintedTxnBtn = document.getElementById("mintedTxnBtn");
@@ -354,8 +354,8 @@ async function mint() {
354354
.presaleMint(amount, merkleJson)
355355
.send({ from: window.address, value: value.toString() });
356356
if(presaleMintTransaction) {
357-
if(chain === 'rinkeby') {
358-
const url = `https://rinkeby.etherscan.io/tx/${presaleMintTransaction.transactionHash}`;
357+
if(chain === 'goerli') {
358+
const url = `https://goerli.etherscan.io/tx/${presaleMintTransaction.transactionHash}`;
359359
const mintedContainer = document.querySelector('.minted-container');
360360
const countdownContainer = document.querySelector('.countdown');
361361
const mintedTxnBtn = document.getElementById("mintedTxnBtn");

frontend/js/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const contractAddress = "YOUR CONTRACT ADDRESS"; // Replace with your own contract address
2-
const chain = 'rinkeby'; // rinkeby, polygon, or ethereum
2+
const chain = 'goerli'; // goerli, polygon, or ethereum
33

44
const welcome_h1 = "Welcome to the CodeCats NFT Project!!";
55
const welcome_h2 = "Connect to MetaMask to Get Started";

0 commit comments

Comments
 (0)