EOSIO / eosjs

General purpose library for the EOSIO blockchain.
http://eosio.github.io/eosjs
MIT License
1.43k stars 462 forks source link

newaccount for master, can not success.. #55

Closed songsongMr closed 6 years ago

songsongMr commented 6 years ago

version:"eosjs": "^7.1.6", problem: apigen.js?f08d:115 Error: Required uint16 transaction_header.packed_bandwidth_words transaction.

apigen.js?f08d:115 Error: Required uint16 transaction_header.context_free_cpu_bandwidth transaction.

des: these two attributes are not exist;so I add them in the js code(write-api.js) like this:

  rawTx.packed_bandwidth_words=0;
  rawTx.context_free_cpu_bandwidth= 0;

then I refresh the quest,get nothing response (no error tips )

here is my code : var config = { keyProvider: ['5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3'] ,// WIF string or array of keys..
httpEndpoint: 'http://127.0.0.1:8888',
mockTransactions: () => 'pass', expireInSeconds: 100, broadcast: true, debug: false, sign: true };

var eos = Eos.Localnet(config); eos.newaccount({ creator: 'eosio', name:'testaccount', owner: 'EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV', active: 'EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV', recovery: 'eosio' });

chris-allnutt commented 6 years ago

@songsongMr Update to v8.0.0 which is the current dawn3 tag eosjs@dawn3 tag, also make sure you're connecting to a dawn3x release, we currently use the docker image here: https://hub.docker.com/r/eosio/eos/tags/

If you do that, everything should work.

nsjames commented 6 years ago

Also update your eosio.bios contract.

songsongMr commented 6 years ago

According to the above instructions, my problem was solved.Thank you!