infinite_chaincode

command
v0.0.0-...-036677f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

README

Deploy chaincode

curl -X POST 10.244.13.2:5000/chaincode -d '
{
    "jsonrpc": "2.0",
    "method": "deploy",
    "params": {
        "type": 1,
        "chaincodeID":{
            "path":"https://github.com/vbanga/chaincode_example/infinite_chaincode"
        },
        "ctorMsg": {
            "function":"init",
            "args":["c", "500"]
        }
    },
    "id": 1
}'

Invoke the chaincode which triggers the infinite loop

curl -X POST 10.244.13.2:5000/chaincode -d '
{
    "jsonrpc": "2.0",
    "method": "invoke",
    "params": {
        "type": 1,
        "chaincodeID":{
            "name":"1f94386ed6053eea263921c9513f371606bbfdf31abeda0542994c220c0e24d5af80547b09c921c43d454ffd4e07f07f64515bb89c50de228bcab81b5e3b86c4"
        },
        "ctorMsg": {
            "function":"invoke",
            "args":["c", "100"]
        }
    },
    "id": 3
}'

CURL to invoke 'query' method on the chaincode for permissioned blockchain

curl -X POST 10.244.13.2:5000/chaincode -d '
{
    "jsonrpc": "2.0",
    "method": "query",
    "params": {
        "type": 1,
        "chaincodeID":{
            "name":"1f94386ed6053eea263921c9513f371606bbfdf31abeda0542994c220c0e24d5af80547b09c921c43d454ffd4e07f07f64515bb89c50de228bcab81b5e3b86c4"
        },
        "ctorMsg": {
            "function":"query",
            "args":["c"]
        }
    },
    "id": 4
}'

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL