Collects all commission from the specified blocks.

Command syntax:

block fee collect 
-net <net_name> 
-chain <chain_name> 
-cert <priv_cert_name> 
-addr <addr> 
-hashes <hashes_list> 
-fee <value>

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
-chain - the name of Chain. The list of chains can be found in the directory <Config_dir> \ etc \ network \ <network_name> or by the Cellframe-Node-CLI using command - net list chains
-cert - name of the private master node certificate
-addr - wallet address for collecting reward
-hashes - list of blocks (hashes) from which reward will be collected
-fee - commission for transaction

If you request command in the Cellframe network, use parameter -chain main.

CLI Example

Command:

cellframe-node-cli block fee collect 
-net subzero 
-chain main 
-cert subzpay 
-hashes 0x9AF4584800FDCABF77EF1E2CA757CE7297F757F77D09632B629296B07E397B22,0x2E257552B1A94B5CB3841D1D8E7CC582CA2EEFCBFAAEB66564C6C77F3C128237,0xA5BADEECFE8FD433378FB6CEE2E8663B1DEE7FD56B33CC0D8127772B7C61B6DA -fee 0.05e+18 -addr mJUUJk6Yk2gBSTjcEUb15ATxj2BkxP1YcFkmMrP8bkDAGF6QME4Fxi3yuKD26xGjkxc51GPJ6oq7caCmRq5Y52mxHgJY3vfSYbTrzYWw

Response:

TX for fee collection created succefully, hash=0xA28075EF7BCE6EB566142EEDBEA698E19374D80218D1D9F0C1A7C2B00EE0484D

JSON-RPC Example

JSON-RPC Request - BLOCK TAKE FEE

Collects all commission from the specified blocks.

Request Structure

JSON object:

{
  "method": "block",
  "subcommand": ["collect","fee"],
  "arguments": {
    "net": "network_name",
    "chain": "chain_name",
    "cert": "priv_cert_name",
    "addr": "address",
    "hashes": "list_of_hashes",
    "fee": "value"
  },
  "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 chain - the name of chain (main or zerochain) cert - name of the private master node certificate addr - wallet address for collecting fees hashes - list of block hashes for collecting fees fee - commission for transactions in the network

If you make a request in the Cellframe network, use parameter chain:main.

Curl Example

Request:

curl --unix-socket /opt/cellframe-node/var/run/node_cli -X POST http://localhost/connect -d '{
  "method": "block",
  "subcommand": ["collect","fee"],
  "arguments": {
    "net": "subzero",
    "chain": "main",
    "cert": "subzpay",
    "addr": "mJUUJk6Yk2gBSTjcEUb15ATxj2BkxP1YcFkmMrP8bkDAGF6QME4Fxi3yuKD26xGjkxc51GPJ6oq7caCmRq5Y52mxHgJY3vfSYbTrzYWw",
    "hashes": "mJUUJk6Yk2gBSTjcEUb15ATxj2BkxP1YcFkmMrP8bkDAGF6QME4Fxi3yuKD26xGjkxc51GPJ6oq7caCmRq5Y52mxHgJY3vfSYbTrzYWw",
    "fee": "0.05e+18"
  },
  "id": "1"
}'

Response:

{
  "type"2,
  "result": [
    {
      "TX for fee collection created succefully, hash ""0x79C413D16E199F658E49773A0FD252DBECA8C6B2C909AD2F0DCFA1DBF3D95074"
    }
  ],
  "id"1
}
Link to original