EOSjs getTableRows lower and upper bound on account name

try {  
      let con_account = 'bcskillsurou';
      const encodedName = new BigNumber(Eos.modules.format.encodeName("bcskillsurou", false))
      console.log(encodedName);
      console.log(await rpc.get_table_rows(
      {
        code:con_account,
        scope:con_account,
        table:"accounttb",
        lower_bound: encodedName,
      }));

    } catch (e) {
      console.log( '\nCaught exception: ' + e);
      if (e instanceof eosjs_jsonrpc.RpcError)
        console.log( '\n\n' + JSON.stringify(e.json, null, 2));
    }

参考

https://eosio.stackexchange.com/questions/813/eosjs-gettablerows-lower-and-upper-bound-on-account-name
issue: https://github.com/EOSIO/eosjs/issues/456

,

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享
评论 抢沙发
区块链技术的头像-区块链开发网

昵称

取消
昵称表情代码图片