Creates transaction
CLI Example
Command syntax:
tx_create -net <net_name>
-chain <chain_name>
-token <token_ticker>
-to_addr <addr>
-value <value>
{-from_wallet <wallet_name> | -from_emission <emission_hash> {-cert <cert_name> | -wallet_fee <wallet_name>}}
-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
-token - type of tocken
-to_addr - address of the receiving wallet (can be multiple)
-value - amount of datoshi user wants to send (can be multiple and written corresponding to wallet addresses)
-from_wallet/from_emission - name of wallet/hash of the emission which is used to send tokens
-cert - certificate which allows to use emission
-wallet_fee - wallet which is used to pay commission if native tokens were used
-fee - validator's commission (not lower than minimum comission in chain)
Example:
Command:
cellframe-node-cli tx_create
-net foobar
-chain main
-value 1000.0e+18
-token BUZ
-to_addr ptV4n68gTebdUTcbozov2BjMQBFhKKkwdrbiU7cL2Sn8GGsKH6ef5AD39mH363M5sCVAHnBUNoyGLSfyBb6dz172KrcTgzBAydvw1PMZ
-from_wallet foobar_root_0
-fee 1.0e+18
Response:
transfer=Ok
tx_hash=0x476132A194AC1C74738093994DF9744EEC62843B8B2F1AC148ED66E2FC72E409
JSON-RPC Example
Command:
curl -X POST http://rpc.cellframe.net/connect -d '{"method":"tx_create", "params":["tx_create;-net;foobar;-chain;main;-value;1000.0e+18;-token;BUZ;-to_addr;ptV4n68gTebdUTcbozov2BjMQBFhKKkwdrbiU7cL2Sn8GGsKH6ef5AD39mH363M5sCVAHnBUNoyGLSfyBb6dz172KrcTgzBAydvw1PMZ;-from_wallet;foobar_root_0;-fee;1.0e+18"], "id":"1"}'
коше
Response:
{
"type": 0,
"result": "transfer=Ok\ntx_hash=0x56CD2CD2B70B1FF698219E4A7E9B1744336CFD6338E8901E248836598E0D8823\n",
"errors": null,
"id": 1
}