Skip to content

Commit 68bcd1b

Browse files
committed
Documentation JSON param fix
Fixed some commands in the docs, it may be annoying to people if they cut and paste it and it won't work. Change-Id: Icf21f50a4f1dd2377206ba3527f4a9a35f9b83a9 Signed-off-by: Yacov Manevich <[email protected]>
1 parent 4b53c7c commit 68bcd1b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/Setup/Chaincode-setup.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ POST localhost:7050/registrar
275275

276276
First, send a chaincode deploy transaction, only once, to the validating peer. The CLI connects to the validating peer using the properties defined in the core.yaml file. **Note:** The deploy transaction typically requires a `path` parameter to locate, build, and deploy the chaincode. However, because these instructions are specific to local development mode and the chaincode is deployed manually, the `name` parameter is used instead.
277277
```
278-
peer chaincode deploy -n mycc -c '{Args": ["init", "a","100", "b", "200"]}'
278+
peer chaincode deploy -n mycc -c '{"Args": ["init", "a","100", "b", "200"]}'
279279
```
280280

281281
Alternatively, you can run the chaincode deploy transaction through the REST API.
@@ -351,7 +351,7 @@ The deploy transaction initializes the chaincode by executing a target initializ
351351
Run the chaincode invoking transaction on the CLI as many times as desired. The `-n` argument should match the value provided in the chaincode window (started in Vagrant terminal 2):
352352

353353
```
354-
peer chaincode invoke -l golang -n mycc -c '{Args": ["invoke", "a", "b", "10"]}'
354+
peer chaincode invoke -l golang -n mycc -c '{"Args": ["invoke", "a", "b", "10"]}'
355355
```
356356

357357
Alternatively, run the chaincode invoking transaction through the REST API.
@@ -392,7 +392,7 @@ POST <host:port>/chaincode
392392

393393
**Note:** When security is enabled, modify the CLI command and REST API payload to pass the `enrollmentID` of a logged in user. To log in a registered user through the CLI or the REST API, follow the instructions in the [note on security functionality](#note-on-security-functionality). On the CLI, the `enrollmentID` is passed with the `-u` parameter; in the REST API, the `enrollmentID` is passed with the `secureContext` element. If you are enabling security and privacy on the peer process with environment variables, it is important to include these environment variables in the command when executing all subsequent peer operations (e.g. deploy, invoke, or query).
394394

395-
CORE_SECURITY_ENABLED=true CORE_SECURITY_PRIVACY=true peer chaincode invoke -u jim -l golang -n mycc -c '{Args": ["invoke", "a", "b", "10"]}'
395+
CORE_SECURITY_ENABLED=true CORE_SECURITY_PRIVACY=true peer chaincode invoke -u jim -l golang -n mycc -c '{"Args": ["invoke", "a", "b", "10"]}'
396396

397397
**REST Request:**
398398

@@ -428,7 +428,7 @@ The invoking transaction runs the specified chaincode function name "invoke" wit
428428
Run a query on the chaincode to retrieve the desired values. The `-n` argument should match the value provided in the chaincode window (started in Vagrant terminal 2):
429429

430430
```
431-
peer chaincode query -l golang -n mycc -c '{Args": ["query", "b"]}'
431+
peer chaincode query -l golang -n mycc -c '{"Args": ["query", "b"]}'
432432
```
433433

434434
The response should be similar to the following:
@@ -480,7 +480,7 @@ POST <host:port>/chaincode
480480
**Note:** When security is enabled, modify the CLI command and REST API payload to pass the `enrollmentID` of a logged in user. To log in a registered user through the CLI or the REST API, follow the instructions in the [note on security functionality](#note-on-security-functionality). On the CLI, the `enrollmentID` is passed with the `-u` parameter; in the REST API, the `enrollmentID` is passed with the `secureContext` element. If you are enabling security and privacy on the peer process with environment variables, it is important to include these environment variables in the command when executing all subsequent peer operations (e.g. deploy, invoke, or query).
481481

482482
```
483-
CORE_SECURITY_ENABLED=true CORE_SECURITY_PRIVACY=true peer chaincode query -u jim -l golang -n mycc -c '{Args": ["query", "b"]}'
483+
CORE_SECURITY_ENABLED=true CORE_SECURITY_PRIVACY=true peer chaincode query -u jim -l golang -n mycc -c '{"Args": ["query", "b"]}'
484484
```
485485

486486
**REST Request:**

0 commit comments

Comments
 (0)