-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnchor-Cli
More file actions
31 lines (20 loc) · 911 Bytes
/
Anchor-Cli
File metadata and controls
31 lines (20 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
1. Initialize Project:
To create a new Anchor Project, run the following command:
$ anchor init <Solana_0,5>
For example, to create a project called my-project, run:
$ anchor init Solana_0,5
This command creates a new directory with the project name and initializes a new Anchor project with a basic Rust program and TypeScript test template.
Navigate to the project directory:
$ CD Solana_0,5
See the Anchor project's file structure.
2. Build Program
To build your project, run the following command:
$Anchor Build
When running anchor build, if you encounter the following errors:
error: not a directory
lock file version 4 requires `-Znext-lockfile-bump
After applying the preceding solution, attempt to run anchor build again.
3. Deploy Program
To deploy your project, run the following command:
$ anchor deploy
This command deploys your program to the cluster specified in the Anchor.toml file.