Skip to content

Commit

Permalink
adding configs for PGN
Browse files Browse the repository at this point in the history
  • Loading branch information
codenamejason committed Jul 12, 2023
1 parent f454542 commit 66a00e6
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 5 deletions.
37 changes: 32 additions & 5 deletions packages/hardhat/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as dotenv from "dotenv";
dotenv.config();
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "hardhat-deploy";
import "@matterlabs/hardhat-zksync-solc";
import "@matterlabs/hardhat-zksync-verify";
import "@nomicfoundation/hardhat-toolbox";
import * as dotenv from "dotenv";
import "hardhat-deploy";
import { HardhatUserConfig } from "hardhat/config";
dotenv.config();

// If not set, it uses ours Alchemy's default API key.
// You can get your own at https://dashboard.alchemyapi.io
Expand Down Expand Up @@ -46,10 +46,18 @@ const config: HardhatUserConfig = {
url: `https://eth-mainnet.alchemyapi.io/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
mainnetPgn: {
url: "https://rpc.publicgoods.network",
accounts: [deployerPrivateKey],
},
sepolia: {
url: `https://eth-sepolia.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
sepoliaPgn: {
url: "https://sepolia.publicgoods.network",
accounts: [deployerPrivateKey],
},
goerli: {
url: `https://eth-goerli.alchemyapi.io/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
Expand Down Expand Up @@ -95,6 +103,25 @@ const config: HardhatUserConfig = {
etherscan: {
apiKey: `${etherscanApiKey}`,
},
// NOTE: it's not allowing this for some reason and needed to verify on blockscout. AFAIK.
// customChains: [
// {
// network: "mainnetPgn",
// chainId: 424,
// urls: {
// apiURL: "https://rpc.publicgoods.network",
// browserURL: "https://explorer.publicgoods.network/",
// },
// },
// {
// network: "sepoliaPgn",
// chainId: 58008,
// urls: {
// apiURL: "https://sepolia.publicgoods.network",
// browserURL: "https://explorer.sepolia.publicgoods.network/",
// },
// },
// ],
},
};

Expand Down
60 changes: 60 additions & 0 deletions packages/nextjs/scaffold.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,66 @@ export type ScaffoldConfig = {
walletAutoConnect: boolean;
};

//! NOTE: use this custom chain for deploying to publicgoods.network (PGN) mainnet
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const pgnChain: chains.Chain = {
name: "Public Goods Network",
id: 424,
network: "mainnetPgn",
nativeCurrency: {
name: "Public Goods Network Ether",
symbol: "ETH",
decimals: 18,
},
rpcUrls: {
default: {
http: ["https://rpc.publicgoods.network"],
webSocket: undefined,
},
public: {
http: ["https://rpc.publicgoods.network"],
webSocket: undefined,
},
},
blockExplorers: {
default: {
name: "Public Goods Network Explorer",
url: "https://explorer.publicgoods.network/",
},
},
testnet: false,
};

//! NOTE: use this custom chain for deploying to publicgoods.network (PGN) sepolia
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const pgnChainSepolia: chains.Chain = {
name: "Public Goods Network",
id: 424,
network: "mainnetPgn",
nativeCurrency: {
name: "Public Goods Network Ether",
symbol: "ETH",
decimals: 18,
},
rpcUrls: {
default: {
http: ["https://sepolia.publicgoods.network"],
webSocket: undefined,
},
public: {
http: ["https://sepolia.publicgoods.network"],
webSocket: undefined,
},
},
blockExplorers: {
default: {
name: "Public Goods Network Explorer",
url: "https://explorer.sepolia.publicgoods.network/",
},
},
testnet: true,
};

const scaffoldConfig = {
// The network where your DApp lives in
targetNetwork: chains.hardhat,
Expand Down

0 comments on commit 66a00e6

Please sign in to comment.