Skip to content

Commit

Permalink
fixed more errors with .env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith committed Jul 13, 2024
1 parent 587f950 commit 4a97ef3
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 144 deletions.
4 changes: 4 additions & 0 deletions packages/hardhat/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import "hardhat-deploy";
import "hardhat-deploy-ethers";

const privateKey = process.env.PRIVATE_KEY || "";
const alchemyApiKey = process.env.ALCHEMY_API_KEY || "";
const polygonScanApiKey = process.env.POLYGONSCAN_API_KEY || "";

const config: HardhatUserConfig = {
// module.exports = {
Expand Down Expand Up @@ -44,6 +46,8 @@ const config: HardhatUserConfig = {
url: `https://polygon-amoy.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
// url: `https://rpc-amoy.polygon.technology/`,
accounts: [privateKey as string],
// accounts: [alchemyApiKey as string],
// accounts: [polygonScanApiKey as string],
gasPrice: "auto",
},
hardhat: {
Expand Down
13 changes: 0 additions & 13 deletions packages/nextjs/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
"use client";

import type { NextPage } from "next";
import { useAccount } from "wagmi";
import { ConnectedAddressBalance } from "~~/components/ConnectedAddressBalance";
import { NFT_Cards } from "~~/components/NFT_Cards";
import { Address } from "~~/components/scaffold-eth";

const Home: NextPage = () => {
const { address: connectedAddress } = useAccount();

return (
<>
<div className="flex items-center flex-col flex-grow pt-10">
{/* <div className="px-5">
<div className="flex justify-center items-center space-x-2">
<p className="my-2 font-medium">Connected Address:</p>
<Address address={connectedAddress} />
</div>
</div> */}

{/* <ConnectedAddressBalance /> */}
<NFT_Cards />
</div>
</>
Expand Down
20 changes: 0 additions & 20 deletions packages/nextjs/components/ConnectedAddressBalance.tsx

This file was deleted.

33 changes: 0 additions & 33 deletions packages/nextjs/components/WalletProvider.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions packages/nextjs/components/import_JSON.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions packages/nextjs/contracts/fetchContractData.js

This file was deleted.

24 changes: 0 additions & 24 deletions packages/nextjs/hooks/useApproval.ts

This file was deleted.

21 changes: 0 additions & 21 deletions packages/nextjs/hooks/useContracts.ts

This file was deleted.

5 changes: 4 additions & 1 deletion packages/nextjs/scaffold.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export type ScaffoldConfig = {
alchemyApiKey: string;
walletConnectProjectId: string;
onlyLocalBurnerWallet: boolean;
walletAutoConnect: boolean;
};

const scaffoldConfig = {
Expand All @@ -15,7 +16,7 @@ const scaffoldConfig = {

// The interval at which your front-end polls the RPC servers for new data
// it has no effect if you only target the local network (default is 4000)
pollingInterval: 30000,
pollingInterval: 4000,

// This is ours Alchemy's default API key.
// You can get your own at https://dashboard.alchemyapi.io
Expand All @@ -31,6 +32,8 @@ const scaffoldConfig = {

// Only show the Burner Wallet when running on hardhat network
onlyLocalBurnerWallet: true,

walletAutoConnect: true,
} as const satisfies ScaffoldConfig;

export default scaffoldConfig;

0 comments on commit 4a97ef3

Please sign in to comment.