Commit 3b1e16c
committed
[TOOL-4621] New ERC20 public contract page (#7177)
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR primarily focuses on enhancing the dashboard's functionality and user interface by updating environment variable usage, improving component layouts, and refining analytics features. It also introduces new components and modifies existing ones for better data handling and presentation.
### Detailed summary
- Added `NEXT_PUBLIC_DASHBOARD_CLIENT_ID` to `public-envs.ts`.
- Updated `CreateTokenAssetPage` to pass `teamSlug` and `projectSlug`.
- Changed `projectSlug` to use `project.slug` in `marketplace` page.
- Enhanced `EmptyChartState` to accept a `type` prop.
- Updated `getTokenStepTrackingData` to include "deploy" action.
- Introduced `LoadingDots` component for loading states.
- Refactored multiple layout components to include `TeamHeader`.
- Added new public page handling logic in various components.
- Updated analytics functions to utilize the new client ID.
- Improved error handling and response management in analytics API calls.
- Added `DecimalInput` component to replace standard input in `token-sale.tsx`.
> The following files were skipped due to too many changes: `apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx`, `apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/ContractHeader.stories.tsx`, `apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/erc20.tsx`, `apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/Analytics.tsx`, `apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/RecentTransfers.tsx`, `apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/ContractHeader.tsx`, `apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/PriceChart.tsx`, `apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.tsx`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added new layout components with team headers for various dashboard sections.
- Introduced `LoadingDots` component for animated loading indicators.
- Added `PublicPageConnectButton` and `PageHeader` components for public pages.
- Implemented public ERC-20 token page with price charts, token stats, recent transfers, and buy token embed.
- Added token claim card UI with transaction step feedback for purchasing tokens.
- Added hooks for fetching token price data and token transfers.
- Added utility to fetch currency metadata for tokens.
- Added comprehensive contract analytics overview component.
- Introduced `DecimalInput` component for validated decimal input handling.
- Added new social media brand icons for Discord and Telegram.
- **Improvements**
- Enhanced area and bar charts with customizable styles, tooltip formatting, and explicit empty state types.
- Improved empty chart state visuals with new area chart gradients and replaced spinner with animated dots.
- Unified environment variable usage for client IDs across API calls and client initializations.
- Updated contract overview to display call-to-action banner linking to public asset pages for ERC-20 tokens.
- Enhanced contract table to conditionally show contract address or asset page links based on context.
- Improved primary dashboard button to link to asset pages when applicable.
- Added redirects to public landing pages for unsupported contract views lacking project metadata.
- Wrapped existing layouts with conditional team headers for consistent UI in public/private views.
- Added pagination and detailed tables for recent token transfers.
- Updated project slug usage in marketplace listings for accuracy.
- Introduced dynamic time precision handling in analytics charts and tooltips.
- Added optional balance check control to transaction and mismatch buttons.
- Replaced local decimal input component with shared validated decimal input component.
- Added optional target attribute for call-to-action links in upsell banners.
- Refined accessibility and sizing of icon components.
- **Bug Fixes**
- Fixed environment variable naming for client IDs to ensure consistent API integration.
- **Refactor**
- Standardized header and layout components for a unified dashboard experience.
- Replaced spinner with animated dots in loading states for smoother UX.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 1f42ad2 commit 3b1e16c
File tree
78 files changed
+2820
-244
lines changed- apps/dashboard/src
- @
- actions
- components
- blocks
- charts
- ui
- constants
- app
- (app)
- (dashboard)
- (bridge)
- (chain)
- [chain_id]
- (chainPage)
- components/client
- [contractAddress]
- _layout
- _utils
- analytics
- claim-conditions
- code
- cross-chain
- events
- explorer
- overview
- components
- permissions
- public-pages
- _components
- erc20
- _components
- claim-tokens
- contract-analytics
- _hooks
- _utils
- settings
- sources
- tokens
- tx
- chainlist
- contracts
- explore
- profile
- published-contract
- support
- tools
- team
- [team_slug]/[project_slug]
- (sidebar)/assets/create
- distribution
- launch
- contract/[chainIdOrSlug]/[contractAddress]/(marketplace)/direct-listings
- components/Analytics
- bridge
- nebula-app/(app)/components/CustomChat
- pay
- components
- analytics
- buttons
- contract-components/tables
- icons/brand-icons
- data/analytics
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
78 files changed
+2820
-244
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 94 | + | |
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
| |||
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
59 | | - | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
73 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
77 | 83 | | |
78 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
| |||
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
| 111 | + | |
103 | 112 | | |
104 | 113 | | |
105 | 114 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments