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"}]}}

1
  • Have you tried with decimal places '7000000 EOP' -> '7000000.0000 EOP'? May 30, 2018 at 17:57

1 Answer 1

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 agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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