BCSkill (Block chain skill )
区块链中文技术社区

只讨论区块链底层技术
遵守一切相关法律政策!

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此时返回的错误提示也有待改进)

error 3050003 comparison of assets with different symbols is not allowed

执行交易时提示

1125331ms thread-0   http_plugin.cpp:406           handle_exception     ] Exception Details: 3050003 eosio_assert_message_exception: eosio_assert_message assertion failure
assertion failure with message: comparison of assets with different symbols is not allowed
    {"s":"comparison of assets with different symbols is not allowed"}
    thread-0  wasm_interface.cpp:930 eosio_assert

    {"_pending_console_output.str()":""}

是因为交易中的代币符号与系统内的代币符号不一致。
可参考 (修改系统默认的代币SYS为EOS