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