您正在查看: 2018年6月

Error 3050003 assertion failure with message: invalid sell

购买RAM的代币数 保留小数后四位 例如1.0000

Error 3050000 Cannot create account named xxxxxx, as that name is already taken

账户 xxxxxx,已经在链上创建了,链上账户名唯一

error 3050003 assertion failure with message: symbol precision mismatch

转账等代币金额 保留小数后 4位 如 '1.0000 EOS'

Error 3050003 assertion failure with message: overdrawn balance

执行

eos.transfer({
    from: 'dapp.exec',
    to: 'eosio',
    quantity: '99999973.8056 EOS',
    memo: 'hello world'
        }).then(console.log)
    .catch(e => {
        console.error(e);
    })

返回

eos.js:18306 Error: {"code":500,"message":"Internal Service Error","error":{"code":3050003,"name":"eosio_assert_message_exception","what":"eosio_assert_message assertion failure","details":[{"message":"assertion failure with message: overdrawn balance","file":"wasm_interface.cpp","line_number":930,"method":"eosio_assert"},{"message":"","file":"apply_context.cpp","line_number":62,"method":"exec_one"}]}}

原因:账户余额小于要转的金额

Error 3050003 assertion failure with message: no balance object found

执行创建账户

const name = 'bcskillsuroy'
    const pubkey = 'EOS68mvUMCz73a5Xj2wnJxdTW1aPjmiKCeSAjVdXjTd3D3g9A38EE'
     eos.transaction(tr => {
        tr.newaccount({
          creator: 'dapp.exec',
          name,
          owner: pubkey,
          active: pubkey
        })

        tr.buyrambytes({
          payer: 'dapp.exec',
          receiver: name,
          bytes: 8192
        })

        tr.delegatebw({
          from: 'dapp.exec',
          receiver: name,
          stake_net_quantity: '10.0000 EOS',
          stake_cpu_quantity: '10.0000 EOS',
          transfer: 0
        })
    }).then(console.log)
    .catch(e => {
        console.error(e);
    })

返回错误

eos.js:3010 {"code":500,"message":"Internal Service Error","error":{"code":3050003,"name":"eosio_assert_message_exception","what":"eosio_assert_message assertion failure","details":[{"message":"assertion failure with message: no balance object found","file":"wasm_interface.cpp","line_number":930,"method":"eosio_assert"},{"message":"","file":"apply_context.cpp","line_number":62,"method":"exec_one"}]}}

原因:由于buyrambytes,创建主账户没有足够可用的余额(EOS此时返回的错误提示也有待改进)