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: add four new stat variables, stake simulator #1699

Merged
merged 41 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
441ec60
feat: add three new variables, style svgs sizes, separate stats, crea…
kemuru Sep 25, 2024
b82ea0d
feat: refactor stat names, values, add homeblock query, add chart ico…
kemuru Sep 27, 2024
3171cb2
feat: add accordion, style divider
kemuru Sep 30, 2024
c8b793f
feat: open accordion on default
kemuru Oct 3, 2024
e90eeed
Merge branch 'dev' into feat/add-stats-court-page
kemuru Oct 3, 2024
2af88c1
fix: fix some types
kemuru Oct 3, 2024
aff2336
fix: slight styling detail and use title as key instead of index
kemuru Oct 3, 2024
46edcb8
chore: update subgraph package json
kemuru Oct 8, 2024
9925c37
fix: adjust homepageblockquery hook, stats adjustments, add pnk for 1…
kemuru Oct 9, 2024
2bc6665
Merge branch 'dev' into feat/add-stats-court-page
kemuru Oct 9, 2024
9e53b00
chore: reorder stats
kemuru Oct 9, 2024
b722d5e
Merge branch 'dev' into feat/add-stats-court-page
kemuru Oct 14, 2024
bb4f76a
feat: first iteration of stake simulator, abstract jurorbalance, comm…
kemuru Oct 14, 2024
9e492d6
Merge branch 'dev' into feat/add-stats-court-page
kemuru Oct 14, 2024
a97b1f3
Merge branch 'dev' into feat/add-stats-court-page
kemuru Oct 15, 2024
9e3fbff
feat: style simulator popup according to figma, adjust position in mo…
kemuru Oct 15, 2024
8a97cfb
feat: new icons for stats, improve wording, reorder imports, style ad…
kemuru Oct 15, 2024
40e8011
Merge branch 'dev' into feat/add-stats-court-page
kemuru Oct 15, 2024
638c5ba
feat: add tooltips to the 4 stat variables, typing, wording adjustment
kemuru Oct 16, 2024
5245f2d
fix: few comments by coderabbitai
kemuru Oct 16, 2024
5ebfe32
feat: styling issues in stats section
kemuru Oct 16, 2024
1e41b0b
Merge branch 'dev' into feat/add-stats-court-page
kemuru Oct 18, 2024
39df777
Merge branch 'dev' into feat/add-stats-court-page
kemuru Oct 23, 2024
e219edc
Merge branch 'dev' into feat/add-stats-court-page
kemuru Oct 24, 2024
7e5779c
Merge branch 'dev' into feat/add-stats-court-page
kemuru Oct 25, 2024
418f8aa
feat: add new stake simulator design, add new juror effectivestake me…
kemuru Oct 25, 2024
f0931b1
chore: update subgraph package json version
kemuru Oct 25, 2024
1f9b155
chore: update package json version
kemuru Oct 25, 2024
86162f0
chore: remove payback metric
kemuru Oct 28, 2024
44b00b3
fix: more correct calculations
kemuru Oct 28, 2024
0f16c7a
fix: handle undefined values
kemuru Oct 28, 2024
fd3aa44
fix: simulator didnt work if wallet is not connected
kemuru Oct 28, 2024
0cba9be
Merge branch 'dev' into feat/add-stats-court-page
kemuru Oct 28, 2024
f23a29d
fix: abstract divider, few style issues
kemuru Oct 28, 2024
024bdba
chore: abstract beautifystatnumber
kemuru Oct 28, 2024
723cf91
fix: beautify tweak
kemuru Oct 28, 2024
dafcad2
fix: memoize some values to prevent recalculations
kemuru Oct 29, 2024
16e8547
fix: new wallets cant see simulator
kemuru Oct 29, 2024
b9321c2
Merge branch 'dev' into feat/add-stats-court-page
kemuru Oct 29, 2024
f5010b2
Merge branch 'dev' into feat/add-stats-court-page
kemuru Oct 29, 2024
4ceb55a
chore: new dice icon
kemuru Oct 29, 2024
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
15 changes: 15 additions & 0 deletions web/src/assets/svgs/icons/chart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion web/src/assets/svgs/icons/ethereum.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions web/src/assets/svgs/icons/law-balance-with-pnk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion web/src/assets/svgs/icons/law-balance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion web/src/assets/svgs/icons/min-stake.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion web/src/assets/svgs/icons/pnk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion web/src/assets/svgs/icons/redistributed-pnk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions web/src/assets/svgs/icons/rewards-per-pnk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion web/src/assets/svgs/icons/user.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion web/src/assets/svgs/icons/vote-stake.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions web/src/assets/svgs/icons/votes-per-pnk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions web/src/components/StatDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ const SVGContainer = styled.div<{ iconColor: string; backgroundColor: string }>`
justify-content: center;
svg {
fill: ${({ iconColor }) => iconColor};
height: ${({ iconColor, theme }) => (iconColor === theme.success ? "24px" : "32px")};
width: ${({ iconColor, theme }) => (iconColor === theme.success ? "24px" : "32px")};
}
`;

Expand Down
3 changes: 3 additions & 0 deletions web/src/consts/averageBlockTimeInSeconds.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { arbitrum, arbitrumSepolia } from "viem/chains";

export const averageBlockTimeInSeconds = { [arbitrum.id]: 0.26, [arbitrumSepolia.id]: 0.268 };
2 changes: 2 additions & 0 deletions web/src/hooks/queries/useCourtDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ const courtDetailsQuery = graphql(`
numberClosedDisputes
numberAppealingDisputes
numberStakedJurors
numberVotes
stake
paidETH
paidPNK
timesPerPeriod
feeForJuror
}
}
`);
Expand Down
Loading
Loading