Skip to content

Commit 49a8ce1

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

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
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 by passing `--provider.cluster <your-custom-rpc>` or you can override `provider.cluster` in `Anchor.toml`
142+
139143
3. Install frontend dependencies:
140144

141145
```bash
142146
cd frontend
143147
pnpm install
148+
cp ../program/idl/counter.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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ skip-lint = false
88
[programs.localnet]
99
counter = "8PY1q5J3Aq2z7TBDLBrVjv77mYzjXSCz6iHQaFEFw9hY"
1010

11+
[programs.devnet]
12+
counter = "8PY1q5J3Aq2z7TBDLBrVjv77mYzjXSCz6iHQaFEFw9hY"
13+
1114
[registry]
1215
url = "https://api.apr.dev"
1316

0 commit comments

Comments
 (0)