Advertisement
rrobad

Untitled

Sep 9th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var id = 'uFUu5iVxahgKGedDnx9jSnxgNKH1Qkk/vzzzIivI1xuzyuELI8KNJffkSRBpXv/7urQ+wQdQ1seBWdZ5ipnQK+qInVevCkWVQW0inGRki49yADkcvQjLJ6rZ3/cAGfKX';
  2. var nodes = (await (await fetch('https://xchange.mainnetwork.io/api/v1/network')).json()).nodes;
  3. for (var i = 0; i < nodes.length; i++) {
  4.   const status = (await (await fetch('https://xchange.mainnetwork.io/api/v1/contracts/check', {
  5.     method: 'POST',
  6.     headers: {
  7.       'Content-Type': 'application/json'
  8.     },
  9.     body: JSON.stringify({
  10.       id,
  11.       node_path: nodes[i]
  12.     })
  13.   })).json()).contract_status;
  14.  
  15.   console.log(status.state, status.node_path);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement