1

I am trying to follow the tutorial, deployed eosio.token contratc to eosio.token account. I have no problem to do the following:

eos.transaction({
  actions: [
    {
      account: 'eosio.token',
      name: 'create',
      authorization: [{
        actor: 'eosio.token',
        permission: 'active'
      }],
      data: {
        issuer: 'eosio.token',
        maximum_supply: '7000000 EOS'
      }
    }
  ]
})

However, using any symbol other than 'EOS' or 'SYS' caused the error:

method: 'throw_datastream_range_error' } http://127.0.0.1:8888/v1/chain/get_currency_stats {"code":"eosio.token","symbol":"EOP"} { Error: {"code":500,"message":"Internal Service Error","error":{"code":8,"name":"out_of_range_exception","what":"Out of Range","details":[{"message":"read datastream of length 14 over by -12","file":"datastream.cpp","line_number":6,"method":"throw_datastream_range_error"},{"message":"Error unpacking field version","file":"raw.hpp","line_number":368,"method":"operator()"},{"message":"error unpacking eosio::chain::abi_def","file":"raw.hpp","line_number":616,"method":"unpack"}]}}

  • Have you tried with decimal places '7000000 EOP' -> '7000000.0000 EOP'? – Filip Niziol May 30 '18 at 17:57
1

This is a known bug in eosjs, https://github.com/EOSIO/eosjs/issues/110.

Using cleos to set contract works for me.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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