Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit 94aed16

Browse files
committed
Docs: Deploy your smart contracts
1 parent 936d4c5 commit 94aed16

File tree

2 files changed

+9
-48
lines changed

2 files changed

+9
-48
lines changed

docs/components/IntergerInput.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Shows by default a small button to multiply input's value \* 10^18 to transform
1212
## Import
1313

1414
```tsx
15-
import { IntegerInput } from "~~/components/scaffold-eth";
15+
import { IntegerInput } from "~~/components/scaffold-stark";
1616
```
1717

1818
## Usage

docs/deploying/deploy-smart-contracts.mdx

Lines changed: 8 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,21 @@ To deploy your smart contracts to a live network, there are a few things you nee
88

99
## 1. Configure your network
1010

11-
Scaffold-ETH 2 comes with a selection of predefined networks. You can also add your custom network in:
11+
Scaffold-Stark 2 comes with a selection of predefined networks. They are `Devnet` and `Sepolia`.
1212

13-
- Hardhat => `packages/hardhat/hardhat.config.ts`
14-
- Foundry => `packages/foundry/foundry.toml`
13+
Here are the [Starknet docs](https://docs.starknet.io/documentation/tools/api-services/) for information on Seplia networks providers.
1514

16-
Here are the [Alchemy docs](https://docs.alchemy.com/docs/how-to-add-alchemy-rpc-endpoints-to-metamask) for information on specific networks.
17-
18-
## 2. Generate a new account or add one to deploy the contract(s) from.
15+
## 2. Use prefunded accounts and add one of them to deploy the contract(s) from.
1916

2017
The deployer account is the account that will deploy your contracts. Additionally, the deployer account will be used to execute any function calls that are part of your deployment script.
2118

22-
You can generate a random account / private key or add your crypto wallet's private key.
23-
24-
To create a random account and add the `DEPLOYER_PRIVATE_KEY` to the `.env` file, run:
25-
26-
```
27-
yarn generate
28-
```
29-
30-
If you prefer to manually set your own private key, you will need to add `DEPLOYER_PRIVATE_KEY=yourWalletPrivateKey` to the `packages/hardhat/.env` / `packages/foundry/.env` file.
19+
You can use any prefunded account / private key or add your crypto wallet's private key.
3120

32-
You can check the configured (generated or manually set) account and balances with:
33-
34-
```
35-
yarn account
36-
```
21+
You can also manually set your own private key, you will need to add `PRIVATE_KEY_SEPOLIA=yourWalletPrivateKey` to the `packages/snfoundry/.env` file.
3722

3823
## 3. Deploy your smart contract(s)
3924

40-
By default `yarn deploy` will deploy contract to the local network. You can change `defaultNetwork` in:
41-
42-
- Hardhat => `hardhat.config.ts`
43-
- Foundry => `foundry.toml`
25+
By default `yarn deploy` will deploy contract to the local network. You can change `defaultNetwork` in `scaffold.config.ts`
4426

4527
Run the command below to deploy the smart contract to the target network. Make sure to have some funds in your deployer account to pay for the transaction.
4628

@@ -50,34 +32,13 @@ yarn deploy --network network_name
5032

5133
eg: `yarn deploy --network sepolia`
5234

53-
## 4. Verify your smart contract
54-
55-
You can verify your smart contract on Etherscan by running:
56-
57-
```
58-
yarn verify --network network_name
59-
```
60-
61-
eg: `yarn verify --network sepolia`
62-
63-
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:
64-
65-
- Hardhat => uses [etherscan-verify from hardhat-deploy](https://www.npmjs.com/package/hardhat-deploy#4-hardhat-etherscan-verify).
66-
- Foundry => uses `VerifyAll.s.sol` script located in `packages/foundry/script`.
67-
68-
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"`
69-
70-
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).
71-
7235
## Configuration of Third-Party Services for Production-Grade Apps.
7336

74-
By default, Scaffold-ETH 2 provides predefined API keys for popular services such as Alchemy and Etherscan. This allows you to begin developing and testing your applications more easily, avoiding the need to register for these services.
37+
By default, Scaffold-Stark 2 provides predefined API keys for popular services such as Infura. This allows you to begin developing and testing your applications more easily, avoiding the need to register for this service.
7538

7639
For production-grade applications, it's recommended to obtain your own API keys (to prevent rate limiting issues). You can configure these at:
7740

78-
- `ALCHEMY_API_KEY` variable in `packages/hardhat/.env` and `packages/nextjs/.env.local`. You can create API keys from the [Alchemy dashboard](https://dashboard.alchemy.com/).
79-
80-
- `ETHERSCAN_API_KEY` variable in `packages/hardhat/.env` | `packages/foundry/.env` using your generated API key. You can get your key [here](https://etherscan.io/myapikey).
41+
- `RPC_URL_SEPOLIA` variable in `packages/snfoundry/.env` and `packages/nextjs/.env.local`. You can create API keys from the [Alchemy dashboard](https://dashboard.alchemy.com/).
8142

8243
:::tip Hint
8344
It's recommended to store envs for nextjs in Vercel/system env config for live apps and use .env.local for local testing.

0 commit comments

Comments
 (0)