From 935c0792b15588627be7d1259521b3aa50b148f9 Mon Sep 17 00:00:00 2001 From: FOB <42175565+F-OBrien@users.noreply.github.com> Date: Thu, 18 Nov 2021 11:11:16 +0000 Subject: [PATCH] Reduce supply for Bridged Tokens Reduce the circulating supply by the amount locked in the PolyLocker contract 0x5c60610ee8E502d8cE830Ba189c075b5f39472Df used for bridging tokens to Polymesh. --- index.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 6025a39..8b13589 100644 --- a/index.html +++ b/index.html @@ -7,8 +7,11 @@ var xhttp = new XMLHttpRequest(); var url2 = 'https://api.etherscan.io/api?module=account&action=tokenbalance&contractaddress=0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec&address=0xcda3b86c000d910e30ddb32119cd182d8c983056&tag=latest&apikey=XS38QQM4VVG3E6UQKPXH38PPYX4SGYY1PI' var xhttp2 = new XMLHttpRequest(); + var url3 = 'https://api.etherscan.io/api?module=account&action=tokenbalance&contractaddress=0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec&address=0x5c60610ee8E502d8cE830Ba189c075b5f39472Df&tag=latest&apikey=XS38QQM4VVG3E6UQKPXH38PPYX4SGYY1PI' + var xhttp3 = new XMLHttpRequest(); var initialLockedBalance = 0; var newLockedBalance = 0 + var newBridgedBalance = 0 xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { initialLockedBalance = JSON.parse(xhttp.responseText).result/1000000000000000000; @@ -19,7 +22,14 @@ xhttp2.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { newLockedBalance = JSON.parse(xhttp2.responseText).result/1000000000000000000; - document.getElementById("c").innerHTML = 1000000000 - (initialLockedBalance + newLockedBalance); + xhttp3.open("GET", url3, true); + xhttp3.send(); + } + }; + xhttp3.onreadystatechange = function() { + if (this.readyState == 4 && this.status == 200) { + newBridgedBalance = JSON.parse(xhttp3.responseText).result/1000000000000000000; + document.getElementById("c").innerHTML = 1000000000 - (initialLockedBalance + newLockedBalance + newBridgedBalance); } }; xhttp.open("GET", url, true);