Skip to content

Commit

Permalink
added crosschain flags
Browse files Browse the repository at this point in the history
  • Loading branch information
brewmaster012 committed Jan 24, 2024
1 parent f38712e commit 6b363ca
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
4 changes: 4 additions & 0 deletions params.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ <h1 id="sec-cross-chain-module">Important Params</h1>
<b>Chain Params</b>
<div id="chain-params-json"></div>
</div>
<div class="item">
<b>Crosschain Flags</b>
<div id="crosschain-flags-json"></div>
</div>
<div class="item">
<b>Slashing</b>
<div id="slashing-params-json"></div>
Expand Down
19 changes: 17 additions & 2 deletions params.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {externalChainIDs, addDetails, nodeURL, RPCByChainID, corsProxyURL, hashServerURL} from './common.js';
// import {create} from "./secp256k1";

(async () => {
async function renderChainParams() {
Expand Down Expand Up @@ -58,17 +59,22 @@ import {externalChainIDs, addDetails, nodeURL, RPCByChainID, corsProxyURL, hashS
const response = await fetch(url);
const data = await response.json();
const element = createTreeView(div, data);
return data;
}
renderObserverParams();
const obP = renderObserverParams();

async function renderNodeAccounts() {
const div = document.getElementById('node-accounts-json');
const url = `${nodeURL}/zeta-chain/observer/nodeAccount`;
const response = await fetch(url);
const data = await response.json();
const element = createTreeView(div, data);
return data;
const grantees = data.NodeAccount.map((x)=>x.granteeAddress);
div.appendChild(createTreeView(document.createElement("div"), grantees));
}
renderNodeAccounts();
const nAccP = renderNodeAccounts();


async function renderObserverSet() {
const div = document.getElementById('observer-set-json');
Expand All @@ -78,4 +84,13 @@ import {externalChainIDs, addDetails, nodeURL, RPCByChainID, corsProxyURL, hashS
const element = createTreeView(div, data);
}
renderObserverSet();

async function renderCrosschainFlags() {
const div = document.getElementById('crosschain-flags-json');
const url = `${nodeURL}/zeta-chain/observer/crosschain_flags`;
const response = await fetch(url);
const data = await response.json();
const element = createTreeView(div, data);
}
renderCrosschainFlags();
})();

0 comments on commit 6b363ca

Please sign in to comment.