itleaks / js4eos

A javascript application to play/start EOS just like eos client cleos(一条Javascript命令玩转EOS,EOSForce, Fibos, ENU)(EOS script)(EOS Testing Framework)(EOS Truffle)(Powered by Itleaks)
122 stars 26 forks source link

set account permission 报 json 语法错误 #2

Closed qyvlik closed 5 years ago

qyvlik commented 5 years ago
js4eos set account permission qyvlikeosdev active EOS4xWTNK4ySE57Am86fH5pbFhyDhTGkrHDiWgNoNnYTabCqBkhky owner -p qyvlikeosdev
qyvlikeosdev
active
(node:63321) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token E in JSON at position 0
    at JSON.parse (<anonymous>)
    at EosHelper.EOS.transaction.tr (/usr/local/lib/node_modules/js4eos/lib/api.js:161:24)
    at trMessageCollector (/usr/local/lib/node_modules/js4eos/node_modules/eosjs/lib/write-api.js:560:26)
    at Object._callee$ (/usr/local/lib/node_modules/js4eos/node_modules/eosjs/lib/write-api.js:327:48)
    at tryCatch (/usr/local/lib/node_modules/js4eos/node_modules/regenerator-runtime/runtime.js:62:40)
    at Generator.invoke [as _invoke] (/usr/local/lib/node_modules/js4eos/node_modules/regenerator-runtime/runtime.js:296:22)
    at Generator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/js4eos/node_modules/regenerator-runtime/runtime.js:114:21)
    at tryCatch (/usr/local/lib/node_modules/js4eos/node_modules/regenerator-runtime/runtime.js:62:40)
    at invoke (/usr/local/lib/node_modules/js4eos/node_modules/regenerator-runtime/runtime.js:152:20)
    at /usr/local/lib/node_modules/js4eos/node_modules/regenerator-runtime/runtime.js:195:11
(node:63321) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:63321) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
itleaks commented 5 years ago

permission参数应该如下: js4eos set account permission account_name active '{"threshold": 1,"keys": [{"key":"YOUR_PUBLICKKEY", "weight":1}],"accounts": []}' owner -p account_name@owner

qyvlik commented 5 years ago

@itleaks 好的,谢谢