Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,24 @@ cd program
pnpm install
anchor build
anchor keys sync
anchor build
anchor deploy
```

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`

3. Install frontend dependencies:

```bash
cd frontend
pnpm install
cp ../program/idl/counter.json frontend/anchor-idl/idl.json
cp ../program/target/types/counter.ts frontend/anchor-idl/idl.ts
pnpm dev
```

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.

### Development

1. Test the program:
Expand Down
3 changes: 3 additions & 0 deletions program/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ skip-lint = false
[programs.localnet]
counter = "8PY1q5J3Aq2z7TBDLBrVjv77mYzjXSCz6iHQaFEFw9hY"

[programs.devnet]
counter = "8PY1q5J3Aq2z7TBDLBrVjv77mYzjXSCz6iHQaFEFw9hY"

[registry]
url = "https://api.apr.dev"

Expand Down