Skip to content
This repository has been archived by the owner on Sep 14, 2024. It is now read-only.

Commit

Permalink
Update explorer to use rpc.nosocoin.com instead of api.nosostats.com
Browse files Browse the repository at this point in the history
  • Loading branch information
gonefishing4422 committed Jan 15, 2024
1 parent 87a3daf commit 5c4325c
Show file tree
Hide file tree
Showing 24 changed files with 527 additions and 76 deletions.
8 changes: 4 additions & 4 deletions js/countdown2.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const fetchMainnetInfo = () => {
return fetch('https://api.nosostats.com:8078', {
return fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand All @@ -20,10 +20,10 @@
};

const fetchBlock = async (blockNumber) => {
const response = await fetch('https://api.nosostats.com:8078', {
const response = await fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down
8 changes: 4 additions & 4 deletions js/explorer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down Expand Up @@ -33,10 +33,10 @@ fetch('https://api.nosostats.com:8078', {
};

const fetchBlocks = async (i) => {
const response = await fetch('https://api.nosostats.com:8078', {
const response = await fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down
4 changes: 2 additions & 2 deletions js/getaddressbalance - Copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
const urlParams = new URLSearchParams(window.location.search);
const address = urlParams.get('address');

fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down
4 changes: 2 additions & 2 deletions js/getaddressbalance.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
const urlParams = new URLSearchParams(window.location.search);
const address = urlParams.get('address');

fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down
4 changes: 2 additions & 2 deletions js/getblockinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ const urlParams = new URLSearchParams(window.location.search);
const blockHeight = urlParams.get('blockheight');
console.log(blockHeight); // log block height from URI

fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down
12 changes: 6 additions & 6 deletions js/getblockmns-copy.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Initial fetch to get the currentHeight
fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down Expand Up @@ -38,10 +38,10 @@ function updateURL(newBlockHeight) {

// Function to fetch data for a specific blockHeight
function fetchDataForBlockHeight(blockHeight) {
fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down Expand Up @@ -124,10 +124,10 @@ document.getElementById('backButton').addEventListener('click', () => {
document.getElementById('forwardButton').addEventListener('click', () => {
if (blockHeight) {
// Fetch the current height
fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down
16 changes: 8 additions & 8 deletions js/getblockmns.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ document.addEventListener("DOMContentLoaded", function () {
// Function to fetch data for a specific blockHeight
function fetchDataForBlockHeight(blockHeight) {
const getsupply = document.getElementById('getsupply');
fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down Expand Up @@ -234,10 +234,10 @@ document.addEventListener("DOMContentLoaded", function () {

// Fetch the currentHeight if blockHeight is not available
if (!blockHeight) {
fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down Expand Up @@ -273,10 +273,10 @@ document.addEventListener("DOMContentLoaded", function () {
document.getElementById('forwardButton').addEventListener('click', () => {
if (blockHeight) {
// Fetch the current height
fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down Expand Up @@ -316,10 +316,10 @@ document.addEventListener("DOMContentLoaded", function () {
for (let i = 0; i < totalBlocks; i += blockIncrement) {
const currentBlock = blockHeight - i;

const promise = fetch('https://api.nosostats.com:8078', {
const promise = fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down
8 changes: 4 additions & 4 deletions js/getblockmns2.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const urlParams = new URLSearchParams(window.location.search);
let blockHeight = urlParams.get('blockheight');

fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand All @@ -25,10 +25,10 @@ fetch('https://api.nosostats.com:8078', {

const tableContainer = document.getElementById('mns-rewards-table');
if (tableContainer) {
fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down
12 changes: 6 additions & 6 deletions js/getblockmns3.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
const Chart = require('chart.js');

// Initial fetch to get the currentHeight
fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down Expand Up @@ -41,10 +41,10 @@ function updateURL(newBlockHeight) {

// Function to fetch data for a specific blockHeight
function fetchDataForBlockHeight(blockHeight) {
fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down Expand Up @@ -164,10 +164,10 @@ document.getElementById('backButton').addEventListener('click', () => {
document.getElementById('forwardButton').addEventListener('click', () => {
if (blockHeight) {
// Fetch the current height
fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down
12 changes: 6 additions & 6 deletions js/getblockmns3_line.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ function fetchDataForBlockHeights(customBlockHeights) {

// Function to fetch data for a single block height
function fetchDataForBlockHeight(customBlockHeight) {
return fetch('https://api.nosostats.com:8078', {
return fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down Expand Up @@ -50,10 +50,10 @@ function fetchDataForBlockHeights(customBlockHeights) {
function fetchDataForBlockHeights2(customBlockHeights) {
// Function to fetch data for a single block height
function fetchDataForBlockHeight(customBlockHeight) {
return fetch('https://api.nosostats.com:8078', {
return fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down Expand Up @@ -245,10 +245,10 @@ let customBlockHeight = customParams.get('blockheight');

if (!customBlockHeight) {
// If customBlockHeight is not set, fetch the current height
fetch('https://api.nosostats.com:8078', {
fetch('https://rpc.nosocoin.com:8078', {
method: 'POST',
headers: {
'Origin': 'https://api.nosostats.com'
'Origin': 'https://rpc.nosocoin.com'
},
body: JSON.stringify({
"jsonrpc": "2.0",
Expand Down
Loading

0 comments on commit 5c4325c

Please sign in to comment.