Skip to content

Commit

Permalink
Adapt docs to App Router update and add Foundry use case to verify se…
Browse files Browse the repository at this point in the history
…ction (#56)
  • Loading branch information
Pabl0cks authored Jan 21, 2024
1 parent 0e51e14 commit 17ca939
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions docs/deploying/deploy-smart-contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ yarn verify --network network_name

eg: `yarn verify --network sepolia`

This uses [etherscan-verify from hardhat-deploy](https://www.npmjs.com/package/hardhat-deploy#4-hardhat-etherscan-verify) to verify all the deployed contracts.
This command **works in both Hardhat and Foundry**, verifying all the deployed contracts. However, the verification method differs depending on the Solidity framework you're using:

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"`
- Hardhat => uses [etherscan-verify from hardhat-deploy](https://www.npmjs.com/package/hardhat-deploy#4-hardhat-etherscan-verify).
- Foundry => uses `VerifyAll.s.sol` script located in `packages/foundry/script`.

Additionally, **in Hardhat**, there's an alternative method for contract verification. You can use [hardhat-verify](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify) to verify your contracts, passing in the network name, contract address and constructor arguments (if any): `yarn hardhat-verify --network network_name contract_address "Constructor arg 1"`

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).

Expand Down
2 changes: 1 addition & 1 deletion docs/quick-start/environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Visit your app on `http://localhost:3000`. You can interact with your smart cont
- Edit your deployment scripts:
- Hardhat => `packages/hardhat/deploy`
- Foundry => `packages/foundry/script`
- Edit your frontend in `packages/nextjs/pages`
- Edit your frontend homepage at `packages/nextjs/app/page.tsx`. For guidance on [routing](https://nextjs.org/docs/app/building-your-application/routing/defining-routes) and configuring [pages/layouts](https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts) checkout the Next.js documentation.
- Edit the app config in `packages/nextjs/scaffold.config.ts`
- Edit your smart contract test in:
- Hardhat => `packages/hardhat/test` to run test use `yarn hardhat:test`
Expand Down
4 changes: 2 additions & 2 deletions docs/quick-start/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: Requirements and installation methods to get started with Scaffold

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

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

Expand Down Expand Up @@ -53,6 +53,6 @@ cd project-name
```

:::info Hint
If you choose Foundry as solidity framework in the CLI, you'll also need Foundryup installed on your machine.
If you choose Foundry as solidity framework in the CLI, you'll also need Foundryup installed on your machine.
Checkout: [getfoundry.sh](https://getfoundry.sh/)
:::info Hint

0 comments on commit 17ca939

Please sign in to comment.