Skip to content

Commit

Permalink
feat(status-page): Ignore oracle prover (#13353)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey authored Mar 18, 2023
1 parent 5bdd86f commit beb9fd2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/status-page/.default.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ VITE_TAIKO_L2_ADDRESS="0x0000777700000000000000000000000000000001"
VITE_TAIKO_L1_ADDRESS="0x7B3AF414448ba906f02a1CA307C56c4ADFF27ce7"
VITE_L1_EXPLORER_URL="https://l1explorer.a1.taiko.xyz"
VITE_L2_EXPLORER_URL="https://l2explorer.a1.taiko.xyz"
VITE_FEE_TOKEN_SYMBOL="TKO";
VITE_FEE_TOKEN_SYMBOL="TKO";
VITE_ORACLE_PROVER_ADDRESS="0x1567CDAb5F7a69154e61A16D8Ff5eE6A3e991b39"
4 changes: 3 additions & 1 deletion packages/status-page/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import { ethers } from "ethers";
setupI18n({ withLocale: "en" });
console.log(import.meta.env.VITE_L1_RPC_URL);
const l1Provider = new ethers.providers.JsonRpcProvider(
import.meta.env.VITE_L1_RPC_URL
);
Expand All @@ -27,6 +26,9 @@
l1ExplorerUrl: import.meta.env.VITE_L1_EXPLORER_URL,
l2ExplorerUrl: import.meta.env.VITE_L2_EXPLORER_URL,
feeTokenSymbol: import.meta.env.FEE_TOKEN_SYMBOL || "TKO",
oracleProverAddress:
import.meta.env.ORACLE_PROVER_ADDRESS ||
"0x1567CDAb5F7a69154e61A16D8Ff5eE6A3e991b39",
},
userData: {},
}),
Expand Down
6 changes: 5 additions & 1 deletion packages/status-page/src/pages/home/Home.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
export let l1ExplorerUrl: string;
export let l2ExplorerUrl: string;
export let feeTokenSymbol: string;
export let oracleProverAddress: string;
let statusIndicators: StatusIndicatorProp[] = [
{
Expand Down Expand Up @@ -230,7 +231,10 @@
contract.on(
"BlockProven",
(id, parentHash, blockHash, prover, provenAt) => {
onEvent(new Date(provenAt.toNumber() * 1000).toString());
// ignore oracle prover
if (prover.toLowerCase() !== oracleProverAddress.toLowerCase()) {
onEvent(new Date(provenAt.toNumber()).toString());
}
}
);
},
Expand Down

0 comments on commit beb9fd2

Please sign in to comment.