iost-official / go-iost

Official Go implementation of the IOST blockchain
https://developers.iost.io/
GNU Lesser General Public License v3.0
565 stars 112 forks source link

Can't add permission using auth.iost #1118

Open takaowada opened 5 years ago

takaowada commented 5 years ago

Uncaught exception when attempting to create an account without enough balance

To create

iwallet sys addperm transfer 100 -a test1 -s localhost:30002 --chain_id 1020 Transaction receipt: { "txHash": "Ex2EgkfhRjVFwF1owcTuDynoTWY9yuYKGfTDJX4ueLbX", "gasUsage": 33792, "ramUsage": { }, "statusCode": "RUNTIME_ERROR", "message": "running action Action{Contract: auth.iost, ActionName: addPermission, Data: [\"test1\",\"transfer\",100]}\n error: Uncaught exception: Error: require auth failed\nat _default_name.js:58:48\n _IOSTInstruction_counter.incr(61.9);throw new Error('require auth failed');\n ^\nStack tree: \nError: require auth failed", "returns": [ ], "receipts": [ ] } Transaction executed err ERROR: running action Action{Contract: auth.iost, ActionName: addPermission, Data: ["test1","transfer",100]} error: Uncaught exception: Error: require auth failed at _default_name.js:58:48 _IOSTInstruction_counter.incr(61.9);throw new Error('require auth failed'); ^ Stack tree: Error: require auth failed

This should be handled gracefully

ziranliu commented 5 years ago

Add --signers=test1@owner to your command