Skip to content

Commit 6d996f9

Browse files
author
Lewis
committed
readme: Give more guidance about how to run successfully
1 parent 809f63d commit 6d996f9

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,24 @@ cd program
134134
pnpm install
135135
anchor build
136136
anchor keys sync
137+
anchor build
138+
anchor deploy
137139
```
138140

141+
If `Operation timed out` happens during `anchor deploy`, you can also use other RPC endpoint such as `anchor deploy --provider.cluster https://solana-devnet.g.alchemy.com/v2/YOUR-API-KEY`
142+
139143
3. Install frontend dependencies:
140144

141145
```bash
142146
cd frontend
143147
pnpm install
148+
cp ../program/target/deploy/counter-keypair.json frontend/anchor-idl/idl.json
149+
cp ../program/target/types/counter.ts frontend/anchor-idl/idl.ts
150+
pnpm dev
144151
```
145152

153+
Action `cp` is important, so that you won't access the program others may have deployed. You'll notice that if your initial counter value is not null or zero.
154+
146155
### Development
147156

148157
1. Test the program:

program/Anchor.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package_manager = "pnpm"
55
resolution = true
66
skip-lint = false
77

8-
[programs.localnet]
8+
[programs.devnet]
99
counter = "8PY1q5J3Aq2z7TBDLBrVjv77mYzjXSCz6iHQaFEFw9hY"
1010

1111
[registry]

0 commit comments

Comments
 (0)