Skip to content

Conversation

@JunichiSugiura
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Mar 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
explorer-sepolia ✅ Ready (Inspect) Visit Preview Mar 20, 2025 4:00pm
explorer-starknet ✅ Ready (Inspect) Visit Preview Mar 20, 2025 4:00pm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey actually the designs have changed post our last conversation. I would recommend using these in place of <Tabs /> since @kariy has added this to our components to directly plug everywhere.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to delete this too. We would need this in the <DetailsPageSelector /> Component

@@ -9,17 +9,17 @@ import {
useReactTable,
} from "@tanstack/react-table";
import { ROUTES } from "@/constants/routes";
import TxTypeToggle from "./TxTypeToggle";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Comment on lines 266 to 291
const { events } = await RPC_PROVIDER.getEvents({
address: contractAddress!,
chunk_size: 1,
from_block: { block_number: 0 },
to_block: "latest",
});

const txHashes = [...new Set(events.map(event => event.transaction_hash))];

return Promise.all(
txHashes.map(async (hash, i) => {
const [receipt, details] = await Promise.all([
RPC_PROVIDER.getTransactionReceipt(hash),
RPC_PROVIDER.getTransactionByHash(hash)
]);
return {
id: padNumber(i + 1),
type: details.type,
status: receipt.statusReceipt,
hash,
};
})
);
},
initialData: [],
enabled: !!contractAddress
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's intentional for now, but this will at most only fetch 1 event. For this to be correct we have to query it in a loop from block 0 -> block latest until no continuation token is returned by getEvents. And this would take a very long time. So, I don't think this query should be done in the client....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is something that would be solved if we have a dedicated indexer. I also think it's probably fine to fetch the events like this if it's on a locally hosted katana (ie, dev node), but not on any of the live Starknet chains. Considering they have A LOT of blocks.

@JunichiSugiura
Copy link
Contributor Author

close in favor of #40

@JunichiSugiura JunichiSugiura deleted the feat/contract-txs branch May 26, 2025 13:05
kariy added a commit that referenced this pull request Oct 23, 2025
Co-authored-by: kariy <26515232+kariy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants