diff --git a/tools/obscuroscan_v3/frontend/components/layouts/footer.tsx b/tools/obscuroscan_v3/frontend/components/layouts/footer.tsx
index 940228cf47..561d1548ef 100644
--- a/tools/obscuroscan_v3/frontend/components/layouts/footer.tsx
+++ b/tools/obscuroscan_v3/frontend/components/layouts/footer.tsx
@@ -1,5 +1,9 @@
-import { SocialLinks } from '@/src/lib/constants'
-import { GitHubLogoIcon, TwitterLogoIcon, DiscordLogoIcon } from '@radix-ui/react-icons'
+import { socialLinks } from "@/src/lib/constants";
+import {
+ GitHubLogoIcon,
+ TwitterLogoIcon,
+ DiscordLogoIcon,
+} from "@radix-ui/react-icons";
export default function Footer() {
return (
@@ -7,19 +11,19 @@ export default function Footer() {
- )
+ );
}
diff --git a/tools/obscuroscan_v3/frontend/components/modules/batches/batch-details.tsx b/tools/obscuroscan_v3/frontend/components/modules/batches/batch-details.tsx
index e4d4fdd028..8ce14c1d6e 100644
--- a/tools/obscuroscan_v3/frontend/components/modules/batches/batch-details.tsx
+++ b/tools/obscuroscan_v3/frontend/components/modules/batches/batch-details.tsx
@@ -1,6 +1,70 @@
+// {
+// "Header":
+// {
+// "parentHash":
+// "0x558b1be28fe24a6766e40aa24317492fe5978b159f8fd543170d61ae2749a8bb",
+// "stateRoot":
+// "0xb6c8ea4a0cfc96e202b512a2096c313e36c15883227b83f146564cdea5484e82",
+// "transactionsRoot":
+// "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+// "receiptsRoot":
+// "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+// "number":
+// 9084,
+// "sequencerOrderNo":
+// 9085,
+// "gasLimit":
+// 1537228672809129200,
+// "gasUsed":
+// 0,
+// "timestamp":
+// 1699909432,
+// "extraData":
+// "",
+// "baseFee":
+// 1,
+// "coinbase":
+// "0xd6c9230053f45f873cb66d8a02439380a37a4fbf",
+// "l1Proof":
+// "0x712ca13aff6745094fc215ca9a6b9790e778f13f852d0439b6f998e0b49b64c2",
+// "R":
+// 1.0666142563506898e+77,
+// "S":
+// 1.9832304678215498e+76,
+// "crossChainMessages":
+// [
+// ],
+// "inboundCrossChainHash":
+// "0x712ca13aff6745094fc215ca9a6b9790e778f13f852d0439b6f998e0b49b64c2",
+// "inboundCrossChainHeight":
+// 37008,
+// "transfersTree":
+// "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+// "hash":
+// "0xa6cecb66607c02561dce716d6c077cfaea40119b2ad30427474801cea3740d4a",
+// "sha3Uncles":
+// null,
+// "miner":
+// "0xd6c9230053f45f873cb66d8a02439380a37a4fbf",
+// "logsBloom":
+// null,
+// "difficulty":
+// null,
+// "nonce":
+// null,
+// "baseFeePerGas":
+// 1
+// },
+// "TxHashes":
+// [
+// ],
+// "EncryptedTxBlob":
+// "Fse8O1ZX32W9p68bd8ExeNiPMvfHnNi90o8pgFCIjiQB"
+
import { Separator } from "@/components/ui/separator";
import TruncatedAddress from "../common/truncated-address";
+// }
export function BatchDetails() {
return (
diff --git a/tools/obscuroscan_v3/frontend/src/hooks/useBatches.ts b/tools/obscuroscan_v3/frontend/src/hooks/useBatches.ts
index a27a01e852..86ba61a3bb 100644
--- a/tools/obscuroscan_v3/frontend/src/hooks/useBatches.ts
+++ b/tools/obscuroscan_v3/frontend/src/hooks/useBatches.ts
@@ -1,15 +1,18 @@
import { getBatches, getLatestBatch } from "@/api/batches";
import { useQuery } from "@tanstack/react-query";
+import { pollingInterval } from "../lib/constants";
export const useBatches = () => {
const { data: batches, isLoading: isBatchesLoading } = useQuery({
queryKey: ["batches"],
queryFn: () => getBatches(),
+ refetchInterval: pollingInterval,
});
const { data: latestBatch, isLoading: isLatestBatchLoading } = useQuery({
queryKey: ["latestBatch"],
queryFn: () => getLatestBatch(),
+ refetchInterval: pollingInterval,
});
return { batches, isBatchesLoading, latestBatch, isLatestBatchLoading };
diff --git a/tools/obscuroscan_v3/frontend/src/hooks/useBlocks.ts b/tools/obscuroscan_v3/frontend/src/hooks/useBlocks.ts
index 49a0518df6..3b0c682ffa 100644
--- a/tools/obscuroscan_v3/frontend/src/hooks/useBlocks.ts
+++ b/tools/obscuroscan_v3/frontend/src/hooks/useBlocks.ts
@@ -1,10 +1,12 @@
import { getBlocks } from "@/api/blocks";
import { useQuery } from "@tanstack/react-query";
+import { pollingInterval } from "../lib/constants";
export const useBlocks = () => {
const { data: blocks, isLoading: isBlocksLoading } = useQuery({
queryKey: ["blocks"],
queryFn: () => getBlocks(),
+ refetchInterval: pollingInterval,
});
return { blocks, isBlocksLoading };
diff --git a/tools/obscuroscan_v3/frontend/src/hooks/useTransactions.ts b/tools/obscuroscan_v3/frontend/src/hooks/useTransactions.ts
index 867be284a2..ea50f06354 100644
--- a/tools/obscuroscan_v3/frontend/src/hooks/useTransactions.ts
+++ b/tools/obscuroscan_v3/frontend/src/hooks/useTransactions.ts
@@ -7,6 +7,7 @@ import { useWalletConnection } from "@/components/providers/wallet-provider";
import { useQuery } from "@tanstack/react-query";
import { ethers } from "ethers";
import { useEffect, useState } from "react";
+import { pollingInterval, pricePollingInterval } from "../lib/constants";
export const useTransactions = () => {
const { walletAddress, provider } = useWalletConnection();
@@ -20,12 +21,14 @@ export const useTransactions = () => {
const { data: transactions, isLoading: isTransactionsLoading } = useQuery({
queryKey: ["transactions"],
queryFn: () => getTransactions(),
+ refetchInterval: pollingInterval,
});
const { data: transactionCount, isLoading: isTransactionCountLoading } =
useQuery({
queryKey: ["transactionCount"],
queryFn: () => getTransactionCount(),
+ refetchInterval: pollingInterval,
});
const personalTransactions = async () => {
@@ -43,6 +46,7 @@ export const useTransactions = () => {
const { data: price, isLoading: isPriceLoading } = useQuery({
queryKey: ["price"],
queryFn: () => getPrice(),
+ refetchInterval: pricePollingInterval,
});
return {
diff --git a/tools/obscuroscan_v3/frontend/src/lib/constants.ts b/tools/obscuroscan_v3/frontend/src/lib/constants.ts
index e566aad164..8cd92c17d7 100644
--- a/tools/obscuroscan_v3/frontend/src/lib/constants.ts
+++ b/tools/obscuroscan_v3/frontend/src/lib/constants.ts
@@ -1,5 +1,9 @@
-export const SocialLinks = {
- github: 'https://github.com/obscuro-protocol',
- discord: 'https://discord.gg/2JQ2Z3r',
- twitter: 'https://twitter.com/obscuroprotocol'
-}
+export const socialLinks = {
+ github: "https://github.com/obscuronet",
+ discord: "https://discord.gg/2JQ2Z3r",
+ twitter: "https://twitter.com/obscuronet",
+};
+
+export const pollingInterval = 5000;
+export const maxRetries = 3;
+export const pricePollingInterval = 60 * 1000;