Skip to content

Instantly share code, notes, and snippets.

@eonwarped
eonwarped / gist:d2d4f216b03c1ef1ba1ae010f4816fca
Last active January 11, 2020 03:50
looping through smt balances...
function get_bal(start, limit) {
if (!limit) {
limit = 1000;
}
token_resp = fetch("https://testnet.steemitdev.com/", {"credentials":"omit","headers":{"accept":"application/json, text/plain, */*","accept-language":"en-US,en;q=0.9","content-type":"application/json","sec-fetch-mode":"cors","sec-fetch-site":"cross-site"},"referrer":"http://localhost:8080/themorningbowl/@davedickeyyall/new-weed-and-beneficiaries-on-themorningbowl","referrerPolicy":"no-referrer-when-downgrade","body":JSON.stringify({id:2,jsonrpc:"2.0",method:"call",params:["database_api","list_smt_tokens",{limit: limit, order: "by_symbol", "start": start}]}),"method":"POST","mode":"cors"});
token_resp.then(x => x.json()).then(x => { x.result.tokens.forEach(y => {
if(y.token.liquid_symbol.nai == '@@333185944') {
console.log("found 333185944");
```
{"id":9,"jsonrpc":"2.0","method":"call","params":["condenser_api","broadcast_transaction_synchronous",
[{"ref_block_num":16699,"ref_block_prefix":3193563431,"expiration":"2020-01-11T02:39:30",
"operations":[["vote2",
{"voter":"ewd","author":"ewd","permlink":"testing-testing-123","rshares":[[{"nai":"@@333185944","precision":3},"0"]],"extensions":[]}]],"extensions":[],"signatures":[""]}]]}
```
```

Keybase proof

I hereby claim:

  • I am eonwarped on github.
  • I am eonwarped (https://keybase.io/eonwarped) on keybase.
  • I have a public key ASDXqQjLheI0vTigetYv1fP7_hBfJ41qjruJA1AGPt8Flwo

To claim this, I am signing this object: