Jump to content
FIBOS社区
  • 0
Sign in to follow this  
Amelie

运行fibos命令来查询账户余额,报错

Question

运行:fibos account.js

报错:

Error: HttpRequest: Invalid content type.
    at module.exports.resolve.json.Promise (/home/XXX/node_modules/fibos.js/lib/fetch.js:20:19)
    at new Promise (<anonymous>)
    at Object.json (/home/XXX/node_modules/fibos.js/lib/fetch.js:18:17)
    at /home/XXx/node_modules/eosjs-api/lib/apigen.js:109:25

account.js跟智能合约没关系,应该不是没有部署合约的问题,请问是什么问题呀

 

附account.js

const FIBOS = require('fibos.js');
const config = require('../config'); //配置文件,一些账户信息

const fibosClient = FIBOS(config.callClient);

const account1 = fibosClient.getTableRowsSync(true, 'eosio.token', config.account1.name, 'accounts');
console.log(config.account1.name);
console.log(account1);

const account2 = fibosClient.getTableRowsSync(true, 'eosio.token', config.account2.name, 'accounts');
console.log(config.account2.name);
console.log(account2);

const contractAccount = fibosClient.getTableRowsSync(true, 'eosio.token', config.contractAccount.name, 'accounts');
console.log(config.contractAccount.name);
console.log(contractAccount);

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

config.js 中http设置不对,fibos测试网IP : 'http://api.testnet.fo'

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×