Skip to content

Commit f4c7fa9

Browse files
Merge pull request #685 from scaffold-eth/backmerge-main
Weekly CLI backmerge
2 parents f8f9e65 + 936a982 commit f4c7fa9

File tree

75 files changed

+795
-507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+795
-507
lines changed

.changeset/hip-vans-sing.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"create-eth": patch
3+
---
4+
5+
- App router migration (#535)
6+
- Update hardhat package plugins and add hardhat-verify (#637)
7+
- Update homepage file route and add Viem to README tech stack (#691)
8+
- Ethers v6 migration in hardhat (#692)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
🧪 An open-source, up-to-date toolkit for building decentralized applications (dapps) on the Ethereum blockchain. It's designed to make it easier for developers to create and deploy smart contracts and build user interfaces that interact with those contracts.
1212

13-
⚙️ Built using NextJS, RainbowKit, Hardhat, Foundry, Wagmi, and Typescript.
13+
⚙️ Built using NextJS, RainbowKit, Hardhat, Wagmi, Viem, and Typescript.
1414

1515
-**Contract Hot Reload**: Your frontend auto-adapts to your smart contract as you edit it.
1616
- 🪝 **[Custom hooks](https://docs.scaffoldeth.io/hooks/)**: Collection of React hooks wrapper around [wagmi](https://wagmi.sh/) to simplify interactions with smart contracts with typescript autocompletion.
@@ -24,7 +24,7 @@
2424

2525
Before you begin, you need to install the following tools:
2626

27-
- [Node (v18 LTS)](https://nodejs.org/en/download/)
27+
- [Node (>= v18.17)](https://nodejs.org/en/download/)
2828
- Yarn ([v1](https://classic.yarnpkg.com/en/docs/install/) or [v2+](https://yarnpkg.com/getting-started/install))
2929
- [Git](https://git-scm.com/downloads)
3030

templates/base/.github/workflows/lint.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [ubuntu-latest]
18-
node: [16.x]
18+
node: [lts/*]
1919

2020
steps:
2121
- name: Checkout
@@ -25,13 +25,13 @@ jobs:
2525
uses: actions/setup-node@v3
2626
with:
2727
node-version: ${{ matrix.node }}
28-
cache : yarn
28+
cache: yarn
2929

3030
- name: Install dependencies
3131
run: yarn install --immutable
3232

3333
- name: Run hardhat node, deploy contracts (& generate contracts typescript output)
34-
run: yarn chain & yarn deploy
34+
run: yarn chain & yarn deploy
3535

3636
- name: Run nextjs lint
3737
run: yarn next:lint --max-warnings=0

templates/base/.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn lint-staged --verbose
4+
yarn lint-staged --verbose

templates/base/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
🧪 An open-source, up-to-date toolkit for building decentralized applications (dapps) on the Ethereum blockchain. It's designed to make it easier for developers to create and deploy smart contracts and build user interfaces that interact with those contracts.
44

5-
⚙️ Built using NextJS, RainbowKit, Hardhat, Wagmi, and Typescript.
5+
⚙️ Built using NextJS, RainbowKit, Hardhat, Wagmi, Viem, and Typescript.
66

77
-**Contract Hot Reload**: Your frontend auto-adapts to your smart contract as you edit it.
88
- 🔥 **Burner Wallet & Local Faucet**: Quickly test your application with a burner wallet and local faucet.
@@ -114,6 +114,14 @@ You can verify your smart contract on Etherscan by running:
114114
yarn verify --network network_name
115115
```
116116

117+
eg: `yarn verify --network sepolia`
118+
119+
This uses [etherscan-verify from hardhat-deploy](https://www.npmjs.com/package/hardhat-deploy#4-hardhat-etherscan-verify) to verify all the deployed contracts.
120+
121+
You can alternatively use [hardhat-verify](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify) to verify your contracts, passing network name, contract address and constructor arguments (if any): `yarn hardhat-verify --network network_name contract_address "Constructor arg 1"`
122+
123+
If the chain you're using is not supported by any of the verifying methods, you can add new supported chains to your chosen method, either [etherscan-verify](https://www.npmjs.com/package/hardhat-deploy#options-2) or [hardhat-verify](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify#adding-support-for-other-networks).
124+
117125
## Deploying your NextJS App
118126

119127
**Hint**: We recommend connecting your GitHub repo to Vercel (through the Vercel UI) so it gets automatically deployed when pushing to `main`.

templates/base/packages/nextjs/components/blockexplorer/AddressCodeTab.tsx renamed to templates/base/packages/nextjs/app/blockexplorer/_components/AddressCodeTab.tsx

File renamed without changes.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { BackButton } from "./BackButton";
2+
import { ContractTabs } from "./ContractTabs";
3+
import { Address, Balance } from "~~/components/scaffold-eth";
4+
5+
export const AddressComponent = ({
6+
address,
7+
contractData,
8+
}: {
9+
address: string;
10+
contractData: { bytecode: string; assembly: string } | null;
11+
}) => {
12+
return (
13+
<div className="m-10 mb-20">
14+
<div className="flex justify-start mb-5">
15+
<BackButton />
16+
</div>
17+
<div className="col-span-5 grid grid-cols-1 lg:grid-cols-2 gap-8 lg:gap-10">
18+
<div className="col-span-1 flex flex-col">
19+
<div className="bg-base-100 border-base-300 border shadow-md shadow-secondary rounded-3xl px-6 lg:px-8 mb-6 space-y-1 py-4 overflow-x-auto">
20+
<div className="flex">
21+
<div className="flex flex-col gap-1">
22+
<Address address={address} format="long" />
23+
<div className="flex gap-1 items-center">
24+
<span className="font-bold text-sm">Balance:</span>
25+
<Balance address={address} className="text" />
26+
</div>
27+
</div>
28+
</div>
29+
</div>
30+
</div>
31+
</div>
32+
<ContractTabs address={address} contractData={contractData} />
33+
</div>
34+
);
35+
};

templates/base/packages/nextjs/components/blockexplorer/AddressLogsTab.tsx renamed to templates/base/packages/nextjs/app/blockexplorer/_components/AddressLogsTab.tsx

File renamed without changes.

templates/base/packages/nextjs/components/blockexplorer/AddressStorageTab.tsx renamed to templates/base/packages/nextjs/app/blockexplorer/_components/AddressStorageTab.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useEffect, useState } from "react";
24
import { Address, createPublicClient, http, toHex } from "viem";
35
import { hardhat } from "viem/chains";
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"use client";
2+
3+
import { useRouter } from "next/navigation";
4+
5+
export const BackButton = () => {
6+
const router = useRouter();
7+
return (
8+
<button className="btn btn-sm btn-primary" onClick={() => router.back()}>
9+
Back
10+
</button>
11+
);
12+
};

0 commit comments

Comments
 (0)