Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(status-page): Tokenomics metrics #13076

Merged
merged 4 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
allow to be deployed
  • Loading branch information
cyberhorsey committed Jan 30, 2023
commit d9f4e48f1814b6f03d7c8d7bfb98a64769c254d7
19 changes: 7 additions & 12 deletions packages/status-page/src/pages/home/Home.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
onMount(async () => {
try {
const config = await getConfig(l1Provider, l1TaikoAddress);
if (!Object.hasOwn(config, "enableTokenomics")) return;
if (config.enableTokenomics) {
statusIndicators.push({
statusFunc: getBlockFee,
Expand Down Expand Up @@ -209,6 +210,12 @@
try {
const stateVars = await getStateVariables(l1Provider, l1TaikoAddress);

// TODO: remove. this check prevents this code from running before we deploy next testnet
// since the state vars have had large changes.
if (stateVars.length < 10) {
return;
}

statusIndicators.push({
status: stateVars[4],
provider: l1Provider,
Expand Down Expand Up @@ -260,18 +267,6 @@
console.error(e);
}

statusIndicators.push({
status: 5,
provider: l1Provider,
contractAddress: l1TaikoAddress,
header: "Fee Base",
intervalInMs: 0,
colorFunc: function (status: Status) {
return "green"; // todo: whats green, yellow, red?
},
tooltip: "The current fee base for proposing and rewarding",
});

statusIndicators = statusIndicators;
});
</script>
Expand Down
11 changes: 0 additions & 11 deletions packages/status-page/src/utils/isTokenomicsEnabled.ts

This file was deleted.