diff --git a/README.md b/README.md index 14a8842..ff2569f 100644 --- a/README.md +++ b/README.md @@ -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 ` 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: diff --git a/program/Anchor.toml b/program/Anchor.toml index b2436a7..5e47461 100644 --- a/program/Anchor.toml +++ b/program/Anchor.toml @@ -8,6 +8,9 @@ skip-lint = false [programs.localnet] counter = "8PY1q5J3Aq2z7TBDLBrVjv77mYzjXSCz6iHQaFEFw9hY" +[programs.devnet] +counter = "8PY1q5J3Aq2z7TBDLBrVjv77mYzjXSCz6iHQaFEFw9hY" + [registry] url = "https://api.apr.dev"