2

I encounter this problem when I call dice deposit token in the example contract。

root@ubuntu:/opt/eos# cleos push action dice deposit '[ "alice", "100.0000 EOS" ]' -p alice
Error 3050003: eosio_assert_message assertion failure

The console log is:

2018-08-05T09:49:36.388 thread-0   wasm_interface.cpp:929        eosio_assert         ] message: attempt to add asset with different symbol 
2018-08-05T09:49:36.388 thread-0   http_plugin.cpp:475           handle_exception     ] FC Exception encountered while processing chain.push_transaction
2018-08-05T09:49:36.389 thread-0   http_plugin.cpp:476           handle_exception     ] Exception Details: 3050003 eosio_assert_message_exception: eosio_assert_message assertion failure
assertion failure with message: attempt to add asset with different symbol
    {"s":"attempt to add asset with different symbol"}
    thread-0  wasm_interface.cpp:930 eosio_assert
pending console output: 
    {"console":""}
    thread-0  apply_context.cpp:61 exec_one

dice permission is:

root@ubuntu:/opt/eos# cleos get account dice
permissions: 
     owner     1:    1 EOS6zgn2DvsLD13ia6L4Lrnh1qCaC9ttSB757Q7DNh6p3n5qMyg2o
        active     1:    1 EOS6zgn2DvsLD13ia6L4Lrnh1qCaC9ttSB757Q7DNh6p3n5qMyg2o1 dice@eosio.code, 
memory: 
     quota:       unlimited  used:     340.8 KiB  

net bandwidth: 
     used:               unlimited
     available:          unlimited
     limit:              unlimited

cpu bandwidth:
     used:               unlimited
     available:          unlimited
     limit:              unlimited

alice permission is:

root@ubuntu:/opt/eos# cleos get account alice
permissions: 
     owner     1:    1 EOS6awyUE2cWm8h1Z4pgK2jBr47BsKWTJD2g3f8auPNYV4S5n67SV
        active     1:    1 EOS6awyUE2cWm8h1Z4pgK2jBr47BsKWTJD2g3f8auPNYV4S5n67SV1 dice@active, 
memory: 
     quota:       unlimited  used:     2.691 KiB  

net bandwidth: 
     used:               unlimited
     available:          unlimited
     limit:              unlimited

cpu bandwidth:
     used:               unlimited
     available:          unlimited
     limit:              unlimited



root@ubuntu:/opt/eos/contracts/dice# cleos get currency stats eosio.token eos
{
  "EOS": {
    "supply": "2000.0000 EOS",
    "max_supply": "1000000000.0000 EOS",
    "issuer": "eosio"
  }
}

root@ubuntu:/opt/eos/contracts/dice# cleos get currency balance eosio.token alice
1000.0000 EOS
2
  • try SYS instead of EOS in action arguments? – confused00 Aug 5 '18 at 10:46
  • i tried and it's no work. – StringBuffer Aug 5 '18 at 13:00
2

On a local node, the default symbol is SYS, not EOS. Try the following command:

cleos push action dice deposit '[ "alice", "100.0000 SYS" ]' -p alice

Make sure that you have enough SYS tokens.

I also see that the contents of your account are set up incorrectly, you should use cleos system newaccount instead of cleos create account.

Please see my BootBios script at https://github.com/PhillipHamnett/eos-boot-bios for a quick and easy developer setup

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.