Creates vote transaction.

Command syntax:

poll vote 
-net <net_name> 
-hash <poll_hash> 
-option_idx <option_index> 
[-cert <delegate_cert_name>] 
-fee <value_datoshi> 
-w <fee_wallet_name>

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list
-hash - hash of the poll transaction
-option_idx - index of answer option (count starts with 0)
-cert - certificate for signing poll transaction (optional, if not specified - transaction will be signed by wallet)
-fee - validator's commission
-w - name of the wallet from which commission will be paid and vote weight will be calculated

CLI Example

Command:

cellframe-node-cli poll vote -net foobar -hash 0xD4E174C886B0C90597E5E691E231D94F84591C5431D502F7470A37436B839FB5 -option_idx 1 -fee 0.05e+18 -w foobar_root_1

Response:

Datum 0x0B03A720E857D3289E7F4748B3CAB543B14B5AB54AF5FF55712BAD621449D97D successfully added to mempool

JSON-RPC Example

JSON-RPC Request - POLL VOTE

Creates vote transaction.

Request Structure

JSON object:

{
  "method": "poll",
  "subcommand": ["vote"],
  "arguments": {
    "net": "network_name",
    "hash": "poll_hash",
    "option_idx": "option_index",
    "cert": "delegate_cert_name",
    "fee": "value_datoshi",
    "w": "fee_wallet_name"
  },
  "id": "1"
}

Parameters: net (network_name) - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received using - Node Command - NET LIST hash - hash of the poll transaction option_idx - index of answer option count starts with 0 cert - certificate for signing poll transaction if needed optional, if not specified - transaction will be signed by wallet fee - validator’s commission w - name of the wallet from which commission will be paid and vote weight will be calculated

Curl Example

Request:

curl --unix-socket /opt/cellframe-node/var/run/node_cli -X POST http://localhost/connect -d '{
  "method": "poll",
  "subcommand": ["vote"],
  "arguments": {
    "net": "foobar",
    "option_idx": "0",
    "fee": "0.05e+18",
    "w": "foobar_master_0"
  },
  "id": "1"
}'

Response:

{
  "type": 0,
  "result": "Datum 0xA835DEEB0AAC90F161366E092C91CF8A03D24D1825D88D0690418C98950AC742 successfully added to mempool",
  "errors": null,
  "id": 1
}
Link to original