eos icon indicating copy to clipboard operation
eos copied to clipboard

exception when query eosio.token

Open blockplay opened this issue 8 years ago • 2 comments

1.Create wallet

cleos wallet create
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5JVZiytbQjNNPsUP1DSPNfw1APhrubNrHQnhfSWBZSyicXiXoYD"

2.Unlock wallet

cleos wallet unlock --password PW5JVZiytbQjNNPsUP1DSPNfw1APhrubNrHQnhfSWBZSyicXiXoYD

3.List keys

cleos wallet keys

4.Deploy eosio.token smart contract

cd ~/eos
cleos set contract eosio build/contracts/eosio.bios -p eosio
  1. Create account eosio.token
cleos create account eosio eosio.token EOS8aKC2sG6YDUHQAN4K5yy995xb2i8WwjCMtUUF76S1ctpf1wDej EOS8aKC2sG6YDUHQAN4K5yy995xb2i8WwjCMtUUF76S1ctpf1wDej
  1. Import account key
cleos wallet import 5JiJdyqw1iwNN3vZ1mHyYz1M4bZUiDEC6p1N7NDtwiEDc2bxzua
  1. Deploy eosio.token
cleos set contract eosio.token build/contracts/eosio.token -p eosio.token
  1. Create Token
cleos push action eosio.token create '[ "eosio", "1000000000.0000 EOS", 0, 0, 0]' -p eosio.token
  1. Issue Token
cleos push action eosio.token issue '[ "eosio.token", "1000000000.0000 EOS", "memo" ]' -p eosio
  1. Query
cleos get currency balance eosio.token eosio
after Query, will except:
cleos get currency balance eosio.token eosio
1933051ms thread-0   main.cpp:1180                 main                 ] Failed with error: read_until: End of file (13)
read_until: End of file: 

and nodeos will crash with message:
Floating point exception (core dumped)

blockplay avatar Apr 19 '18 09:04 blockplay

maybe the last code bug, I checkout dawn-3.0 is ok.

blockplay avatar Apr 21 '18 07:04 blockplay

@blockplay I have deployed master branch and ran the commands in sequence you mentioned. Interestingly I didn't get any output after running last command cleos get currency balance eosio.token eosio. I'm not getting any error either. Any input?

aniketdivekar avatar May 25 '18 07:05 aniketdivekar