Skip to content

Commit

Permalink
update fromBlock for event history hook
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPereira committed Nov 30, 2023
1 parent 5fc5258 commit 1dd2c37
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/nextjs/components/vaults-of-fortune/Leaderboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export const Leaderboard = () => {
// const { data: events, isLoading: isLoadingEvents } = useScaffoldEventHistory({
// contractName: "Market",
// eventName: "PlayerTotalAssetUpdate",
// fromBlock: 0n,
// fromBlock: 0n,
// fromBlock: 43030910n,
// // Apply filters to the event based on parameter names and values { [parameterName]: value },
// filters: {
// contestNumber: currentContestNumber,
Expand Down
3 changes: 2 additions & 1 deletion packages/nextjs/components/vaults-of-fortune/Round.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ const RoiTable = () => {
contractName: "Market",
eventName: "RoundROIResults",
// Specify the starting block number from which to read events, this is a bigint.
fromBlock: 0n,
// fromBlock: 0n,
fromBlock: 43030910n,
blockData: true,
// Apply filters to the event based on parameter names and values { [parameterName]: value },
filters: { contestNumber: currentContest },
Expand Down
1 change: 1 addition & 0 deletions packages/nextjs/pages/contest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const CurrentContest: NextPage = () => {
listener: logs => {
logs.map(log => {
const { contestNumber, roundNumber, lowRiskVaultROI, mediumRiskVaultROI, highRiskVaultROI } = log.args;
console.log("RoundROIResults EVENT SUBSCRIBER", log.args);
setRoundResults(() => {
return {
contestNumber: Number(contestNumber),
Expand Down

0 comments on commit 1dd2c37

Please sign in to comment.