1

I am developing a wallet service for eosio, and i want to transfer tokens, how can i do this.

I have used cleos for account creation

cleos create account eosio  mynewacct1 EOSxxxxxxxxxxxxxx EOSxxxxxxxxxxxxxxxxx

Now i want to transfer eos , can anyone explain how can do this?

2

The command to transfer EOS with cleos is as follows:

cleos transfer from to quantity memo

An example of transferring 12.5 EOS from account12345 to account54321:

cleos transfer account12345 account54321 "12.5 EOS" "This is the money I owe you for giving great answers on StackExchange"

You can also do a transfer by directly calling the appropriate action in the eosio.token contract as follows (equivalent to above):

cleos push action eosio.token transfer '{"from":"account12345","to":"account54321","quantity":"12.5000 EOS","memo":"This is the money I owe you for giving great answers on StackExchange"}' -p account12345@active

or

cleos push action eosio.token transfer '["account12345","account54321","12.5000 EOS","This is the money I owe you for giving great answers on StackExchange"]' -p account12345@active

Note that the quantity in the second example(s) has to be given to the correct number of decimal places for the precision of the token being transferred, for EOS, that is 4 decimal places.

| improve this answer | |
0

You should take a deeper look at the eos.io-documentation and the differences between using Cleos and the RPC-API.

You can find the cleos command for a transfer here: Cleos Transfer

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.