欢迎所有爱好区块链技术的人加入。

ARCHIVES / 758.HTML

EOSjs getTableRows lower and upper bound on account name

Surou EOS-新手问答

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