For example, named mywallet:
$ ./cellframe-node-cli wallet new -w mywallet
wallet 'mywallet' successfully created
new address RpiDC8c1SxrT7RkXk7GjiGkoMhEBtFMAvT6LV8ec1CRZnFCQT2QfPUDbHd4uk3ZpEZq5DBx4FFG5VTGhYYSd5iarqgYQ2bydqDwaBUsz
After creation, we see the wallet address:
RpiDC8c1SxrT7RkXk7GjiGkoMhEBtFMAvT6LV8ec1CRZnFCQT2QfPUDbHd4uk3ZpEZq5DBx4FFG5VTGhYYSd5iarqgYQ2bydqDwaBUsz
If you have forgotten the wallet address, you can view it with the command:
$ ./cellframe-node-cli wallet info -w mywallet -net cellframe-testnet
wallet: mywallet
addr: RpiDC8c1SxrT7RkXk7GjiGkoMhEBtFMAvT6LV8ec1CRZnFCQT2QfPUDbHd4uk3ZpEZq5DBx4FFG5VTGhYYSd5iarqgYQ2bydqDwaBUsz
balance: 0
By specifying a different network, you can see the balance of the wallet in another network.
$ ./cellframe-node-cli wallet list
wallet: mywallet
addr: RpiDC8c1SxrT7RkXk7GjiGkoMhEBtFMAvT6LV8ec1CRZnFCQT2QfPUDbHd4uk3ZpEZq5DBx4FFG5VTGhYYSd5iarqgYQ2bydqDwaBUsz
wallet: my_wallet
addr: RpiDC8c1SxrTNbxwSzYuQaTyRnNxQ9As4KH1TgncmYXwdZPfMcsRFNJKKTXvVwA17TrFiU6GRyVcPJp986XmAH4mLrhQbRQsr7R1RfPE
wallet: w_first
addr: RpiDC8c1SxrTNbxwT2jHseDywjiJscXaqnC1CU9jNC7j6QgLESYyCSE4tCzszGeZaR9eyBYRocsJdWjLAGfdqoLktSsu2n8trhNe6skt
Insert the existing wallet address into the token_emit command like this:
./cellframe-node-cli token_emit -net cellframe-testnet -chain_emission zerochain -chain_base_tx plasma -addr RpiDC8c1SxrT7RkXk7GjiGkoMhEBtFMAvT6LV8ec1CRZnFCQT2QfPUDbHd4uk3ZpEZq5DBx4FFG5VTGhYYSd5iarqgYQ2bydqDwaBUsz -token KELT -certs my-cert -emission_value 1000000000000000
datum emission 0x3395C602D87B334A3640BF6BE5E7A364B45ACA11DE1AF66DF6E00AFECA56BA23 is placed in datum pool
datum tx 0x9FF134EC8ADE640B634AC6A38551840A6F3C09F8357245BD8A288CC59377C211 is placed in datum pool
First you need to create a certificate my-cert, how to do it, you can see here.
There must also be a token named KELT, an example of creating a token can be viewed here
As you can see from the results of the command, the tokens got into the mempool, then they need to be moved to files or base, depending on the chain, this is done with the following commands:
$ ./cellframe-node-cli mempool_proc -net cellframe-testnet -chain plasma
cellframe-testnet.plasma: Found 1 records :
0x0x84CE025A4196A5B0079B90577686B47962FA7FD544AA1A91C3B12CC614D86928: type_id=DATUM_TX ts_create=Fri Aug 23 14:48:54 2019
data_size=6201
New event created, removed datum 0x0x84CE025A4196A5B0079B90577686B47962FA7FD544AA1A91C3B12CC614D86928 from mempool
$ ./cellframe-node-cli mempool_proc -net cellframe-testnet -chain zerochain
cellframe-testnet.zerochain: Found 1 records :
0x0xD0EAE909761DAC963F33E2709791A37C799D59A3A6C3AF4E2572F1B0C09EFFDF: type_id=DATUM_TOKEN_EMISSION ts_create=Fri Aug 23 14:48:54 2019
data_size=6095
New event created, removed datum 0x0xD0EAE909761DAC963F33E2709791A37C799D59A3A6C3AF4E2572F1B0C09EFFDF from mempool
Now we check the availability of tokens on the wallet:
./cellframe-node-cli wallet info -w mywallet -net cellframe-testnetwallet: mywallet
addr: RpiDC8c1SxrT7RkXk7GjiGkoMhEBtFMAvT6LV8ec1CRZnFCQT2QfPUDbHd4uk3ZpEZq5DBx4FFG5VTGhYYSd5iarqgYQ2bydqDwaBUsz
balance:
1000.000 (1000000000000000) KELT
In the case of multiple tokens, the result may be as follows:
$ ./cellframe-node-cli wallet info -w mywallet -net cellframe-testnetwallet: mywallet
addr: RpiDC8c1SxrT7RkXk7GjiGkoMhEBtFMAvT6LV8ec1CRZnFCQT2QfPUDbHd4uk3ZpEZq5DBx4FFG5VTGhYYSd5iarqgYQ2bydqDwaBUsz
balance:
3000.000 (3000000000000000) KELT
100000.000 (100000000000000000) GOLD
20000.000 (20000000000000000) WOOD
./cellframe-node-cli tx_create net cellframe-testnet -from_wallet mywallet -net cellframe-testnet -chain plasma -to_addr RpiDC8c1SxrTNbxwSzYuQaTyRnNxQ9As4KH1TgncmYXwdZPfMcsRFNJKKTXvVwA17TrFiU6GRyVcPJp986XmAH4mLrhQbRQsr7R1RfPE -token KELT -value 100000000
transfer=Ok
This command performs a transfer from mywallet wallet to another wallet with the address RpiDC8c1SxrTNbxwSzYuQaTyRnNxQ9As4KH1TgncmYXwdZPfMcsRFNJKKTXvVwA17TrFiU6GRyVcPJp986XmAH4mLrhQbRQsr7R1RfPE
The operation also ends up in the mempool, and to apply the transfer, you need to run the following command:
$ ./cellframe-node-cli mempool_proc -net cellframe-testnet -chain plasma
cellframe-testnet.plasma: Found 1 records :
0x0x3D584942538A965FCFF46EAECABE9A6BD3E8E6007DF89CD8066AAF321EB232E9: type_id=DATUM_TX ts_create=Fri Aug 23 16:23:31 2019
data_size=6582