You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### Problem
The memo program now lives here, but the documentation is mostly still
the generated content.
#### Summary of changes
Update the README with:
* more specific program info
* program and docs badges
* doc link
* audit link
Full documentation is available at https://spl.solana.com/memo
21
+
22
+
## Audit
23
+
24
+
The [security-audits repo](https://github.com/solana-labs/security-audits) contains
25
+
all past and present program audits.
9
26
10
27
## Project setup
11
28
@@ -15,13 +32,12 @@ The first thing you'll want to do is install NPM dependencies which will allow y
15
32
pnpm install
16
33
```
17
34
18
-
## Managing programs
35
+
## Program
19
36
20
-
You'll notice a `program` folder in the root of this repository. This is where your generated Solana program is located.
37
+
The `program` folder in the root of this repository contains the program
38
+
implementation.
21
39
22
-
Whilst only one program gets generated, note that you can have as many programs as you like in this repository.
23
-
Whenever you add a new program folder to this repository, remember to add it to the `members` array of your root `Cargo.toml` file.
24
-
That way, your programs will be recognized by the following scripts that allow you to build, test, format and lint your programs respectively.
40
+
The following scripts build, test, format and lint the program respectively.
25
41
26
42
```sh
27
43
pnpm programs:build
@@ -32,24 +48,24 @@ pnpm programs:lint
32
48
33
49
## Generating IDLs
34
50
35
-
You may use the following command to generate the IDLs for your programs.
51
+
You may use the following command to generate the IDLs.
36
52
37
53
```sh
38
54
pnpm generate:idls
39
55
```
40
56
41
-
Depending on your program's framework, this will either use Shank or Anchor to generate the IDLs.
42
-
Note that, to ensure IDLs are generated using the correct framework version, the specific version used by the program will be downloaded and used locally.
57
+
Note that, to ensure IDLs are generated using the correct framework version, the
58
+
specific version used by the program will be downloaded and used locally.
43
59
44
60
## Generating clients
45
61
46
-
Once your programs' IDLs have been generated, you can generate clients for them using the following command.
62
+
Once the program's IDL has been generated, you can generate clients for them using the following command.
47
63
48
64
```sh
49
65
pnpm generate:clients
50
66
```
51
67
52
-
Alternatively, you can use the `generate` script to generate both the IDLs and the clients at once.
68
+
Alternatively, you can use the `generate` script to generate both the IDL and the clients at once.
53
69
54
70
```sh
55
71
pnpm generate
@@ -81,23 +97,3 @@ Finally, you may stop the local validator using the following command.
81
97
```sh
82
98
pnpm validator:stop
83
99
```
84
-
85
-
## Using external programs in your validator
86
-
87
-
If your program requires any external programs to be running, you'll want to in your local validator.
88
-
89
-
You can do this by adding their program addresses to the `program-dependencies` array in the `Cargo.toml` of your program.
90
-
91
-
```toml
92
-
program-dependencies = [
93
-
"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",
94
-
"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV",
95
-
]
96
-
```
97
-
98
-
Next time you build your program and run your validator, these external programs will automatically be fetched from mainnet and used in your local validator.
0 commit comments